wagiminator / Development-Boards

Collection of various development boards for microcontrollers (e.g., CH55x, CH32, PY32, STC8, STM32) and accompanying example software.
Other
139 stars 19 forks source link

Build for CH32X035 on Fedora / gcc 14 without build-id section #7

Open frank-zago opened 1 month ago

frank-zago commented 1 month ago

First, thanks for that nice framework for all these chips.

After installing the gcc riscv4 compiler, none of the examples would work. After investigating, I noticed that gcc put the build id section at the start of the firmware. I had to add "-Wl,...,--build-id=none" on the linker flags for the section to not be emitted, and examples started to work. That feature may be a default for that version of gcc now, so eventually people may see that issue ???

Old SO entry for that issue, with a couple more solutions: https://stackoverflow.com/questions/15316384/do-not-pass-build-id-to-linker-from-gcc

wagiminator commented 1 month ago

Thank you for the hint! I am currently traveling and therefore cannot test if the compiler flag causes any issues for me. Once I am back home next week, I will try it out and possibly make the flag the default.

wagiminator commented 1 month ago

I tested the compiler flag, and it doesn't cause any issues. I am currently adapting the codebase to PlatformIO, and in this process, I will make the flag the default.