Okay yeah all installed in a VM and I’m beginning to run into the same problems.
Visual Studio Code has dropped support for Intel 32-bit platforms since also Node.js has dropped it (https://github.com/microsoft/vscode-remote-release/issues/67#issuecomment-489553810). This forced me to install the last supported version, VSCode 1.35, from May 2019, from https://code.visualstudio.com/updates/v1_35. This old version parses JSON files differently than the newer versions (comments in JSON are allowed in recent versions). Thus the C/C++ extension fails to load its config files and the intellisense is just… bad, incomplete, wrong or all.
Installing the extension and PlatformIO core using the installer script went through, but after creating a project, that old VSCode version has a problem with the
// comments in the
.vscode/c_cpp_properties.json file that PlatformIO generates.
However, that can be fixed in the template that generates that file.
max@ubuntu:~$ find . -name "c_cpp_properties.json.tpl"
Editing that file and removing the
// !!! WARNING !!! AUTO-GENERATED FILE!
// PLEASE DO NOT MODIFY IT AND USE "platformio.ini":
plus a Project task -> Rebuild IntelliSense later and…
the IntelliSense is back.
Compiling and uploading works fine, too, for an Arduino Uno at least.
Note though that you’re also stuck on an older PlatformIO extension version, 1.10.0, as opposed to 2.2.1, probably because it detects that it needs a newer VSCode version. So there are tons of improvements and bugfixes that you can’t experience in the VSCode GUI. Maybe with some hacks like using an unofficial node build, paired with compiling Visual Studio Code yourself, that can be fixed, but that’s beyond me. This seems to be as good and as painless as it gets for now.
But, you can run the latest PlatformIO core version (5.x), and that’s also good and important. So using it from the CLI is completely as if you were running it on a modern x64 CPU with the latest version.
As a personal opinion, for an older 32-bit PC/Laptop I’d suggest using Xubuntu (XFCE desktop), Lubuntu (LXDE desktop) or Bionic Pup, since those are less graphics, memory and CPU intensive than Ubuntu Mainline with its Unity desktop in that version. Also see the new video from Explaining Computers at https://www.youtube.com/watch?v=aJcWcQ8ew6Q