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.

  • Ok, thanks for answer! However, I think there might be a problem with buttons and leds, since bsp module might be assuming all the leds / buttons are wired in consecutive pins (there's defines LED_START/LED_STOP and BUTTON_START/BUTTON_STOP). However, in our board leds are not in consecutive pins. Is that a problem?

Reply Children
No Data
Related