CLion + PlatformIO Configuration Problems (Manjaro)

Hey guys, iwas looking everywhere but did not find anything for my case:
I’m using the Arch based Manjaro Linux Distro and i’m trying to get CLion with PlatformIO up and running. I can build and upload my Code to the Board I’m using (Arduino Portenta H7) but CLion throws errors and ist not recognizing imports like #include <Arduino.h>. See the screenshots.
My project is just some new Project.

I found some guys solving similar problems by changing the toolchain to MinGW but they were on Windows and i have no idea what to do on my linux machine:
missing header files (community.platformio.org)
arduino-h-not-found (community.platformio.org)

When I “Re-Init” my project this error is popping up:

Cannot get compiler information:
	Compiler exited with error code 1: /home/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-g++ -xc++ -DARDUINO=10810 -DARDUINO_ARCH_MBED -DARDUINO_PORTENTA_H7_M7 -DARM_MATH_CM7 -DBT_UART_NO_3M_SUPPORT -DCM4_BOOT_BY_APPLICATION -DCOMPONENT_4343W_FS=1 -DCOMPONENT_CYW43XXX=1 -DCOMPONENT_FLASHIAP=1 -DCOMPONENT_QSPIF=1 -DCOMPONENT_WHD=1 -DCORE_CM7 -DCORE_MAJOR=3 -DCORE_MINOR=0 -DCORE_PATCH=1 -DCYW43XXX_UNBUFFERED_UART -DDEVICE_ANALOGIN=1 -DDEVICE_ANALOGOUT=1 -DDEVICE_CAN=1 -DDEVICE_CRC=1 -DDEVICE_EMAC=1 -DDEVICE_FLASH=1 -DDEVICE_I2C=1 -DDEVICE_I2CSLAVE=1 -DDEVICE_I2C_ASYNCH=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_LPTICKER=1 -DDEVICE_MPU=1 -DDEVICE_PORTIN=1 -DDEVICE_PORTINOUT=1 -DDEVICE_PORTOUT=1 -DDEVICE_PWMOUT=1 -DDEVICE_QSPI=1 -DDEVICE_RESET_REASON=1 -DDEVICE_RTC=1 -DDEVICE_SERIAL=1 -DDEVICE_SERIAL_FC=1 -DDEVICE_SLEEP=1 -DDEVICE_SPI=1 -DDEVICE_SPISLAVE=1 -DDEVICE_SPI_ASYNCH=1 -DDEVICE_STDIO_MESSAGES=1 -DDEVICE_TRNG=1 -DDEVICE_USBDEVICE=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -DEXTRA_IDLE_STACK_REQUIRED -DFEATURE_BLE=1 -DMBEDTLS_FS_IO -DMBEDTLS_SHA1_C -DMBED_BUILD_TIMESTAMP=1648633310.1874359 -DMBED_NO_GLOBAL_USING_DIRECTIVE=1 -DMBED_TICKLESS -DMETAL_INTERNAL -DMETAL_MAX_DEVICE_REGIONS=2 -DNO_ATOMIC_64_SUPPORT -DPLATFORMIO=50300 -DQSPI_NO_SAMPLE_SHIFT -DRPMSG_BUFFER_SIZE=100 -DSTM32H747xx -DTARGET_CORDIO -DTARGET_CORTEX -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M7 -DTARGET_LIKE_MBED -DTARGET_M7 -DTARGET_MCU_STM32 -DTARGET_MCU_STM32H7 -DTARGET_MCU_STM32H747xI -DTARGET_NAME=PORTENTA_H7_M7 -DTARGET_PORTENTA_H7 -DTARGET_PORTENTA_H7_M7 -DTARGET_RELEASE -DTARGET_RTOS_M4_M7 -DTARGET_STM -DTARGET_STM32H7 -DTARGET_STM32H747xI -DTARGET_STM32H747xI_CM7 -DTOOLCHAIN_GCC -DTOOLCHAIN_GCC_ARM -DTRANSACTION_QUEUE_SIZE_SPI=2 -DUSB_DYNAMIC_CONFIGURATION -DUSE_ARDUINO_PINOUT -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DVIRTIO_MASTER_ONLY -D__CMSIS_RTOS -D__CORTEX_M7 -D__FPU_PRESENT=1 -D__MBED_CMSIS_RTOS_CM -D__MBED__=1 -Wvla -fno-rtti -std=gnu++14 -DAPPLICATION_ADDR=0x8040000 -DAPPLICATION_RAM_ADDR=0x24000000 -DAPPLICATION_RAM_SIZE=0x80000 -DAPPLICATION_SIZE=0xc0000 -DMBED_RAM1_SIZE=0x80000 -DMBED_RAM1_START=0x24000000 -DMBED_RAM_SIZE=0x80000 -DMBED_RAM_START=0x24000000 -DMBED_ROM_SIZE=0x100000 -DMBED_ROM_START=0x8000000 -DMBED_TRAP_ERRORS_ENABLED=1 -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -c -fdata-sections -ffunction-sections -fmessage-length=0 -fomit-frame-pointer -funsigned-char -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -mthumb -iprefix/home/benjo/.platformio/packages/framework-arduino-mbed/cores/arduino -iwithprefixbefore/mbed -iwithprefixbefore/mbed/cmsis -iwithprefixbefore/mbed/cmsis/CMSIS_5 -iwithprefixbefore/mbed/cmsis/CMSIS_5/CMSIS -iwithprefixbefore/mbed/cmsis/CMSIS_5/CMSIS/RTOS2 -iwithprefixbefore/mbed/cmsis/CMSIS_5/CMSIS/RTOS2/Include -iwithprefixbefore/mbed/cmsis/CMSIS_5/CMSIS/RTOS2/RTX -iwithprefixbefore/mbed/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Config -iwithprefixbefore/mbed/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Include -iwithprefixbefore/mbed/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Include1 -iwithprefixbefore/mbed/cmsis/CMSIS_5/CMSIS/RTOS2/RTX/Source -iwithprefixbefore/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M -iwithprefixbefore/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include -iwithprefixbefore/mbed/cmsis/device -iwithprefixbefore/mbed/cmsis/device/RTE -iwithprefixbefore/mbed/cmsis/device/RTE/include -iwithprefixbefore/mbed/cmsis/device/rtos -iwithprefixbefore/mbed/cmsis/device/rtos/include -iwithprefixbefore/mbed/connectivity -iwithprefixbefore/mbed/connectivity/FEATURE_BLE -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/include -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/include/ble -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/include/ble/common -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/include/ble/compatibility -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/include/ble/compatibility/ble -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/include/ble/driver -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/include/ble/gap -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/include/ble/gatt -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/include/ble/services -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/libraries -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/libraries/cordio_stack -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/include -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/sources -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/sources/hci -iwithprefixbefore/mbed/connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/sources/hci/dual_chip -
...
...
...
	End of search list.
	<command-line>:0:1: error: macro names must be identifiers

Thank you very much for any help :slight_smile:

Maybe it doesn’t it doesn’t like that macro? Can’t find any other suspicious looking macros after a quick look.

In any case, please report to Issues · platformio/platformio-core · GitHub.