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

Supporting a custom board with nRF5 SDK examples

We are selling our own nRF51 and nRF52 based boards (Aistin Blue, www.iprotoxi.fi/.../iprotoxi-aistin-blue) and would like to offer customers easy way to run Nordic Semiconductor's SDK examples with those boards. I know there's so called "board support package" (bsp) in the SDK. What is the correct/best way to configure a new board there?

The preferred way for us would be to just provide a new header with pin definitions, and then a single define to let the compiler know of that new board. Is that possible?

Parents
  • Hi,

    Yes, that is possible. Simply copy one of the existing board files (e.g. pca10028.h), rename it, and modify it after your requirements (change pin configuration, etc). Then you have to modify boards.h to support your new file:

    ..
    #elif defined(BOARD_CUSTOM)
      #include "custom_board.h"
    ..
    

    The new define can then be used in Keil (Options for Target -> C/C++ tab-> Define-> remove BOARD_PCA10028 and add your BOARD_CUSTOM). The bsp module is very dynamic, and will configure according to your custom board file.

Reply
  • Hi,

    Yes, that is possible. Simply copy one of the existing board files (e.g. pca10028.h), rename it, and modify it after your requirements (change pin configuration, etc). Then you have to modify boards.h to support your new file:

    ..
    #elif defined(BOARD_CUSTOM)
      #include "custom_board.h"
    ..
    

    The new define can then be used in Keil (Options for Target -> C/C++ tab-> Define-> remove BOARD_PCA10028 and add your BOARD_CUSTOM). The bsp module is very dynamic, and will configure according to your custom board file.

Children
Related