4 years, 3 months ago.

CooCox-build of exported 'blink_led' example does not work (STM32L152RE)


is there anyone who can help with CooCox-export of an STM32L152RE project? After export of 'blink_led' example the CooCox-build ends with error message

/../../../arm-none-eabi/bin/ld.exe: cannot open linker script file [......]/CoIDE/workspace/Nucleo_blink_ledL152RE_for_CooCox: Invalid argument [cc] collect2.exe: error: ld returned 1 exit status

Export and build works fine for platform STM32F401RE.

THX in advance! J.W.

Looks like linker script is not exported. You should check if any linker script is defined.

posted by Martin Kojtal 25 Nov 2014

Hi, you're right. Comparing with the exported STM32F401RE project the whole directory ..../TOOLCHAIN_GCC_ARM/... is missing. Where can I address the issue?

posted by Juergen Wahl 25 Nov 2014

Hi, Juergen! I have exactly the same problem. Did You find solution? Thanks!

posted by Janis Mucenieks 11 Dec 2014

Hi Janis, unfortunatly not. From question 5611 I see that there are activities on Nucleo-CooCox-Export. But I dont't know where to address the L152RE-issue.

posted by Juergen Wahl 14 Dec 2014

I'm having a similar issue with the STM32F030R8. I get this error code;

[cc] arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -g -Wl, -Os -Wl,gc-sections -Wl,wrap,main specs=nano.specs "-u _printf_float" "-u _scanf_float" -LC:/Users/Geoffrey/Documents/git -Wl,-TC:/Users/Geoffrey/Documents/git/ClassicCoIDE -g -o Classic.elf ..\obj\phnpSnep_Fri.o . ..\obj\InterruptManager.o ..\obj\phalMfc_Sw.o ..\obj\phlnLlcp_Fri_OvrHal.o ..\obj\phalT1T.o ..\obj\phhalHw_Rc523_Cmd.o ..\obj\phpalI14443p4.o ..\obj\phpalI18092mPI_Sw.o ..\obj\stm32f0xx_hal_irda.o ..\obj\phpalMifare.o ..\obj\phlnLlcp_Fri_MacNfcip.o ..\obj\phalTop_Sw.o ..\obj\phKeyStore.o -L..\..\.. -lstdc++ -L..\..\.. -lsupc++ -L..\..\.. -L..\..\.. -L..\..\.. -L..\..\.. -lm -lgcc -lc -lnosys [cc] c:/program files (x86)/gnu tools arm embedded/4.9 2014q4/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file C:/Users/Geoffrey/Documents/git/ClassicCoIDE: Invalid argument [cc] collect2.exe: error: ld returned 1 exit status

I don't know how to read this well enough to see what linker script file it is looking for. In any case the export to CooCox IDE did not build a working library. Does anyone have a suggestion of how to fix the problem?

posted by Geoffrey Lansberry 28 Jan 2015
Comment on this question

2 Answers

2 years, 10 months ago.

hello, I'm using nucléo L152RE uC in CocoxIDE. i want to read analogIn of my temperature sensor but i don't know how uC stm32 work !! any one can help me !!

Thx :)

4 years ago.


I had exactly the same problem. No linker script file (*.ld) in the exported project folder. What worked out for me was this:

  1. I exported my Nucleo_blink_led project to desktop IDE for the NUCLEO-L152RE platform and GccArm toolchain. When I was asked I saved the file into a folder on my desktop PC. For the sake of simplicity let’s call this folder ..\Nucleo-L152RE
  2. I proceeded to and exported the mbed library to desktop IDE also for the NUCLEO-L152RE platform and GccArm toolchain and saved the file into the same folder (..\Nucleo-L152RE)
  3. I unzipped both files and into the folder ..\Nucleo-L152RE. So two new folders were created ..\ Nucleo-L152RE \mbed and ..\ Nucleo-L152RE \Nucleo_blink_led
  4. Then I copied the file ..\Nucleo-L152RE\mbed\TARGET_NUCLEO_L152RE\TOOLCHAIN_GCC_ARM\STM32L152XE.ld into the folder ..\ Nucleo-L152RE \Nucleo_blink_led
  5. I started the CoIDE and opened the project ..\ Nucleo-L152RE \Nucleo_blink_led\Nucleo_blink_led.coproj
  6. In the last step I clicked the build button and the project was built with success.

The same procedure worked also for the NUCLEO-F103RB and I hope it could help you too.

Cheers and good luck.


To post an answer, please log in.