Intellisense Issues with nano33ble on PlatformIO

Hi everyone,

I am using PlatformIO with VSCode on both Windows and macOS. In Windows, everything works fine, but on macOS, I am experiencing issues with Intellisense when using the Arduino Nano 33 BLE (nano33ble) board.

When setting board = nano33ble in platformio.ini, basic Arduino macros like HIGH, LOW, and OUTPUT are not recognized by Intellisense (underlined in red).

However, when I change the board to nrf52840_dk, Intellisense works perfectly fine.

I tried these:

  1. Running pio init --ide vscode to refresh Intellisense settings.

  2. Rebuilding Intellisense database (C/C++: Reset IntelliSense Database).

  3. Updating PlatformIO and libraries (pio update, pio upgrade).

  4. Completely uninstalling and reinstalling VSCode, including removing caches(~/.vscode/) and configuration files.

  5. Removing and reinstalling PlatformIO, ensuring cache files(~/.platformio/) are deleted.

  6. Changing VSCode’s language settings to English (in case of localization-related issues).

  7. Disabling all other extensions in VSCode to prevent conflicts.

Observations:

• The issue happens only when using nano33ble.

• Other nRF52840-based boards (e.g., nrf52840_dk) do not have this issue, and Intellisense works fine.

• This problem occurs only on macOS. On Windows, Intellisense works as expected.

• Even after fully resetting and reinstalling VSCode and PlatformIO , the issue remains unchanged.

Questions:

  1. Why is Intellisense not working properly with nano33ble but works with nrf52840_dk?

  2. Is there a known issue with PlatformIO’s support for nano33ble?

  3. How can I fix this issue to ensure Intellisense works correctly with nano33ble?

I’d appreciate any help or insights from the community! Thanks in advance.

What’s the exact platformio.ini?

What’s the content of the .vscode/c_cpp_properties.json file?

Does the project build?

in platformio.ini

; 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:nano33ble]
platform = nordicnrf52
board = nano33ble
framework = arduino

and .vscode/c_cpp_properties.json

//
// !!! WARNING !!! AUTO-GENERATED FILE!
// PLEASE DO NOT MODIFY IT AND USE "platformio.ini":
// https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
//
{
    "configurations": [
        {
            "name": "PlatformIO",
            "includePath": [
                "/Users/bagsiu/Documents/PlatformIO/Projects/wtf2/include",
                "/Users/bagsiu/Documents/PlatformIO/Projects/wtf2/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/cores/arduino",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated-avr-comp",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/variants/ARDUINO_NANO33BLE",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Arduino_CAN/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Arduino_H7_Video/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Camera/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Ethernet/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/GC2145",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/GPS/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/GSM/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Himax_HM01B0",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Himax_HM0360",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/KernelDebug/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/MCUboot/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/MLC/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/MRI/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/NDP/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Nano33BLE_System/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Nicla_System/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/OV7670",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/PDM/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Portenta_Audio/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Portenta_SDCARD/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Portenta_SDRAM/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/RPC/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/SE05X/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/SFU/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/SPI",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/STM32H747_System/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Scheduler/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/ThreadDebug/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/USBAudio",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/USBHID/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/USBHOST/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/USBMIDI",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/USBMSD/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/WiFi/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Wire",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/doom/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/ea_malloc",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/mbed-memory-status",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/openamp_arduino/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/rpclib/src",
                "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/syntiant_ilib/src",
                ""
            ],
            "browse": {
                "limitSymbolsToIncludedHeaders": true,
                "path": [
                    "/Users/bagsiu/Documents/PlatformIO/Projects/wtf2/include",
                    "/Users/bagsiu/Documents/PlatformIO/Projects/wtf2/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/cores/arduino",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/cores/arduino/api/deprecated-avr-comp",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/variants/ARDUINO_NANO33BLE",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Arduino_CAN/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Arduino_H7_Video/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Camera/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Ethernet/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/GC2145",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/GPS/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/GSM/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Himax_HM01B0",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Himax_HM0360",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/KernelDebug/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/MCUboot/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/MLC/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/MRI/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/NDP/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Nano33BLE_System/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Nicla_System/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/OV7670",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/PDM/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Portenta_Audio/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Portenta_SDCARD/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Portenta_SDRAM/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/RPC/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/SE05X/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/SFU/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/SPI",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/STM32H747_System/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Scheduler/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/SocketWrapper/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/ThreadDebug/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/USBAudio",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/USBHID/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/USBHOST/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/USBMIDI",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/USBMSD/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/WiFi/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/Wire",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/doom/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/ea_malloc",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/mbed-memory-status",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/openamp_arduino/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/rpclib/src",
                    "/Users/bagsiu/.platformio/packages/framework-arduino-mbed/libraries/syntiant_ilib/src",
                    ""
                ]
            },
            "defines": [
                "PLATFORMIO=60116",
                "ARDUINO_ARDUINO_NANO33BLE",
                "ARDUINO_ARCH_NRF52840",
                "ARM_MATH_CM4",
                "BOARD_PCA10056",
                "__CMSIS_RTOS",
                "CMSIS_VECTAB_VIRTUAL",
                "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"",
                "COMPONENT_FLASHIAP=1",
                "CONFIG_GPIO_AS_PINRESET",
                "__CORTEX_M4",
                "DEVICE_ANALOGIN=1",
                "DEVICE_FLASH=1",
                "DEVICE_I2C=1",
                "DEVICE_I2C_ASYNCH=1",
                "DEVICE_I2CSLAVE=1",
                "DEVICE_INTERRUPTIN=1",
                "DEVICE_LPTICKER=1",
                "DEVICE_PORTIN=1",
                "DEVICE_PORTINOUT=1",
                "DEVICE_PORTOUT=1",
                "DEVICE_PWMOUT=1",
                "DEVICE_SERIAL=1",
                "DEVICE_SERIAL_ASYNCH=1",
                "DEVICE_SERIAL_FC=1",
                "DEVICE_SLEEP=1",
                "DEVICE_SPI=1",
                "DEVICE_SPI_ASYNCH=1",
                "DEVICE_SYSTICK_CLK_OFF_DURING_SLEEP=1",
                "DEVICE_TRNG=1",
                "DEVICE_USBDEVICE=1",
                "DEVICE_USTICKER=1",
                "DEVICE_WATCHDOG=1",
                "FEATURE_BLE=1",
                "FEATURE_CRYPTOCELL310=1",
                "FEATURE_STORAGE=1",
                "__FPU_PRESENT=1",
                "__MBED__=1",
                "MBED_BUILD_TIMESTAMP=1730967169.3690522",
                "__MBED_CMSIS_RTOS_CM",
                "MBED_MPU_CUSTOM",
                "MBED_TICKLESS",
                "MBEDTLS_CONFIG_HW_SUPPORT",
                "NRF52840_XXAA",
                "NRF52_PAN_20",
                "SWI_DISABLE0",
                "TARGET_ARDUINO_NANO33BLE",
                "TARGET_CORDIO",
                "TARGET_CORDIO_LL",
                "TARGET_CORTEX",
                "TARGET_CORTEX_M",
                "TARGET_LIKE_CORTEX_M4",
                "TARGET_LIKE_MBED",
                "TARGET_M4",
                "TARGET_MCU_NRF52840",
                "TARGET_NAME=ARDUINO_NANO33BLE",
                "TARGET_NORDIC",
                "TARGET_NORDIC_CORDIO",
                "TARGET_NRF52",
                "TARGET_NRF52840",
                "TARGET_NRF5x",
                "TARGET_RELEASE",
                "TARGET_RTOS_M4_M7",
                "TARGET_SDK_15_0",
                "TARGET_SOFTDEVICE_NONE",
                "TOOLCHAIN_GCC",
                "TOOLCHAIN_GCC_ARM",
                "WSF_MAX_HANDLERS=10",
                "MBED_NO_GLOBAL_USING_DIRECTIVE=1",
                "CORE_MAJOR=4",
                "CORE_MINOR=2",
                "CORE_PATCH=1",
                "USE_ARDUINO_PINOUT",
                "ARDUINO=10810",
                "ARDUINO_ARCH_MBED",
                ""
            ],
            "cStandard": "gnu11",
            "cppStandard": "gnu++14",
            "compilerPath": "/Users/bagsiu/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc",
            "compilerArgs": [
                "-mcpu=cortex-m4",
                "-mfloat-abi=softfp",
                "-mfpu=fpv4-sp-d16",
                "-mthumb",
                "-iprefix/Users/bagsiu/.platformio/packages/framework-arduino-mbed/cores/arduino",
                "@/Users/bagsiu/.platformio/packages/framework-arduino-mbed/variants/ARDUINO_NANO33BLE/includes.txt",
                "-mfloat-abi=soft",
                "-mfpu=fpv4-sp-d16",
                ""
            ]
        }
    ],
    "version": 4
}

The build, upload was successful and it worked. But Intellisense doesn’t work.

My test code(main.cpp) is:

#include <Arduino.h>

void setup()
{
	pinMode(LED_BUILTIN, OUTPUT);
	digitalWrite(LED_BUILTIN, HIGH);
	digitalWrite(LED_BUILTIN, LOW);
}

void loop()
{
	digitalWrite(LED_BUILTIN, HIGH);
	delay(1000);
	digitalWrite(LED_BUILTIN, LOW);
	delay(1000);
}