I built a sample Zephyr program using the nRF52840-DK using PlatformIO in VSCode to help me understand the configuration process. I can’t figure out where the following include paths for 'compilerArgs" are set.
"-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",
Following is the platform.ini file.
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:nrf52840_dk]
platform = nordicnrf52
board = nrf52840_dk
framework = zephyr
monitor_speed = 115200
Following is the c_cpp_properties.json file
{
"configurations": [
{
"name": "!!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags"
},
{
"name": "Mac",
"macFrameworkPath": [],
"includePath": [
"/Users/mdcraver/Documents/PlatformIO/Projects/nRF52840_DK_Test/include",
"/Users/mdcraver/Documents/PlatformIO/Projects/nRF52840_DK_Test/src",
"/Users/mdcraver/.platformio/packages/framework-zephyr/include",
"/Users/mdcraver/Documents/PlatformIO/Projects/nRF52840_DK_Test/.pio/build/nrf52840_dk/zephyr/include/generated",
"/Users/mdcraver/.platformio/packages/framework-zephyr/soc/arm/nordic_nrf/nrf52",
"/Users/mdcraver/.platformio/packages/framework-zephyr-segger/rtt",
"/Users/mdcraver/.platformio/packages/framework-zephyr-hal-nordic/nrfx",
"/Users/mdcraver/.platformio/packages/framework-zephyr-hal-nordic/nrfx/drivers/include",
"/Users/mdcraver/.platformio/packages/framework-zephyr-hal-nordic/nrfx/mdk",
"/Users/mdcraver/.platformio/packages/framework-zephyr-hal-nordic",
"/Users/mdcraver/.platformio/packages/framework-zephyr-cmsis/CMSIS/Core/Include",
"/Users/mdcraver/.platformio/packages/tool-unity",
""
],
"browse": {
"limitSymbolsToIncludedHeaders": true,
"path": [
"/Users/mdcraver/Documents/PlatformIO/Projects/nRF52840_DK_Test/include",
"/Users/mdcraver/Documents/PlatformIO/Projects/nRF52840_DK_Test/src",
"/Users/mdcraver/.platformio/packages/framework-zephyr/include",
"/Users/mdcraver/Documents/PlatformIO/Projects/nRF52840_DK_Test/.pio/build/nrf52840_dk/zephyr/include/generated",
"/Users/mdcraver/.platformio/packages/framework-zephyr/soc/arm/nordic_nrf/nrf52",
"/Users/mdcraver/.platformio/packages/framework-zephyr-segger/rtt",
"/Users/mdcraver/.platformio/packages/framework-zephyr-hal-nordic/nrfx",
"/Users/mdcraver/.platformio/packages/framework-zephyr-hal-nordic/nrfx/drivers/include",
"/Users/mdcraver/.platformio/packages/framework-zephyr-hal-nordic/nrfx/mdk",
"/Users/mdcraver/.platformio/packages/framework-zephyr-hal-nordic",
"/Users/mdcraver/.platformio/packages/framework-zephyr-cmsis/CMSIS/Core/Include",
"/Users/mdcraver/.platformio/packages/tool-unity",
""
]
},
"defines": [
"PLATFORMIO=40304",
"ARDUINO_NRF52_DK",
"BUILD_VERSION=zephyr-v20300",
"KERNEL",
"NRF52840_XXAA",
"_FORTIFY_SOURCE=2",
"__PROGRAM_START",
"__ZEPHYR__=1",
""
],
"intelliSenseMode": "clang-x64",
"cStandard": "c99",
"forcedInclude": [
"/Users/mdcraver/.platformio/packages/framework-zephyr/include/toolchain/zephyr_stdint.h",
"/Users/mdcraver/Documents/PlatformIO/Projects/nRF52840_DK_Test/.pio/build/nrf52840_dk/zephyr/include/generated/autoconf.h",
""
],
"compilerPath": "/Users/mdcraver/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc",
"compilerArgs": [
"-mabi=aapcs",
"-mcpu=cortex-m4",
"-mthumb",
"-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",
""
]
}
],
"version": 4
}