2025-11-10 11:18 PM - edited 2025-11-10 11:33 PM
Hi everyone,
I’m using the new Arm Toolchain for Embedded with CMake. I generated a project template from STM32CubeMX using the following settings:
Compilation works fine, but when linking starts, I get this error:
ld.lld: error: STM32G474XX_FLASH.ld:105: symbol not found: READONLY
It looks like the Arm toolchain (even the latest v21.1.1) doesn’t support the READONLY keyword. It’s not a big deal to adjust the .ld file - just remove the READONLY keywords - but it would be nice if the generated template worked out of the box.
Am I missing a setting somewhere? Is there an alternative/better way to obtain the linker file?
Edit: I'm using the STM32G474.
2025-11-10 11:32 PM
Hello @gf1
Could you please provide the name of the MCU you are using?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-11-10 11:34 PM
Hello, I just added the information in the initial post. I'm using a STM32G474.
2025-11-11 1:26 AM
Hello @gf1
Could you describe the steps followed when using the Arm Toolchain for Embedded with CMake? From my side, I haven't encountered any issues when compiling with STM32CubeCLT 1.19.0.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-11-11 2:08 AM
I think the issue is that the files generated with the Starm-Clang setting aren’t fully compatible with the plain Arm Toolchain for Embedded.
To get the project to compile, I had to:
However, even after these changes, the plain Clang linker still throws the error:
symbol not found: READONLY