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

BSP header files and board selection

Hi.

I am on nRF52 DK (PCA10040 v0.9.0, s132 SD), SDK 0.9.2 and Linux (Ubuntu).

I am currently working on the SDK's example ble_app_uart.

I am only using gcc, and with the Makefile provided in the SDK, I'm able to run make, get the hex binary file and flash it to the nRF52 board. It works well.

My question : in the /examples/bsp folder, there are many header files : eg bsp.h, boards.h and also many board-specific files eg pca10040.h. boards.h is where the codes seems to select the right board-specific configuration (eg #elif defined(BOARD_PCA10040) / #include "pca10040.h"...). However I cannot find out where in the code the board.h header file is included, that is I do not understand where the code does specify which board is used (and eventually triggers boards.h to select the right pca10040.h header file).

The only place I can find a mention of the board model is in the Makefile (eg CFLAGS += -DBOARD_PCA10040) but I do not understand if / how this is ultimately passed to boards.h and select the associated pca10040.h file.

Parents Reply Children
Related