3

The Keil shows an error when #include "nrf_delay.h"

Jin Lu gravatar image

asked 2013-10-23 04:12:48 +0200

updated 2014-04-08 02:33:46 +0200

Hi, The Keil MDK shows an error when I open a example project from nrfSDK. but there is no error when compile.

Could someone please clarify. Thank you .

main.c.png

delay_c.png

delay_h.png

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
4
hkn gravatar image

answered 2013-10-23 15:28:44 +0200

updated 2014-04-08 02:33:46 +0200

Hi,

I have the same thing at my computer.

It seems that this is an issue with the code-completion feature in Keil. The code-completion option does some parsing of the file and it's included headers, and seem to miss this declaration somehow.

As you point out, there's no compiler-error, so it's safe to ignore.

Best regards Håkon

edit flag offensive delete publish link more

Comments

I've also gotten the same error since I ugpraded Keil a little while ago. None of my code is anymore broken than normal, so also confirm it's more of a cosmetic issue ;) -m

Marc Nicholas ( 2013-10-23 16:59:06 +0200 )editconvert to answer

I agree. I was facing the same issue a few days ago until i realized that is was more for cosmetic reasons than syntactical.

Madhuri ( 2015-01-24 08:32:11 +0200 )editconvert to answer

Three years later and this problem is still there. :-(

Chris Pearson ( 2016-12-20 09:48:14 +0200 )editconvert to answer

I actually talked to Keil/ARM about this at a embedded conference. This is a restriction in their autocompletion tool, where it does not properly parse function implementations in header files. It shall not have any effect on your compilation, but it is annoying to see from a user-perspective.

Håkon Alseth ( 2016-12-20 11:08:17 +0200 )editconvert to answer
1

That is true. However, a professor of user interface design theory would be screaming about this kind of thing. :-) A modern IDE should be presenting the developer with a easier workload and an accurate representation of the current state of the code.

In some ways this reminds me of not fixing compile warnings. Sure, your code may work, but there may be a real problem hiding in that stream of warnings. If you can't trust your IDE to accurately display if a problem is real or not, potentially you'll miss actual problems in your code that the compiler is trying to warn you about.

Chris Pearson ( 2016-12-21 23:40:13 +0200 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

2 followers

Stats

Asked: 2013-10-23 04:12:48 +0200

Seen: 5,530 times

Last updated: Oct 26 '15