Skip to main content
HMüll.4
Senior
April 28, 2025
Solved

New and clean CubeIDE/MX project does not compile

  • April 28, 2025
  • 3 replies
  • 675 views

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!

 

Best answer by HMüll.4

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.

 

3 replies

TDK
Super User
April 28, 2025

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.
Super User
April 28, 2025

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

 

HMüll.4
HMüll.4AuthorBest answer
Senior
April 29, 2025

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.
Super User
April 29, 2025

It is supported in more recent toolchains for CubeIDE.