[ISSUE] Workbench not finding header files


I’m trying to recompile some code that worked fine on Workbench several months ago. Now, cloud compile is failing as it can’t find header files:

I’ve gone through advice on similar topics, created new projects using Particle Workbench, checked settings.json files for "C_Cpp.default.configurationProvider": "particle.particle-vscode-core" everything seems in order.

I’ve uninstalled Particle Workbench and Visual Studio and reinstalled from scratch – same issue. I targeted different firmware (1.0.0 rather than 1.3.1) and got different header files reported as missing (!).

My Environment Audit is below, any suggestions would be gratefully received…

    "workspace": {
        "name": "nfc5",
        "isWorkspace": false,
        "folders": [
                "location": "/Users/tim/Dropbox/Projects/Innovatise/Technical/Particle/WorkbenchProjects/nfc5",
                "hasValidPath": true,
                "settings": {
                    "firmwareName": "deviceOS",
                    "firmwareVersion": "1.3.1-rc.1",
                    "targetDevice": "",
                    "targetPlatform": "argon",
                    "compileButtonAction": "localAppDeviceOS",
                    "flashButtonAction": "localAppDeviceOS",
                    "disableWelcomeScreen": false,
                    "disableLocalCompilerDirtyCheck": false,
                    "enableVerboseLocalCompilerLogging": false
                "files": [
    "cli": {
        "binpath": "/Users/tim/.vscode/extensions/particle.particle-vscode-core-1.5.1/src/cli/bin/darwin/amd64/particle",
        "ok": true,
        "version": "1.43.3",
        "installed": 1566593506306
    "localCompiler": {
        "ok": true,
        "dependencies": [
                "id": "deviceOS@1.3.1-rc.1",
                "ok": true
                "id": "gcc-arm@5.3.1",
                "ok": true
                "id": "buildtools@1.1.0",
                "ok": true
                "id": "buildscripts@1.6.1",
                "ok": true
                "id": "openocd@0.11.1-adhoc6ea4372.0",
                "ok": true
                "id": "deviceOS@1.0.1",
                "ok": true
                "id": "deviceOS@1.0.0",
                "ok": true
    "platform": {
        "os": "darwin",
        "type": "Darwin",
        "release": "18.7.0",
        "arch": "x64",
        "path": {
            "key": "PATH",
            "value": "/Users/tim/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        "homeDir": "/Users/tim",
        "particleDir": "/Users/tim/.particle",
        "localCompilerToolchainDir": "/Users/tim/.particle/toolchains"
    "env": {
        "TMPDIR": "/var/folders/vp/65z0cht53q3ghb31c02y1nk80000gn/T/",
        "__CF_USER_TEXT_ENCODING": "0x1F5:0:2",
        "SHELL": "/bin/bash",
        "HOME": "/Users/tim",
        "Apple_PubSub_Socket_Render": "/private/tmp/com.apple.launchd.MXdacoULjU/Render",
        "SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.8fHw5o746e/Listeners",
        "PATH": "/Users/tim/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
        "LOGNAME": "tim",
        "XPC_SERVICE_NAME": "com.microsoft.VSCode.22960",
        "USER": "tim",
        "XPC_FLAGS": "0x0",
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-gb\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
        "VSCODE_NODE_CACHED_DATA_DIR": "/Users/tim/Library/Application Support/Code/CachedData/f06011ac164ae4dc8e753a3fe7f9549844d15e35",
        "VSCODE_LOGS": "/Users/tim/Library/Application Support/Code/logs/20190823T223512",
        "VSCODE_IPC_HOOK": "/Users/tim/Library/Application Support/Code/1.37.1-main.sock",
        "VSCODE_PID": "872",
        "PWD": "/",
        "SHLVL": "1",
        "_": "/Users/tim/Applications/Visual Studio Code.app/Contents/MacOS/Electron",
        "AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
        "PIPE_LOGGING": "true",
        "VERBOSE_LOGGING": "true",
        "VSCODE_IPC_HOOK_EXTHOST": "/var/folders/vp/65z0cht53q3ghb31c02y1nk80000gn/T/vscode-ipc-f4fb2ca5-700d-4526-a99f-0fa3667b9046.sock",
        "VSCODE_LOG_STACK": "false",
        "ELECTRON_RUN_AS_NODE": "1",
    "versions": {
        "http_parser": "2.8.0",
        "node": "10.11.0",
        "v8": "6.9.427.31-electron.0",
        "uv": "1.23.0",
        "zlib": "1.2.11",
        "ares": "1.14.0",
        "modules": "69",
        "nghttp2": "1.33.0",
        "napi": "3",
        "openssl": "1.1.0",
        "icu": "62.2",
        "unicode": "11.0",
        "cldr": "33.1",
        "tz": "2019a"
    "vscode": {
        "appName": "Visual Studio Code",
        "appRoot": "/Users/tim/Applications/Visual Studio Code.app/Contents/Resources/app",
        "machineId": "6c9d2bc8f91b89624add29c0abeae7fb42bf539fa1cdb2e3e57cd668fa9bcead",
        "sessionId": "e5b0c02e-ed9f-4b5e-a4fe-b06cb99c1e341566596362200",
        "version": "1.37.1"
    "extensions": [
            "id": "ms-vscode.node-debug",
            "version": "1.35.3"
            "id": "ms-vscode.node-debug2",
            "version": "1.33.0"
            "id": "ms-vscode.references-view",
            "version": "0.0.29"
            "id": "marus25.cortex-debug",
            "version": "0.3.1"
            "id": "ms-vscode.cpptools",
            "version": "0.25.0"
            "id": "particle.particle-vscode-core",
            "version": "1.5.1"
            "id": "particle.particle-vscode-pack",
            "version": "1.5.1"
            "id": "particle.particle-vscode-snippets",
            "version": "1.5.1"
            "id": "particle.particle-vscode-theme",
            "version": "1.5.1"


ah, apologies for the bumps :pray:

ultimately, the true test is whether or not your code compiles. if it does, you can ignore these intellisense errors. admitedly, that’s not a great UX - so i’ll be working to get these intellisense issues sorted out ASAP. for a variety of reasons it’s proving to be a bit of a pain.

i assume you’ve seen this post?

couldn’t hurt to go through those steps if you haven’t already but i’m pretty sure we’re just missing some includes.

it’d be helpful if you could share the specific tokens that are unrecognized as you come across them but the screenshot you posted is helpful as-is.

either way, thanks for using Workbench :pray::+1:


Hi m_m, thanks for your reply.

More info on this – I’ve now discovered that actually Workbench cloud compile is working fine, it’s just that the error messages that come back have no bearing on reality. So if I have a bug in my code and Workbench cloud compile fails, if I take the code over to the WebIDE, debug it on the WebIDE, bring it back to Workbench and it compiles and runs fine.

So it seems like the mechanism that communicates errors from cloud compile to Visual Code Studio is broken. Any ideas on why this might be and what I could try to fix it ?


can you share an example project that reproduces the error(s) you are seeing along with the exact steps you are taking within Workbench?


Are you saying the local compile or the cloud compile in Workbench is not reporting the correct errors?
If it is cloud compile, you are probably looking at the wrong error log.
You’d have to open the correct log to show you the errors the cloud compile returned.
I know this is confusing and I’d prefer it to be different too, but once I realised how to actually see the cloud compile log I just got used to the extra drill.

This is where to find the correct log

This is the wrong log

For a local build you should also look at the TERMINAL tab an not (only) the PROBLEMS tab.


Thanks ScruffR, it’s the Cloud compile that is not reporting the correct errors. I was looking in the PROBLEMS tab, so I’ll ignore that now.

However, if I click the view log I don’t get any useful debug info:

Currently I have to copy my code into the WebIDE to debug it :grimacing:


If you can post a SHARE THIS REVISION link from Web IDE I can try to see why your error output doesn’t seem to help.
However, I’m quite sure the output you see there is exactly the same as you’d get when you hit the SHOW RAW button in Web IDE. The “normal” Web IDE error log is just a condensed view of that which is often lacking the actual reason and/or solution for the error.

The screenshot you show there seems to be the top of the entire log, the important bits would be down the bottom.


I’ve added a deliberate error to my code (mis-spelled FALSE and FARSE) and cloud compiled on Workbench. End of error log is below:

Building cpp file: src/NFC3.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p …/build/target/user/platform-12-msrc/
arm-none-eabi-gcc -DSTM32_DEVICE -DnRF52840 -DNRF52840_XXAA -DPLATFORM_THREADING=1 -DPLATFORM_ID=12 -DPLATFORM_NAME=argon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00C -DUSBD_PID_CDC=0xC00C -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DINCLUDE_PLATFORM=1 -DSOFTDEVICE_PRESENT=1 -DS140 -DPRODUCT_ID=12 -DPRODUCT_FIRMWARE_VERSION=65535 -DOPENTHREAD_PROJECT_CORE_CONFIG_FILE=“openthread-config-project.h” -DENABLE_FEM=1 -DNRF_802154_PROJECT_CONFIG=“openthread-platform-config.h” -DRAAL_SOFTDEVICE=1 -D_WIZCHIP_=W5500 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DLFS_CONFIG=lfs_config.h -DSYSTEM_VERSION_STRING=1.3.1-rc.1 -DRELEASE_BUILD -I./inc -I…/wiring/inc -I…/system/inc -I…/third_party/miniz/miniz -I…/services/inc -I…/third_party/nanopb/nanopb -I…/communication/inc -I…/hal/inc -I…/hal/shared -I…/hal/src/argon -I…/hal/network/lwip/esp32 -I…/hal/src/nRF52840 -I…/hal/src/armv7 -I…/hal/src/nRF52840 -I…/hal/src/nRF52840/lwip -I…/hal/src/nRF52840/freertos -I
at makeError (/Users/tim/.vscode/extensions/particle.particle-vscode-core-1.5.1/node_modules/execa/index.js:174:9)
at module.exports.Promise.all.then.arr (/Users/tim/.vscode/extensions/particle.particle-vscode-core-1.5.1/node_modules/execa/index.js:278:16)

If I take the same code to the WebIDE, it tells me the problem:

When I click on the SHOW RAW I get a very different raw error log on the WebIDE which ends with:

In file included from …/platform/MCU/nRF52840/inc/hw_config.h:11:0,
from …/hal/inc/usb_hal.h:43,
from …/wiring/inc/spark_wiring_usbserial.h:32,
from ./inc/application.h:49,
from ./inc/Particle.h:5,
from epdif.h:32,
from epd2in9.h:30,
from 20190827minnfc.cpp:8:
…/platform/MCU/nRF52840/inc/hw_system_flags.h:32:0: note: this is the location of the previous definition
#define RESET 0
20190827minnfc.ino: In function ‘void loop()’:
20190827minnfc.ino:143:21: error: ‘FARSE’ was not declared in this scope
firstTime = FARSE;
…/build/module.mk:277: recipe for target ‘…/build/target/user/platform-12-m20190827minnfc.o’ failed
make[2]: *** […/build/target/user/platform-12-m20190827minnfc.o] Error 1
make[2]: Leaving directory ‘/firmware/user’
…/…/…/build/recurse.mk:11: recipe for target ‘user’ failed
make[1]: *** [user] Error 2
make[1]: Leaving directory ‘/firmware/modules/argon/user-part’
…/build/recurse.mk:11: recipe for target ‘modules/argon/user-part’ failed
make: *** [modules/argon/user-part] Error 2

In summary:
– the WebIDE is fine, everything is good and working as expected
– Workbench is not fine, it seems the error log from cloud compile is not showing up correctly


Strange, this is what I get

(top Workbench, bottom Web IDE)

granted, the Workbench message is not exactly at the end of the log, but a search for error: or even a superficial scroll over the log quickly revealed where it was.