PlatformIO Code Integration on Arch - Arduino.h errors, no troubleshoot, no fix found

This is my last try to find out how to solve these issues.

I use arch linux KDE and I’m trying to use the Platformio Extension in Code (OSS) (Packman pkg code.

Upon installing I immediately get the errors and its for the Arduino.h Library.

Rebuilding IntelliSense doesnt work.

Unknown argument ‘-mlongcalls’; did you mean ‘-mlong-calls’?
Unknown argument: ‘-fstrict-volatile-bitfields’
Unknown argument: ‘-fno-tree-switch-conversion’
Unsupported option ‘-mlong-calls’ for target ‘x86_64-pc-linux-gnu’
In included file: ‘machine/endian.h’ file not found

I created the project from scratch using PIO Home in the IDE and immediately I’m getting these error.

My environment:

  • Code Version: 1.114.0-1
  • PlatformIO Extension Ver: 6.1.19
  • OS: Arch

Thanks in advance!

PlatformIO depends on the proprietary Microsoft C/C++ extension, so how can that be in the OSS extension store? Are you sure it’s officially published by PlatformIO, or some fork that attempted to change the Intellisense engine to clangd?

Did you create a project for an ESP32? Usually the ESP32 toolchain has that option. But then something tells me it hasn’t properly forwarded the compiler path (xtensa) and just tries to use your local GCC.

Have you tried cleanly reainstalling PlatformIO core and VSCode and the PlatformIO VSCode extension through AUR (en) - visual-studio-code-bin? (rm -rf ~/.platformio to remove the old PlatformIO instance.)

I feel stupid but that was the issue. I didn’t look at the publisher in the other IDE. The AUR vscode IDE did the trick for me.

Thank you very much

1 Like