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


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

Hello,



the OS you are using (Windows, Linux (Ubuntu...), Mac OS X) and its version;
windows 10 64bit


the System Workbench for STM32 version concerned (Help >> About Eclipse >> Ac6 button;)
System Workbench for STM32 - OpenOCD (for Windows 32bits)

Version: 1.13.1.201701261206
Build id: @build@

Copyright (c) 2014 Ac6 Tools. All rights reserved.
Visit http://www.openstm32.orgQuestion

the board and/or MCU you are using;
Custom board with STM32F303CBTx



I have imported CubeMX project in OpenSTM32 eclipse and after build I get:

17:12:51 **** Rebuild of configuration Debug for project ImportedProject ****
Info: Internal Builder is used for build
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim_ex.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim_ex.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_adc_ex.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_adc_ex.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_gpio.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_gpio.c”
arm-none-eabi-as -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -o “startup\startup_stm32f303xc.o” “..\startup\startup_stm32f303xc.s”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_adc.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_adc.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c_ex.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c_ex.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Src\main.o” “..\Src\main.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_cortex.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_cortex.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr_ex.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr_ex.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Src\stm32f3xx_hal_msp.o” “..\Src\stm32f3xx_hal_msp.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Src\stm32f3xx_it.o” “..\Src\stm32f3xx_it.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash_ex.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash_ex.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Src\system_stm32f3xx.o” “..\Src\system_stm32f3xx.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc_ex.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc_ex.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I../Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc -I../Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F3xx/Include -I../Drivers/CMSIS/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -o “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_dma.o” “..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_dma.c”
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -specs=nano.specs -shared -T../STM32F303CBTx_FLASH.ld -Wl,-Map=output.map -Wl,--gc-sections -lm -o libImportedProject.elf “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_adc.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_adc_ex.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_cortex.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_dma.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash_ex.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_gpio.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c_ex.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr_ex.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc_ex.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim.o” “Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim_ex.o” “Src\main.o” “Src\stm32f3xx_hal_msp.o” “Src\stm32f3xx_it.o” “Src\system_stm32f3xx.o” “startup\startup_stm32f303xc.o”
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.1.201701261202/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: error: required section ‘.rel.plt’ not found in the linker script
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.1.201701261202/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status

17:13:01 Build Finished (took 10s.598ms)








What could be the reason I am not able to compile project?
Do I miss something?

My zipped project is at: https://www.dropbox.com/s/4c07cdd8s18d1b0/ImportedProject.zip?dl=0Question

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)


Bernard,


thank you VERY much - indeed shared was ticked on - but cannot tell when and how I enabled this.

Unticking it fixed it and program compiles now.

regards