Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


Issue when import programme from MBED

Hello OpemSTM community!

I’m trying to import mbed software to eclipse, I followed the tuto and need to configure more include path because i’m using bluetooth library from STM, now the project build correctly exept for the linker who gcc say me that :
---
‘Invoking: MCU G++ Linker’
arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -T”C:\Users\thier\Projets\10 - workspace\Pebble2STM\mbed_Pebble2STM\STM32F401RETx_FLASH.ld” -Wl,-Map=output.map -Wl,--gc-sections -fno-exceptions -fno-rtti -lm -o “mbed_Pebble2STM.elf” @”objects.list”
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.3.0.201507241045/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc.a(lib_a-abort.o): In function `abort’:
abort.c:(.text.abort+0xa): undefined reference to `_exit’
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.3.0.201507241045/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc.a(lib_a-signalr.o): In function `_kill_r’:
signalr.c:(.text._kill_r+0xe): undefined reference to `_kill’
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.3.0.201507241045/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu\libc.a(lib_a-signalr.o): In function `_getpid_r’:
signalr.c:(.text._getpid_r+0x0): undefined reference to `_getpid’
collect2.exe: error: ld returned 1 exit status
make: *** mbed_Pebble2STM.elf Error 1
----

It seem that the link don’t find the stdlib and i don’t know how to specify the correct path. I search on forum and try to change
LinkerScript.ld by STM32F401RETx_FLASH.ld in -T option (${workspace_loc:/${ProjName}/STM32F401RETx_FLASH.ld}
without any sucess

Thanks for your help!

Thierry

Tunisia

Hello Thierry,
Have you tried adding syscalls.c to your project ?

Update: try adding “-specs=nosys.specs” to linker miscellaneous flags (Project Properties > C/C++ Build > Settings > Tool Settings TAB > MCU GCC Linker > Miscellaneous > Linker flags)

Thanks Tarek, with -specs=nosys.specs it compile now completly biggrin, but when I debug the software is in infinit loop cry

with first message :


Warning: the current language does not match this frame.
No source file named C:\Users\thier\Projets\10 - workspace\Pebble2STM\Pebble2STM\Src\main.c.



And loop when I pause the debugger:
Default_Handler:
Infinite_Loop:
b Infinite_Loop
.size Default_Handler, .-Default_Handler

any idea ?

Thierry,

Hello,

I find the issue, by comparaison with working project generated by workbench I add this -specs=nano.specs to linker miscellaneous flags (Project Properties > C/C++ Build > Settings > Tool Settings TAB > MCU GCC Linker > Miscellaneous > Linker flags).

now it work! biggrin

Thanks againTarek to put me on the good lane !

Thierry,

I also have the same error after updating the plugin today.

This GDB was configured as “--host=i686-linux-gnu --target=arm-none-eabi”.

“Warning: the current language does not match this frame.”

And once you continue you get:

Error: JTAG failure -4
Error: JTAG failure -4
Polling target stm32f1x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 6300ms

I do have the same error, I come from Arduino Background, so it look odd and new to me.

Hello STM Team

For information for other user that want to import mbed projet, to proper execusion you need to use the ld file generated by mbed export not de default on generated by the project creation.

For my application the file is here :
./mbed-src/targets/cmsis/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F401RE/TOOLCHAIN_GCC_ARM/STM32F401XE.ld

I just modify the location to put in same place as LinkerScript.ld and change in Project>property>MCU G++ Linker>General field LinkerScript (-T) : to change the file name

I think this thing could be added to the tuto How to import mbed project (Bernard it’s for you redface)

Thierry


Hi Guys,
So I am trying to compile an exported mbed project to a Nucleo STM32L476RG board. Followed the instructions for importing then compiling throws the undefined reference to `_exit’ and also _kill and _getpid described above. So I tried adding -specs=nano.specs and also changing the load script, also as recommended above. Neither of these seems to have much effect, with compile giving the same errors as indicated below.

Somewhat stuck now so be grateful for any further suggestions.

Best wishes, Ron


Building target: lorawan-lmic-app.elf
Invoking: MCU G++ Linker
arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nano.specs -T”/home/ron/ac6workspace/lorawan-lmic-app/STM32L476XX.ld” -Wl,-Map=output.map -Wl, - -gc-sections -fno-exceptions -fno-rtti -lm -o “lorawan-lmic-app.elf” @”objects.list” ----
/home/ron/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.arm-none.linux64_1.7.0.201602291252/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc_nano.a(lib_a-abort.o): In function `abort’:
abort.c:(.text.abort+0xa): undefined reference to `_exit’
/home/ron/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.arm-none.linux64_1.7.0.201602291252/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc_nano.a(lib_a-signalr.o): In function `_kill_r’:
signalr.c:(.text._kill_r+0xe): undefined reference to `_kill’
/home/ron/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.arm-none.linux64_1.7.0.201602291252/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7e-m/fpu/libc_nano.a(lib_a-signalr.o): In function `_getpid_r’:
signalr.c:(.text._getpid_r+0x0): undefined reference to `_getpid’
collect2: error: ld returned 1 exit status
make: *** lorawan-lmic-app.elf Error 1

Answering my own question:

I had misunderstood that it is necessary to add both -specs=nosys.specs -specs=nano.specs to Miscellaneous -> Linker flags ... doh!

Now it works!