2025-11-23 8:32 AM - last edited on 2025-12-12 6:08 AM by Andrew Neil
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.
2025-11-23 5:14 PM
Please compare your link script (.ld file) before and after re-generation of the code with CubeMX. Any unexpected differences?
2025-11-23 11:02 PM
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.
2025-11-24 10:14 AM
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...
2025-11-24 12:07 PM
Which version of IDE ? 2.0 ?
Maybe try : older IDE, V 1.19. (integrated Mx ) , generic installer;
2025-11-24 1:29 PM
This feels like an issue due to the linux file-system being case-sensitive.
2025-11-25 7:02 AM
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.
2025-11-26 9:49 AM
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)
2025-11-27 12:28 AM
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.
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.
2025-11-30 1:43 PM
The link script path looks strange: -T"/home/zach/Dev/test" without the filename (a file that ends in .ld) ?
Are there any .ld files in /home/zach/Dev/test/ ?