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


Some undefined references

Hello.

I’m a new user of System Workbench for STM32.
When I create the configurations with CubeMX and import the project all works fine.
But when I “re-open” the CubeMX and make some changes, the compilation start to give errors.

In this case, the errors are:

Building target: UDP_coupler.elf
Invoking: MCU G++ Linker
arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=softfp -mfpu=fpv5-sp-d16 -Wl,-Map=output.map -Wl,--gc-sections -fno-exceptions -fno-rtti -lm -o “UDP_coupler.elf” @”objects.list”
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.7.0.201602121829/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7e-m/softfp/fpv5-sp-d16\libc.a(lib_a-exit.o): In function `exit’:
exit.c:(.text.exit+0x16): undefined reference to `_exit’
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.7.0.201602121829/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7e-m/softfp/fpv5-sp-d16\libc.a(lib_a-sbrkr.o): In function `_sbrk_r’:
sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk’
collect2.exe: error: ld returned 1 exit status
make: *** UDP_coupler.elf Error 1


Can you help me please?


Thanks

Tunisia

Hello David,

You need either to add syscall.c to your project or add “-specs=nosys.specs” to (Project -> Properties -> C/C++ Build -> Settings -> MCU GCC Linker -> Linker flags)

Regards,
Tarek

Have I answered in a wrong location?

Maybe I should write here...




Tunisia

It seems that your application is not located within FLASH (AXI).
Are intentionally linking into TCM FLASH ??
If not could you attach the linker file (*.ld)

Tunisia

yes, your linker is not modified. but the error message indicates that you have data at address 0 & 26964.
This address range is not located within flash which explains the warning “no flash bank found for address 0 / 26946”.
to verify could you please attach the map file (~/Debug/output.map)

maybe you are not pointing to this linker, check (Project > Properties > C/C++ Build > Settings > MCU GCC Linker > General > Linker flags > Linker Script (-T) )

Thank you for your patience.

In annex I put the *.map file.

;)

Now I’ve changed the linker to “STM32F746ZGTx_FLASH.ld” and works fine!

But I do not understand why this change... why, in a momment works nice, and the next momment all of this goes crazy...

Tunisia

Please find my comments with green

Thank you for your patience.

In annex I put the *.map file.
this map file is obtained after you have fixed the project
;)

Now I’ve changed the linker to “STM32F746ZGTx_FLASH.ld” and works fine!
Glad to hear that

But I do not understand why this change... why, in a momment works nice, and the next momment all of this goes crazy...
You probably have intentionally discarded the linker settings so the arm_none_eabi_ld have used the default setting (flash at address 0)

OK.

For now all works fine... thanks to your help.

Thank you for your time.

biggrin

Regards,
David