0

nRF51822 ,cannot find headers which were involved in imported into keil5

likent gravatar image

asked 2017-11-19 15:56:13 +0100

image description image description as this screenshots show, i add some headers to nRF_Libraries, and add the directory of the folder nRF_Libraries to Options for targets /c++/include paths,but after building project,I cannot open the header , e.g. boards.h by rightClicking and choosing open documents "boards.h" option besides,i can open a header file in object explorer window.and after rebuilding the output is like below: * Using Compiler 'V5.06 update 1 (build 61)', folder: 'F:\keil5\ARM\ARMCC\Bin' Rebuild target 'nrf51822_xxac_GPIOTest' compiling nrf_drv_gpiote.c... ..\nRF5_SDK_11.0.0\components\drivers_nrf\gpiote\nrf_drv_gpiote.h(26): error: #5: cannot open source input file "nrf_gpiote.h": No such file or directory #include "nrf_gpiote.h" ..\nRF5_SDK_11.0.0\components\drivers_nrf\gpiote\nrf_drv_gpiote.c: 0 warnings, 1 error compiling nrf_drv_common.c... ..\nRF5_SDK_11.0.0\components\drivers_nrf\common\nrf_drv_common.h(19): error: #5: cannot open source input file "sdk_errors.h": No such file or directory #include "sdk_errors.h" ..\nRF5_SDK_11.0.0\components\drivers_nrf\common\nrf_drv_common.c: 0 warnings, 1 error compiling main.c... main.c(5): error: #5: cannot open source input file "nrf_gpiote.h": No such file or directory #include "nrf_gpiote.h" main.c: 0 warnings, 1 error compiling app_error_weak.c... ..\nRF5_SDK_11.0.0\components\libraries\util\sdk_errors.h(46): error: #5: cannot open source input file "nrf_error.h": No such file or directory #include "nrf_error.h" ..\nRF5_SDK_11.0.0\components\libraries\util\app_error_weak.c: 0 warnings, 1 error compiling app_error.c... ..\nRF5_SDK_11.0.0\components\libraries\util\sdk_errors.h(46): error: #5: cannot open source input file "nrf_error.h": No such file or directory #include "nrf_error.h" ..\nRF5_SDK_11.0.0\components\libraries\util\app_error.c: 0 warnings, 1 error compiling nrf_delay.c... compiling app_util_platform.c... ..\nRF5_SDK_11.0.0\components\libraries\util\sdk_errors.h(46): error: #5: cannot open source input file "nrf_error.h": No such file or directory #include "nrf_error.h" ..\nRF5_SDK_11.0.0\components\libraries\util\app_util_platform.c: 0 warnings, 1 error compiling nrf_assert.c... ..\nRF5_SDK_11.0.0\components\libraries\util\sdk_errors.h(46): error: #5: cannot open source input file "nrf_error.h": No such file or directory #include "nrf_error.h" ..\nRF5_SDK_11.0.0\components\libraries\util\nrf_assert.c: 0 warnings, 1 error compiling bsp.c... ..\nRF5_SDK_11.0.0\examples\bsp\boards.h(15): error: #5: cannot open source input file "nrf_gpio.h": No such file or directory #include "nrf_gpio.h" ..\nRF5_SDK_11.0.0\examples\bsp\bsp.c: 0 warnings, 1 error compiling bsp_btn_ant.c... ..\nRF5_SDK_11.0.0\examples\bsp\bsp_btn_ant.h(32): error: #5: cannot open source input file "ant_stack_handler_types.h": No such file or directory #include "ant_stack_handler_types.h" ..\nRF5_SDK_11.0.0\examples\bsp\bsp_btn_ant.c: 0 warnings, 1 error compiling bsp_btn_ble.c... ..\nRF5_SDK_11.0.0\examples\bsp\bsp_btn_ble.h(32): error: #5: cannot open source input file "ble.h": No such file or directory #include "ble.h" ..\nRF5_SDK_11.0.0\examples\bsp\bsp_btn_ble.c: 0 warnings, 1 error compiling nrf_nvmc.c... compiling nrf_adc.c... compiling nrf_ecb.c... assembling arm_startup_nrf51.s... compiling nrf_saadc.c... ..\nRF5_SDK_11.0.0\components\drivers_nrf\hal\nrf_saadc.h(28): error: #5: cannot open source input file "nrf_assert.h": No such file or directory #include "nrf_assert.h" ..\nRF5_SDK_11.0.0\components\drivers_nrf\hal\nrf_saadc.c: 0 warnings, 1 error compiling system_nrf51.c... ".\Objects\ButtonCheckkk.axf" - 11 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:04

it my first time to build a nRF51822 project ,I am astonished.

it will be appreciated if who can answer me ,thanks a lot in advance

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
0
Joakim-Jakobsen gravatar image

answered 2017-11-20 15:40:44 +0100

Hi Likent!

What do you mean by "involved in imported to keil5"?

The reason that you are not able to open the header files, is that the path definitions probably are wrong.
Also, you need to add the specific path to all the files needed by your application.
In the SDK, as long as you didn't move the file, the boards.h file should be placed at: <SDK_InstallFolder>\nRF5_SDK_11.0.0_89a8197\examples\bsp

and the nrf_gpiote.h should be placed in:
<SDK_InstallFolder>\nRF5_SDK_11.0.0_89a8197\components\drivers_nrf\gpiote

If you added the files needed to the nRF_Libraries folder, you might not find the files because you wrote the folder name wrong? From your screenshot, you added the path to mRF_Libraries, not nRF_Libraries.

Just as a suggestion;
It might be easier to find a SDK example that is close to what you need, and change it to fit your needs.

Hope that helps. Let me know if you still have problems.
Best regards,
Joakim.

edit flag offensive delete publish link more

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]

Question Tools

1 follower

Stats

Asked: 2017-11-19 15:56:13 +0100

Seen: 40 times

Last updated: nov. 20