Skip to main content
HMüll.4
Senior
Apr 28, 2025 4:00 PM UTC
Solved

New and clean CubeIDE/MX project does not compile

Hi,

I have just set up a fresh and clean STM32F466 project in CubeMX which makes use of a UART and a bunch of GPIOs. right after generating the code (and prior to changing ANYTHING at the generated code!), I get the following compile error in CubeIDE:

c:\st\stm32cubeide_1.11.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe:C:\F\motion\STM32F446RETX_FLASH.ld:88: non constant or forward reference address expression for section .ARM.extab

Any idea how to fix that?

Thanks!

 

This topic has been closed for replies.
HMüll.4
HMüll.4Best answer
Senior
Apr 29, 2025 11:32 AM UTC

OK, finally I found it: at this position there was a statement

(READONLY)

which does not seem to be supported by the GCC-version that comes with CubeIDE.

 

4 replies

TDK
Apr 28, 2025 4:23 PM UTC

Include the IOC file you are having issues with.

Ensure you're on the latest CubeMX version.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Pavel A.
Apr 28, 2025 4:48 PM UTC

What is in C:\F\motion\STM32F446RETX_FLASH.ld line 88 ?

 

HMüll.4
HMüll.4AuthorBest answer
Senior
Apr 29, 2025 11:32 AM UTC

OK, finally I found it: at this position there was a statement

(READONLY)

which does not seem to be supported by the GCC-version that comes with CubeIDE.

 

Pavel A.
Apr 29, 2025 3:59 PM UTC

It is supported in more recent toolchains for CubeIDE.