Skip to main content
Associate
November 23, 2025
Question

generated code with cubeMX can't be compiled by cubeIDE on Arch Linux

  • November 23, 2025
  • 5 replies
  • 573 views

generated a new cubeIDE project with cubeMX, for my U585I-IOT02A board, the only things I changed are PC1 pin to high level and toolchain/ide to cubeIDE.

building gives me this error : /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.100.202509120712/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld: read in flex scanner failed

 

no matter what I do or find on internet, I can't get it fixed...

 

I'm on arch linux and installed all stm32 softwares with aur and zip downloaded on the st site if needed.

5 replies

Pavel A.
Super User
November 24, 2025

Please compare your link script (.ld file) before and after re-generation of the code with CubeMX. Any unexpected differences? 

 

LJW21Author
Associate
November 24, 2025

I'm kinda new to the stm32 world, and I regenerated the files multiple times, changing more things or the fewest I could do, and nothing works...

Technical Moderator
November 24, 2025

Hallo @LJW21,

 

Let me thank you for posting.

I'm currently checking the behavior described, and I will get back to you ASAP.

 

Thanks

Mahmoud

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.
AScha.3
Super User
November 24, 2025

Which version of IDE ? 2.0 ?

Maybe try : older IDE, V 1.19.  (integrated Mx ) , generic installer;

"If you feel a post has answered your question, please click ""Accept as Solution""."
TDK
Super User
November 24, 2025

This feels like an issue due to the linux file-system being case-sensitive.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Technical Moderator
November 25, 2025

Hello @LJW21 

The behavior described is not reproduced.

Could you provide please which STM32CUBEIDE Version are you using.

How you generate the code: with STM32CubeMX Standalone or with MX integrated on IDE

I will be waiting for your feedback.

Thanks.

Mahmoud

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.
LJW21Author
Associate
November 26, 2025

I'm using standalone cubeMX version 6.16.0, and cubeIDE version 2.0.0. the complete console output is :

 

18:47:46 **** Incremental Build of configuration Debug for project test ****

make -j8 all

arm-none-eabi-gcc -o "test.elf" @"objects.list" -mcpu=cortex-m33 -T"/home/zach/Dev/test" --specs=nosys.specs -Wl,-Map="test.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.100.202509120712/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld: read in flex scanner failed

collect2: error: ld returned 1 exit status

make: *** [makefile:64: test.elf] Error 1

"make -j8 all" terminated with exit code 2. Build might be incomplete.

 

18:47:47 Build Failed. 2 errors, 0 warnings. (took 115ms)

 

 

Technical Moderator
November 27, 2025

Hello @LJW21 ,

 

Further to your comment, I did not get build error.

I generated the code with MX Standalone 6.16 and compiled the project with STM32CubeIDE 2.0.0.

GNU Tools for STM32 (13.3.rel1).

I suggest that you reinstall STM32CubeIDE.

I will be waiting for your feedback.

MahmoudBenRomdhane_0-1764232064475.png

 

Thanks.

Mahmoud

 

 

 

 

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.