Hi, previously it was possible to have the product ID as a compile-time definition; however it seems that recently there has been a change which causes the value to be output as a string rather than a number!
Example settings.json entry:
{"particle.compileDefines": [
"PRD_ID=91"]
}
Expectation (and previous behavior): build script should have -DPRD_ID=91 as switch statement
Behavior now: build script has -DPRD_ID='91'
It seems that this has changed sometime between April 2021 and now
As a side note, VSCode seems to require a reboot before intellisense picked up the change in value, however it does present it as a number (not a string)
#define PRD_ID 91
------------ audit output start ----------
{
"username": ,
"workspace": {
"name": "100034-001_Particle_FW",
"isWorkspace": false,
"folders": [
{
"location": "",
"hasValidPath": true,
"settings": {
"firmwareName": "deviceOS",
"firmwareVersion": "2.2.0",
"targetDevice": "2f0033001650483553353920",
"targetPlatform": "electron",
"compileButtonAction": "localAppDeviceOS",
"flashButtonAction": "localAppDeviceOS",
"disableWelcomeScreen": false,
"disableDeviceOSOutdatedCheck": false,
"disableLocalCompilerDirtyCheck": false,
"enableVerboseLocalCompilerLogging": true,
"compileDefines": [
"PRD_ID=7571"
],
"customDeviceOSLocation": "",
"maxAllowedToolchains": 4
},
"files": [
<redacted_list>
"target",
"target\1.5.2",
"target\2.0.1",
"target\2.2.0"
]
}
]
},
"cli": {
"binpath": "c:\Users\\.vscode\extensions\particle.particle-vscode-core-1.14.4\src\cli\bin\windows\amd64\particle.exe",
"ok": true,
"version": "2.16.0",
"installed": 1634798451630
},
"localCompiler": {
"ok": true,
"dependencies": [
{
"id": "deviceOS@2.2.0",
"ok": true
},
{
"id": "gcc-arm@9.2.1",
"ok": true
},
{
"id": "buildtools@1.1.1",
"ok": true
},
{
"id": "buildscripts@1.10.0",
"ok": true
},
{
"id": "openocd@0.11.2-adhoc6ea4372.0",
"ok": true
},
{
"id": "deviceOS@2.0.1",
"ok": true
},
{
"id": "deviceOS@1.5.2",
"ok": true
},
{
"id": "gcc-arm@5.3.1",
"ok": true
}
]
},
"platform": {
"os": "windows",
"type": "Windows_NT",
"release": "10.0.19042",
"arch": "x64",
},
"homeDir": "C:\Users\",
"particleDir": "C:\Users\\.particle",
"particleToolchainDir": "C:\Users\\.particle\toolchains"
},
"env": {
},
"versions": {
"node": "14.16.0",
"v8": "9.1.269.39-electron.0",
"uv": "1.40.0",
"zlib": "1.2.11",
"brotli": "1.0.9",
"ares": "1.16.1",
"modules": "89",
"nghttp2": "1.41.0",
"napi": "7",
"llhttp": "2.1.3",
"openssl": "1.1.1",
"cldr": "38.0",
"icu": "68.1",
"tz": "2021a",
"unicode": "13.0",
"electron": "13.5.1"
},
"vscode": {
"appName": "Visual Studio Code",
"appRoot": "c:\\Users\\<redacted>\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
"machineId": "<redacted>",
"sessionId": "<redacted>",
"version": "1.61.2"
},
"extensions": [
{
"id": "ms-vscode-remote.remote-wsl-recommender",
"version": "0.0.11"
},
{
"id": "ms-vscode.js-debug",
"version": "1.61.0"
},
{
"id": "ms-vscode.js-debug-companion",
"version": "1.0.15"
},
{
"id": "ms-vscode.references-view",
"version": "0.0.81"
},
{
"id": "ms-vscode.vscode-js-profile-table",
"version": "0.0.18"
},
{
"id": "alefragnani.Bookmarks",
"version": "13.2.2"
},
{
"id": "christian-kohler.npm-intellisense",
"version": "1.4.0"
},
{
"id": "dbaeumer.vscode-eslint",
"version": "2.2.2"
},
{
"id": "eg2.vscode-npm-script",
"version": "0.3.23"
},
{
"id": "marus25.cortex-debug",
"version": "0.4.7"
},
{
"id": "ms-python.anaconda-extension-pack",
"version": "1.0.1"
},
{
"id": "ms-python.python",
"version": "2021.10.1365161279"
},
{
"id": "ms-python.vscode-pylance",
"version": "2021.10.2"
},
{
"id": "ms-toolsai.jupyter",
"version": "2021.9.1101343141"
},
{
"id": "ms-toolsai.jupyter-keymap",
"version": "1.0.0"
},
{
"id": "ms-toolsai.jupyter-renderers",
"version": "1.0.3"
},
{
"id": "ms-vscode.cpptools",
"version": "1.7.1"
},
{
"id": "octref.vetur",
"version": "0.35.0"
},
{
"id": "particle.particle-vscode-core",
"version": "1.14.4"
},
{
"id": "particle.particle-vscode-pack",
"version": "1.14.4"
},
{
"id": "particle.particle-vscode-snippets",
"version": "1.14.4"
},
{
"id": "particle.particle-vscode-theme",
"version": "1.14.4"
},
{
"id": "redhat.vscode-yaml",
"version": "1.0.0"
},
{
"id": "toba.vsfire",
"version": "1.4.1"
}
]
}