Adding custom board file - Noaman-strat/nrf5 GitHub Wiki

It is best to keep the custom_board.h file in the main project folder so it can be easily bundled and shared.

To change the board definition from default pc10056, follow the steps here: nrf52840 project settings

Delete the preprocessor definition for pc10056 and add your own custom board definiton.

Go to boards.c -> boards.h and add your custom board with #else if defined ....

you may have to add the directory under 'include' for the custom board file, as:

Right click on project -> options -> (Choose common configuration settings from drop down) -> preprocessor -> User Include Directories