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

How to add a custom board when using the BSP?

I'm trying to use the board support package (BSP) through a keil software pack, starting from the dfu_dual_bank_ble_s110_pca10028 example. I thought it would be more or less these simple steps:

  1. Replace the development board version with BOARD_CUSTOM in Options for Target... -> C/C++ tab, Define list.

  2. Create a custom_board.h file and add it to your project.

  3. Populate your custom_board.h file as needed with macros to abstract the pinout of your custom board, etc.

How will boards.h then load your custom_board.h file?

#elif defined(BOARD_WT51822)
  #include "wt51822.h"
#elif defined(BOARD_CUSTOM)
  #include "custom_board.h"
#else
#error "Board is not defined"
#endif

I don't know how to guide the compiler to my app directory's custom_board.h file. It seems to be looking at the Keil install directory only:

C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Examples\7.2.0\bsp\boards.h(36): error:  #5: cannot open source input file "custom_board.h": No such file or directory
Related