This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Custom board configuration

I am bringing up a custom board based on the PCA10040.

As the first step, I simply copied (no changes) the file pca10040.h and named it as "my_custom.h".
I then defined the symbol BOARD_CUSTOM using the command line -DBOARD_CUSTOM=1
I can see that the file "boards.h" properly identifies and uses the newly copied  header file "my_custom.h"

But then when I build this configuration, the linker complains about undefined references:

C:/Z_PROJECTS/SVN_PROJECTS/DoorSentry/branch/NRF5_2832/nrf5_sdk/components/libraries/button/app_button.c:82: undefined reference to `nrfx_gpiote_in_is_set'
./nRF_Libraries/button/app_button.o: In function `gpiote_event_handler':
C:/Z_PROJECTS/SVN_PROJECTS/DoorSentry/branch/NRF5_2832/nrf5_sdk/components/libraries/button/app_button.c:115: undefined reference to `nrfx_gpiote_in_is_set'
./nRF_Libraries/button/app_button.o: In function `app_button_init':
C:/Z_PROJECTS/SVN_PROJECTS/DoorSentry/branch/NRF5_2832/nrf5_sdk/components/libraries/button/app_button.c:149: undefined reference to `nrfx_gpiote_is_init'
C:/Z_PROJECTS/SVN_PROJECTS/DoorSentry/branch/NRF5_2832/nrf5_sdk/components/libraries/button/app_button.c:151: undefined reference to `nrfx_gpiote_init'
C:/Z_PROJECTS/SVN_PROJECTS/DoorSentry/branch/NRF5_2832/nrf5_sdk/components/libraries/button/app_button.c:174: undefined reference to `nrfx_gpiote_in_init'
./nRF_Libraries/button/app_button.o: In function `app_button_enable':
C:/Z_PROJECTS/SVN_PROJECTS/DoorSentry/branch/NRF5_2832/nrf5_sdk/components/libraries/button/app_button.c:191: undefined reference to `nrfx_gpiote_in_event_enable'
collect2.exe: error: ld returned 1 exit status

What I don't quite understand is that the build is successful if I revert back to using "pca10040.h".
And I simply copied the same board file over to a different name!

Anybody care to help me get to the bottom of this? I am using SDK v15.3.0

Parents
  • Hi,

    Even though you copied the same board file, did you copied all the dependency files? I can see that you have made a different folder even though you're using SDK 15.3.0

    app_button.c file exist in component/libraries/button folder, check this folder in project path. Further, which IDE you're using? You need to mention relative path of missing dependency files in project options. Sometime, missing c files need to be manually added in project explorer in IDE.

    Thanks,

    pdpro

Reply
  • Hi,

    Even though you copied the same board file, did you copied all the dependency files? I can see that you have made a different folder even though you're using SDK 15.3.0

    app_button.c file exist in component/libraries/button folder, check this folder in project path. Further, which IDE you're using? You need to mention relative path of missing dependency files in project options. Sometime, missing c files need to be manually added in project explorer in IDE.

    Thanks,

    pdpro

Children
Related