Skip to content

cpu/esp32: Fixes of compile problems with GCC 14.2#21245

Merged
maribu merged 3 commits intoRIOT-OS:masterfrom
gschorcht:cpu/esp32/fix_compile_problem_gcc_14.2
Mar 2, 2025
Merged

cpu/esp32: Fixes of compile problems with GCC 14.2#21245
maribu merged 3 commits intoRIOT-OS:masterfrom
gschorcht:cpu/esp32/fix_compile_problem_gcc_14.2

Conversation

@gschorcht
Copy link
Copy Markdown
Contributor

Contribution description

This PR provides some small fixes of compile problems with the latest Espressif toolchain (GCC v14.2).

Testing procedure

Compilation with used Espressif toolchain (GCC v12.2) should still work in CI.

Issues/PRs references

@github-actions github-actions bot added Area: pkg Area: External package ports Platform: ESP Platform: This PR/issue effects ESP-based platforms Area: cpu Area: CPU/MCU ports labels Feb 25, 2025
@gschorcht gschorcht added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 25, 2025
@riot-ci
Copy link
Copy Markdown

riot-ci commented Feb 25, 2025

Murdock results

✔️ PASSED

4f136fb cpu/esp32: add missing atomic built-in functions

Success Failures Total Runtime
10271 0 10271 10m:47s

Artifacts

Comment on lines +22 to +24
#if (__GNUC__ == 14) && (__GNUC_MINOR__ == 2)

#if defined(CPU_FAM_ESP32S2) || defined(CPU_FAM_ESP32C3)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#if (__GNUC__ == 14) && (__GNUC_MINOR__ == 2)
#if defined(CPU_FAM_ESP32S2) || defined(CPU_FAM_ESP32C3)
__attribute__((weak))

wouldn't this be more future-proof?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't figure out exactly why __atomic_test_and_set is missing in GCC v14.2 for ESP32-S2 and ESP32-C3 while it exists for the other ESP32x variants 🤔 The problem was only mentioned in espressif/esp-idf#15167.

Atomic built-in function __atomic_test_and_set seem to be missing in GCC 14.2.0 for some ESP32x SoCs.
@gschorcht gschorcht force-pushed the cpu/esp32/fix_compile_problem_gcc_14.2 branch from 0d7f39b to 4f136fb Compare March 2, 2025 11:39
@maribu maribu enabled auto-merge March 2, 2025 13:18
@maribu maribu added this pull request to the merge queue Mar 2, 2025
Merged via the queue into RIOT-OS:master with commit f0d5378 Mar 2, 2025
26 checks passed
@gschorcht
Copy link
Copy Markdown
Contributor Author

Thanks for reviewing and merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: cpu Area: CPU/MCU ports Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants