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.org
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=0