0

I am building code (in VS Code) for the NRF52840 Development Kit using the nordic nRF5_SDK-17.1.0. When I build the following example with the following dependancies:

#include <stdbool.h>
#include "nrf_delay.h"
#include "nrf_gpio.h"
#include "nrf_pwr_mgmt.h"
#include "ble.h"
#include "ble_advertising.h"

I get an error that it cannot find files in this SDK:

/Users/jaspal/development/BT-Nordic/hello_world4/src/main.c:2:10: fatal error: nrf_delay.h: No such file or directory
    2 | #include "nrf_delay.h"

I have added the path to my ~/.zshrc but it is still not finding these files. Help would be much appreciated!

  • 1
    what path in zshrc? You need to add -I/wherever/nRF/framework/headers/are/ (or somewhere in project) - it must be present on the compiler command line when compiling main.c – KIIV Jul 11 '23 at 20:37

0 Answers0