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


error: required section '.rel.plt' not found in the linker script

France

Hi,

There is something weird in your link editor command:

  1. You pass the -shared option, requesting to create a shared library
    • This means you have ticked the “Shared” box in Properties >> C/C++ Build >> Settings >> MCU GCC Linker >> Shared library settings
  2. The name you give to the artifact to generate (-+libImportedProject.elf+-) is effectively the name one would expect for a shared library

However this has no chance to work... Shared libraries are not supported on a bare machine and there is no ABI for shared libraries on the Cortex-M processors, so they will never work out-of-the-box.

This does not mean creating shared libraries in this context is impossible, but you’re on your own and have to define the ABI (call conventions, link process, etc.) and provide the appropriate support code (in your application) and link editor script (at least...)

If you just keep the project as generated by CubeMX (that is without this weird option, that needs this .rel.plt section) it compiles like a charm.

Bernard (Ac6)