2020-03-23 07:44 AM
I am on macOS 10.13.6 High Sierra. I own a NUCLEO-F446RE board.
I am trying to build a simple test project with SystemWorkbench, i.e. SW4STM32.
I open STM32CubeMX, I select my NUCLEO board, I select SW4STM32 as Toolchain/IDE, I press "generate code" and in the project folder there are no *.ld files, that is why when I try to build in SystemWorkbench app i get this error:
Building target: 00test.elf
Invoking: MCU GCC Linker
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -specs=nosys.specs -specs=nano.specs -T"../" -Wl,-Map=output.map -Wl,--gc-sections -o "00test.elf" @"objects.list" -lm
/Applications/Ac6/SystemWorkbench.app/Contents/Eclipse/plugins/fr.ac6.mcu.externaltools.arm-none.macos64_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: read in flex scanner failed
collect2: error: ld returned 1 exit status
make: *** [00test.elf] Error 1
Instead if I choose STM32CubeIDE as Toolchain/IDE both "STM32F446RETX_FLASH.ld" and "STM32F446RETX_RAM.ld" files are generated and I can build and run without problems.
Info:
STM32CubeMX version 5.6.0
2020-03-23 09:49 AM
Hello @Community member
This will be internally checked,
Best Regards,
Khouloud
2020-03-23 02:15 PM
Rely on STM32CubeIDE then ... :-). I'm kidding but SW4STM32 is almost deprecated now ... Even more if luckily you're starting a brand new project.
2020-03-23 06:50 PM
in fact ,I tested f0 serial and f1serial ,it worked well on windows10 ,but when use linux,neither with root nor other users can generate .ld file for gcc base ides(i test sw4stm32 and truestudio) , the same .ioc file well generate all file when i back to windows10,so you can try on windows
2020-04-10 09:12 AM
Hi,
any results so far? I am having this problem, too. (With the new 5.6.1 Version of CubeMX, and on Kubuntu Linux 19.10; openjdk 14)
Update: I found the problem, see my answer below.
2020-04-10 09:53 AM
Hi,
I kept trying and found a solution to the problem myself:
I was having the issue with CubeMX V5.6.1, V5.5.0 and V4.27.0 on a Kubuntu Linux 19.10 with OpenJDK 14
Switching to OpenJDK 8 fixed the Issue for me.
I don't know about MacOS but for the Linux users finding this post you can fix the issue by running
sudo apt install openjdk-8-jre
And then using
sudo update-alternatives --config java
to switch the default Java version to 8.
To the ST developers: You could let the installer check the Java version and abort the installation or show a warning if a bad/untested Java version is detected.
Kind regards,
Andreas Vetter
2020-05-21 03:10 AM
@Community member Could you please share your ioc file?
I need to know the MX version ? Are you UnderRoot ? The app structure (Basic/advanced) ?
Thanks
2020-12-01 04:21 AM
Hi @Khouloud ZEMMELI , this issue seems to be back in STM32Cube v6.1.0, STM32H7 v1.8.0.
I have tried to generate with openJDK 15.0.0, and 15.0.1 on Linux: both show the problem of no loader script being generated.
I have attempted with options:
SW4STM32
STM32CubeIDE
TrueSTUDIO
Makefile
Other Toolchains (GPDSC)
2020-12-09 09:57 AM
Had the same linker issue (non-existing *.ld script) on my Manjaro 20.2. but your fix (change the java version to 8) resolved it. Thanks a lot =)
P.S.
Link to the guide for switching Java versions on Manjaro (Arch) distros: https://wiki.archlinux.org/index.php/Java