VS Code flags uint32_t
declarations as an error, not recognizing the type. This only occurs when the workspace is configured for a MESH device (argon / boron / xenon). Ironically, system_tick_t
which is just a typedef of uint32_t
is recognized properly. I’ve tried both rc26 / rc27 with same results.
The toolchain compiles everything successfully - this is just an Intellisense issue from what I can see. I’m guessing there is some include error or something accidentally overriding the typedef in the mesh config.
Screenshot:
Issue is not present when all extensions disabled (though of course it isn’t really recognized / defined as anything at all in that case)
Audit Env:
*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245
{
"workspace": {
"name": "test-project",
"isWorkspace": false,
"folders": [
{
"location": "/Users/justicereed/Documents/Engineering/Hardware/test-project",
"settings": {
"firmwareName": "deviceOS",
"firmwareVersion": "0.8.0-rc.26",
"targetDevice": "",
"targetPlatform": "argon",
"disableWelcomeScreen": false
},
"files": [
".vscode",
".vscode/launch.json",
".vscode/settings.json",
"README.md",
"project.properties",
"src",
"src/test-project.cpp",
"src/test-project.ino",
"target",
"target/obj",
"target/test-project.bin",
"target/test-project.bin.crc_block",
"target/test-project.bin.no_crc",
"target/test-project.elf",
"target/test-project.hex",
"target/test-project.lst",
"target/test-project.map"
]
}
]
},
"cli": {
"binpath": "/Users/justicereed/.vscode/extensions/particle.particle-vscode-core-1.0.0-alpha.7/src/cli/bin/darwin/amd64/particle",
"ok": true,
"version": "1.37.0"
},
"localCompiler": {
"dependencies": [
"deviceOS@1.0.0",
"gcc-arm@5.3.1",
"buildtools@1.0.1",
"buildscripts@1.0.1",
"deviceOS@0.8.0-rc.27",
"deviceOS@0.8.0-rc.26",
"deviceOS@0.7.0",
"deviceOS@0.6.4",
"gcc-arm@4.9.3",
"deviceOS@0.6.3"
]
},
"platform": {
"os": "darwin",
"type": "Darwin",
"release": "18.0.0",
"arch": "x64",
"path": {
"key": "PATH",
"value": "/Users/justicereed/.nvm/versions/node/v8.9.4/bin:/Users/justicereed/Library/Python/3.6/bin:/Users/justicereed/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin"
},
"homeDir": "/Users/justicereed",
"particleDir": "/Users/justicereed/.particle",
"localCompilerToolchainDir": "/Users/justicereed/.particle/toolchains"
},
"env": {
"TMPDIR": "/var/folders/60/_39c6nf109v28rbbvzcwwxnh0000gn/T/",
"__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x0",
"SHELL": "/bin/bash",
"HOME": "/Users/justicereed",
"Apple_PubSub_Socket_Render": "/private/tmp/com.apple.launchd.d5yGv5hPUK/Render",
"SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.CEQc881I3b/Listeners",
"PATH": "/Users/justicereed/.nvm/versions/node/v8.9.4/bin:/Users/justicereed/Library/Python/3.6/bin:/Users/justicereed/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin",
"LOGNAME": "justicereed",
"XPC_SERVICE_NAME": "com.microsoft.VSCode.1508",
"USER": "justicereed",
"XPC_FLAGS": "0x0",
"VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
"VSCODE_NODE_CACHED_DATA_DIR": "/Users/justicereed/Library/Application Support/Code/CachedData/61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8",
"VSCODE_LOGS": "/Users/justicereed/Library/Application Support/Code/logs/20190124T120854",
"VSCODE_IPC_HOOK": "/Users/justicereed/Library/Application Support/Code/1.30.2-main.sock",
"VSCODE_PID": "50376",
"NVM_BIN": "/Users/justicereed/.nvm/versions/node/v8.9.4/bin",
"NVM_CD_FLAGS": "",
"NVM_DIR": "/Users/justicereed/.nvm",
"PWD": "/",
"SHLVL": "1",
"_": "/Applications/Visual Studio Code.app/Contents/MacOS/Electron",
"AMD_ENTRYPOINT": "vs/workbench/node/extensionHostProcess",
"PIPE_LOGGING": "true",
"VERBOSE_LOGGING": "true",
"VSCODE_IPC_HOOK_EXTHOST": "/var/folders/60/_39c6nf109v28rbbvzcwwxnh0000gn/T/vscode-ipc-0c255b63-d997-4de3-867f-40e97237b032.sock",
"VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
"VSCODE_LOG_STACK": "false",
"VSCODE_LOG_LEVEL": "undefined",
"VSCODE_PREVENT_FOREIGN_INSPECT": "true",
"CRASH_REPORTER_START_OPTIONS": "{\"companyName\":\"Microsoft\",\"productName\":\"VSCode\",\"submitURL\":\"https://rink.hockeyapp.net/api/2/apps/21a48a66799e47fea4f52c0ff81e803d/crashes/upload\",\"extra\":{\"vscode_version\":\"1.30.2\",\"vscode_commit\":\"61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8\",\"vscode_sessionId\":\"39eec5d3-1d0c-42df-aadd-e8e3f22b79331548781088271\",\"processName\":\"extensionHost\"},\"crashesDirectory\":\"/var/folders/60/_39c6nf109v28rbbvzcwwxnh0000gn/T\"}",
"ELECTRON_RUN_AS_NODE": "1",
"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true"
},
"versions": {
"http_parser": "2.7.0",
"node": "8.9.3",
"v8": "6.1.534.41",
"uv": "1.15.0",
"zlib": "1.2.11",
"ares": "1.10.1-DEV",
"modules": "57",
"nghttp2": "1.25.0",
"openssl": "1.0.2n"
},
"vscode": {
"appName": "Visual Studio Code",
"appRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
"machineId": "4cc4cb9a12ea10c756da5e4376e9dea6d7c38af8833f85573107faa9b6beb4e8",
"sessionId": "39eec5d3-1d0c-42df-aadd-e8e3f22b79331548781088271",
"version": "1.30.2"
},
"extensions": [
{
"id": "ms-vscode.node-debug",
"version": "1.30.4"
},
{
"id": "ms-vscode.node-debug2",
"version": "1.30.3"
},
{
"id": "ms-vscode.references-view",
"version": "0.0.18"
},
{
"id": "marus25.cortex-debug",
"version": "0.2.3"
},
{
"id": "ms-vscode.cpptools",
"version": "0.21.0"
},
{
"id": "particle.particle-vscode-core",
"version": "1.0.0-alpha.7"
},
{
"id": "particle.particle-vscode-snippets",
"version": "1.0.0-alpha.7"
},
{
"id": "particle.particle-vscode-theme",
"version": "1.0.0-alpha.7"
}
]
}
*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245
EDIT: the issue appears to arise from the following line of code in the toolchain:
from: nrfx_common.h
217 __STATIC_INLINE uint32_t nrfx_bitpos_to_event(uint32_t bit);
mostly because __STATIC_INLINE
is also not defined in whatever context that file is getting scraped by intellisense. If I put a define __STATIC_INLINE
in nrfx_common.h
intellisense no longer flags uint32_t as an error type.
Likely Solution
Make sure that __STATIC_INLINE
is properly defined / included at a high enough level. I assume this is passed in as a compiler option in the compilation process, but VS Code Intellisense does not have it configured as a compiler option. Adding it as a compiler option should work.
One could also simply put the following right below the includes section of nrfx_common.h
:
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif