PlatformIO Community

Clion errors on ALL F() and ICACHE_FLASH_ATTR macros

Hello All,

CLion for OS X is flagging all my F() and ICACHE_FLASH_ATTR macro invocations as errors with the message: “Argument to ‘section’ attribute is not valid for this target: mach-o section specifier requires a segment and section separated by a comma”

The platformio build process works great and I have no issues at all installing on my ESP8266 board. Based on the error message, it appears that CLion is incorrectly assuming that I’m building for a mach-o architecture and applying some platform specific code validation. I’ve looked all over the CLion preferences and I haven’t found any settings that affect it.

I’m starting a major refactor and I can’t see the real warnings between all the false alarms. Anyone have any ideas?

-eric

This is very strange. We provide a path to GCC toolchain, CLion should use it. See https://github.com/platformio/platformio-core/blob/develop/platformio/ide/tpls/clion/CMakeListsPrivate.txt.tpl#L16

I have the same topic with the F() Makro.

CLion 2020.1.1
Build #CL-201.7223.86, built on April 29, 2020
Licensed to CLion Evaluator
Expiration date: June 27, 2020
Runtime version: 11.0.6+8-b765.40 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.4
GC: ParNew, ConcurrentMarkSweep
Memory: 1987M
Cores: 12
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins: com.jetbrains.plugins.ini4idea, intellij.clion.embedded.platformio

PlatformIO Plugin Version 1.1
PlatformIO Version 4.3.4

I followed the installation instruction on PlatformIO for CLion.

Any help is appreciated,
Markus