I am using PlatformIO (Core v4.3.4 and Home v3.2.3), VSCode v1.489.2, MacOS 10.15.6, nordicnf52 v4.4.0, Zephyr v2.3.0.
I created my custom board by simply copying and modifying the nRF52840DK_nRF52840 board. Since the example I made using the nRF52840DK_nRF52840 board works fine, and populates the c_cpp_properties.json file correctly, but my renamed and slightly modified copy doesn’t work. I think there has to be some background nordicnrf52 settings or files that aren’t linked to the custom board I created, but I am at a loss for what they could be.
This project worked before I updated to nordicnf52 v4.4.0. Now the project can’t open the following source files: device.h, devicetree.h, sys/printk.h, sys/util.h, version.h, zephyr.h, and zephyr/types.h. The problem seems to be caused by the system compiler arguments include paths not being populated in the generated c_cpp_properties.json file.
In the currently working nRF52840DK_nRF52840 board project the following lines are in its c_cpp_properties.json file.
"-isystem", "/Users/mdcraver/.platformio/packages/framework-zephyr/lib/libc/minimal/include", "-isystem", "/Users/mdcraver/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/include", "-isystem", "/Users/mdcraver/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/include-fixed",
However, in the project with my custom nRF52840 board those lines are not present.
In looking at the release notes for nordicnrf52 v4.3.0 and for the Zephyr framework v2.3.0 I noticed in the Zephyr release notes that the nRF52 boards were renamed. Also, it mentions a new Zephyr CMake package. I was wondering if this could lead to my problems.
Has anyone successfully created a custom nordic nRF52 board, using the recommended method of copying and modifying an existing board, that works with the most recent versions of PlatformIO, nordicnrf52, and Zephyr?