question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Atomics are not recognized (IEP-554)

See original GitHub issue

Describe the bug stdatomic.h functions and macros are shown in red in Eclipse with the IDF plugin. I’m not sure if this is an issue in the Eclipse itself or specific to the ESP-IDF plugin.

To Reproduce

#include <stdatomic.h>
atomic_int a_handle;

Expected behavior Eclipse recognizes the atomic_int keyword.

Screenshots Screenshot from 2021-10-27 13-10-24

Environment Information: eclipse_info.txt

ESP-IDF Tools Information:

* xtensa-esp32-elf: Toolchain for Xtensa (ESP32) based on GCC
  - esp-2021r2-8.4.0 (recommended, installed)
* xtensa-esp32s2-elf: Toolchain for Xtensa (ESP32-S2) based on GCC
  - esp-2021r2-8.4.0 (recommended, installed)
* xtensa-esp32s3-elf: Toolchain for Xtensa (ESP32-S3) based on GCC
  - esp-2021r2-8.4.0 (recommended, installed)
* xtensa-clang: LLVM for Xtensa (ESP32, ESP32-S2) based on clang (optional)
  - 12.0.1-d9341b81fc (recommended)
* riscv32-esp-elf: Toolchain for 32-bit RISC-V based on GCC
  - esp-2021r2-8.4.0 (recommended, installed)
* esp32ulp-elf: Toolchain for ESP32 ULP coprocessor
  - 2.28.51-esp-20191205 (recommended, installed)
* esp32s2ulp-elf: Toolchain for ESP32-S2 and ESP32-S3 ULP coprocessors
  - 2.28.51-esp-20191205 (recommended, installed)
* cmake: CMake build system (optional)
  - 3.20.3 (recommended, installed)
* openocd-esp32: OpenOCD for ESP32
  - v0.10.0-esp32-20210902 (recommended, installed)
* ninja: Ninja build system (optional)
  - 1.10.2 (recommended, installed)

IDF Eclipse Plugin Version: Version: 2.2.0.202108131352

Eclipse Error log: There are no errors in the build commands, and the “Error log” tab is empty.

List of unsupported reserved words Eclipse does not recognize the following keywords:

  • atomic_xxx functions defined in <stdatomic.h>
  • DIR, DT_DIR and others in <dirent.h>
  • SDMMC_SLOT_FLAG_INTERNAL_PULLUP defined in driver/sdmmc_host.h (although I can navigate to its definition)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
sigmaaacommented, Nov 10, 2021

Hi @dizcza, sorry for the late reply. Looks like this issue in the eclipse itself https://bugs.eclipse.org/bugs/show_bug.cgi?id=445297#c8. The indexer does not recognize the _Atomic keyword, which subsequently leads to the mentioned problem. I don’t see the indexer issue for the identical library for c++ - <atomic>, so you can try to use it as a workaround, but you need to convert your project to c++.

fix related to the dirent.h is on the master branch now and we will include it to the next release. I’ll take a look on the issue related to the driver/sdmmc_host.h and will keep you updated. Thanks for reporting it

0reactions
Samg381commented, Sep 22, 2022

This is still an issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Atomics - JavaScript - MDN Web Docs - Mozilla
Chrome Edge Firefox Atomics Full support. Chrome68. Toggle history Full support. Edge79. Toggle history Full s... add Full support. Chrome68. Toggle history Full support. Edge79....
Read more >
A simple guide to atomics in C++ - Dev Genius
If any atomic operations are not supported by the current CPU, the compiler will use mutex-based fallbacks. Thankfully, there's a useful ...
Read more >
Atomics in AArch64 - by Jim Cownie - CPU fun
In this post we'll look at the performance of a simple atomic operation on a couple of Arm® AArch64 machines. In particular we'll...
Read more >
Why doesn't std::atomic initialisation do atomic release so ...
Is there some extremely pressing reason why std::atomic with a value consuming constructor does not initialise itself with release semantics? If ...
Read more >
Toward a Better Use of C11 Atomics - Part 1
Unfortunately, not all problems with the specification of atomics were recognized before the C11 and C++11 standards were published.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found