Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

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


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs