nigelb / platform-apollo3blue

AmbiqMicro Apollo 3 Blue: development platform for PlatformIO
Apache License 2.0
29 stars 12 forks source link

suprious warnings with core v1 for c_cpp_properties.json #27

Closed jerabaul29 closed 2 years ago

jerabaul29 commented 2 years ago

I installed the platformio artemis core v1 (corresponding to this branch: https://github.com/sparkfun/Arduino_Apollo3/tree/v1 ), and set up my package.json following this:

jr@T490:~/.platformio/packages/framework-arduinoapollo3@1.2.3$ cat package.json 
{
    "name": "framework-arduinoapollo3",
    "description": "A bare metal Arduino core for Ambiq Apollo3 based boards",
    "version": "1.2.3",
    "url": "https://github.com/sparkfun/Arduino_Apollo3"
}

Things work mostly well, but I get quite a few spurious warnings for c_cpp_properties.json . I think these are warnings for tools that are in the core v2 but not the core v1 (putting the copy of the errors at the bottom).

[{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/uecc/micro-ecc\".",
    "startLineNumber": 26,
    "startColumn": 17,
    "endLineNumber": 26,
    "endColumn": 131
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/ambiq\".",
    "startLineNumber": 27,
    "startColumn": 17,
    "endLineNumber": 27,
    "endColumn": 137
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/include\".",
    "startLineNumber": 28,
    "startColumn": 17,
    "endLineNumber": 28,
    "endColumn": 139
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/ambiq/apollo3\".",
    "startLineNumber": 29,
    "startColumn": 17,
    "endLineNumber": 29,
    "endColumn": 145
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/apps/app\".",
    "startLineNumber": 30,
    "startColumn": 17,
    "endLineNumber": 30,
    "endColumn": 136
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/apps/app/include\".",
    "startLineNumber": 31,
    "startColumn": 17,
    "endLineNumber": 31,
    "endColumn": 144
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/services\".",
    "startLineNumber": 32,
    "startColumn": 17,
    "endLineNumber": 32,
    "endColumn": 136
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/stack/hci\".",
    "startLineNumber": 33,
    "startColumn": 17,
    "endLineNumber": 33,
    "endColumn": 137
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/stack/cfg\".",
    "startLineNumber": 34,
    "startColumn": 17,
    "endLineNumber": 34,
    "endColumn": 137
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/sec/include\".",
    "startLineNumber": 35,
    "startColumn": 17,
    "endLineNumber": 35,
    "endColumn": 139
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/sec/common\".",
    "startLineNumber": 36,
    "startColumn": 17,
    "endLineNumber": 36,
    "endColumn": 138
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/include\".",
    "startLineNumber": 37,
    "startColumn": 17,
    "endLineNumber": 37,
    "endColumn": 140
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/sw/util\".",
    "startLineNumber": 38,
    "startColumn": 17,
    "endLineNumber": 38,
    "endColumn": 140
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/sw/wsf/ambiq\".",
    "startLineNumber": 39,
    "startColumn": 17,
    "endLineNumber": 39,
    "endColumn": 145
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/sw/wsf/include\".",
    "startLineNumber": 40,
    "startColumn": 17,
    "endLineNumber": 40,
    "endColumn": 147
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/stack/include\".",
    "startLineNumber": 41,
    "startColumn": 17,
    "endLineNumber": 41,
    "endColumn": 141
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/profiles\".",
    "startLineNumber": 42,
    "startColumn": 17,
    "endLineNumber": 42,
    "endColumn": 136
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/profiles/gatt\".",
    "startLineNumber": 43,
    "startColumn": 17,
    "endLineNumber": 43,
    "endColumn": 141
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/profiles/gap\".",
    "startLineNumber": 44,
    "startColumn": 17,
    "endLineNumber": 44,
    "endColumn": 140
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/uecc/micro-ecc\".",
    "startLineNumber": 72,
    "startColumn": 21,
    "endLineNumber": 72,
    "endColumn": 135
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/ambiq\".",
    "startLineNumber": 73,
    "startColumn": 21,
    "endLineNumber": 73,
    "endColumn": 141
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/include\".",
    "startLineNumber": 74,
    "startColumn": 21,
    "endLineNumber": 74,
    "endColumn": 143
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/ambiq/apollo3\".",
    "startLineNumber": 75,
    "startColumn": 21,
    "endLineNumber": 75,
    "endColumn": 149
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/apps/app\".",
    "startLineNumber": 76,
    "startColumn": 21,
    "endLineNumber": 76,
    "endColumn": 140
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/apps/app/include\".",
    "startLineNumber": 77,
    "startColumn": 21,
    "endLineNumber": 77,
    "endColumn": 148
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/services\".",
    "startLineNumber": 78,
    "startColumn": 21,
    "endLineNumber": 78,
    "endColumn": 140
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/stack/hci\".",
    "startLineNumber": 79,
    "startColumn": 21,
    "endLineNumber": 79,
    "endColumn": 141
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/stack/cfg\".",
    "startLineNumber": 80,
    "startColumn": 21,
    "endLineNumber": 80,
    "endColumn": 141
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/sec/include\".",
    "startLineNumber": 81,
    "startColumn": 21,
    "endLineNumber": 81,
    "endColumn": 143
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/sec/common\".",
    "startLineNumber": 82,
    "startColumn": 21,
    "endLineNumber": 82,
    "endColumn": 142
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/include\".",
    "startLineNumber": 83,
    "startColumn": 21,
    "endLineNumber": 83,
    "endColumn": 144
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/sw/util\".",
    "startLineNumber": 84,
    "startColumn": 21,
    "endLineNumber": 84,
    "endColumn": 144
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/sw/wsf/ambiq\".",
    "startLineNumber": 85,
    "startColumn": 21,
    "endLineNumber": 85,
    "endColumn": 149
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/ws-core/sw/wsf/include\".",
    "startLineNumber": 86,
    "startColumn": 21,
    "endLineNumber": 86,
    "endColumn": 151
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/stack/include\".",
    "startLineNumber": 87,
    "startColumn": 21,
    "endLineNumber": 87,
    "endColumn": 145
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/profiles\".",
    "startLineNumber": 88,
    "startColumn": 21,
    "endLineNumber": 88,
    "endColumn": 140
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/profiles/gatt\".",
    "startLineNumber": 89,
    "startColumn": 21,
    "endLineNumber": 89,
    "endColumn": 145
},{
    "resource": "/home/jr/Desktop/Current/test_platformio_artemis/.vscode/c_cpp_properties.json",
    "owner": "/home/jr/Desktop/Current/test_platformio_artemis",
    "severity": 4,
    "message": "Cannot find \"/home/jr/.platformio/packages/framework-arduinoapollo3@1.2.3/cores/arduino/am_sdk_ap3/third_party/exactle/sw/profiles/gap\".",
    "startLineNumber": 90,
    "startColumn": 21,
    "endLineNumber": 90,
    "endColumn": 144
}]
nigelb commented 2 years ago

Hi @jerabaul29,

Try using the updated method of using core_v1 described here.

There is no longer a need to check out the v1 branch, it is all integrated into the main branch.

jerabaul29 commented 2 years ago

Aaah, thanks :) Sorry I was confused and missed it. Maybe making this even more clear in the readme, ie that there is no longer need to tweak things by hand and that there is an out of the box solution, and showing an example already in the readme with both core v1 and core v2, would be helpful for future users? :) . I will try it tonight again :) .

nigelb commented 2 years ago

Sorry, I misread the url and thought you checked out the V1 branch of this repo.

I will have another look.

nigelb commented 2 years ago

have you tried updating the ide files with pio init --ide vscode

jerabaul29 commented 2 years ago

Ok, no worries, do you mean I was doing the correct thing actually? :) .

jerabaul29 commented 2 years ago

No, I have not pio init --ide vscode, I can try this, thanks :) . Will look at it hopefully tonight otherwise will try to do it this week and let you know.

nigelb commented 2 years ago

Ha, I now finally realise the issue you are seeing. I don't normally use vscode and did not understand what issues you were talking about with a c_cpp_properties.json file. Now I know what we are dealing with I should be able to fix the issues.

jerabaul29 commented 2 years ago

😊😇👌👍 Many thanks!

Just curious: what alternative to VSC do you use to run this and platformio?

nigelb commented 2 years ago

For small test programs I generally use vim and for projects I have been using CLion. However, in the last few weeks I have started playing with vscode, and quite like it.

jerabaul29 commented 2 years ago

Ok, thanks for the info. I did not know that it was possible to run platformio with vim.

VSCode is a bit slow at times, uses a lot of RAM, and not all modal edition commands are available even with the vim-mod package, but it works well enough and is becoming kind of a standard I guess :) .

nigelb commented 2 years ago

Hi @jerabaul29, please update platform-apollo3blue and let me know if that resolves your issue.

jerabaul29 commented 2 years ago

I did a:

jr@T490:~/.platformio/platforms/apollo3blue$ git pull

and 1) the warnings are gone, 2) it still compiles fine :) . Amazing, many thanks, feel free to close :) .