cancel
Showing results for 
Search instead for 
Did you mean: 

Compile SECoreBin without main

MKoch.15
Associate II

Hi.

I am trying to compile the SBSFU project for STM32L, more exact i am using b-l475e-iot01a.

I have put together the following makefile, trying to compile SECoreBin, but i cannot work out how to link it together without getting

/usr/lib/gcc/arm-none-eabi/8.2.0/../../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/8.2.0/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/softfp/crt0.o: in function `_start':
(.text+0x44): undefined reference to `main'

Makefile.

######################################
# Makefile by CubeMX2Makefile.py
######################################
 
######################################
# target
######################################
TARGET = SECoreBin
 
######################################
# building variables
######################################
# debug build?
DEBUG = 0
# optimization
OPT = -O0
 
#######################################
# pathes
#######################################
# Build path
BUILD_DIR = build
 
######################################
# source
######################################
 
SE_SOURCES = ../Middlewares/STM32_Secure_Engine/Core/se_bootinfo.c
SE_SOURCES += ../Middlewares/STM32_Secure_Engine/Core/se_callgate.c
SE_SOURCES += ../Middlewares/STM32_Secure_Engine/Core/se_crypto_common.c
SE_SOURCES += ../Middlewares/STM32_Secure_Engine/Core/se_exception.c
SE_SOURCES += ../Middlewares/STM32_Secure_Engine/Core/se_fwimg.c
SE_SOURCES += ../Middlewares/STM32_Secure_Engine/Core/se_startup.c
SE_SOURCES += ../Middlewares/STM32_Secure_Engine/Core/se_user_application.c
SE_SOURCES += ../Middlewares/STM32_Secure_Engine/Core/se_utils.c
SE_SOURCES_ASM = ../Middlewares/STM32_Secure_Engine/Core/se_stack_smuggler_GNU.s
 
SE_INCLUDES = -I../Middlewares/STM32_Secure_Engine/Core
SE_INCLUDES += -I../Middlewares/STM32_Secure_Engine/Key
 
HAL_SOURCES = ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_crc.c
HAL_SOURCES += ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_crc_ex.c
HAL_SOURCES += ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_firewall.c
HAL_SOURCES += ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash.c
HAL_SOURCES += ../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_flash_ex.c
HAL_INCLUDES = -I../Drivers/STM32L4xx_HAL_Driver/Inc
 
CRYPTO_LIB = ../Middlewares/STM32_Cryptographic/Fw_Crypto/STM32L4/Lib/libSTM32CryptographicV3.0.0_CM4_GCC.a
CRYPTO_INCLUDES = -I../Middlewares/STM32_Cryptographic/Fw_Crypto/STM32L4/Inc
 
DEVICE_INCLUDES = -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include
DEVICE_INCLUDES += -I../Drivers/CMSIS/Include
DEVICE_INCLUDES += -I../Drivers/BSP/B-L475E-IOT01
DEVICE_INCLUDES += -I../Drivers/BSP/Components/Common
 
SE_KEY_ASM = SECoreBin/build/se_key.s
 
C_SOURCES = $(SE_SOURCES) $(HAL_SOURCES) Src/se_crypto_bootloader.c Src/se_low_level.c data_init.c
ASM_SOURCES = startup_stm32l475xx.s $(SE_SOURCES_ASM) $(SE_KEY_ASM)
 
 
 
#######################################
# binaries
#######################################
CC = arm-none-eabi-gcc
AS = arm-none-eabi-gcc -x assembler-with-cpp
CP = arm-none-eabi-objcopy
AR = arm-none-eabi-ar
SZ = arm-none-eabi-size
HEX = $(CP) -O ihex
BIN = $(CP) -O binary -S
 
#######################################
# CFLAGS
#######################################
# macros for gcc
AS_DEFS =
C_DEFS = -DSTM32L475xx -DUSE_HAL_DRIVER -DUSE_STM32L475E_IOT01
# includes for gcc
AS_INCLUDES =
C_INCLUDES = -IInc -I../SBSFU/SBSFU/App -I../Linker_Common $(SE_INCLUDES) $(HAL_INCLUDES) $(DEVICE_INCLUDES) $(CRYPTO_INCLUDES)
# compile gcc flags
ASFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -specs=nosys.specs -specs=nano.specs $(AS_DEFS) $(AS_INCLUDES) $(OPT)
CFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -specs=nosys.specs -specs=nano.specs $(C_DEFS) $(C_INCLUDES) $(OPT)
ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2
endif
# Generate dependency information
CFLAGS += -std=gnu11 -MD -MP -MF $(BUILD_DIR)/.dep/$(@F).d
 
#######################################
# LDFLAGS
#######################################
# link script
LDSCRIPT = STM32L475VGTx_FLASH.ld
# libraries
LIBS = $(CRYPTO_LIB)
LIBDIR =
LDFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -specs=nosys.specs -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -L../Linker_Common -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections
 
# default action: build all
all: prebuild $(BUILD_DIR)/$(TARGET).bin
 
prebuild:
	mkdir -p $(BUILD_DIR) && ./prebuild.sh $(BUILD_DIR)
 
#######################################
# build the application
#######################################
# list of objects
OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
vpath %.c $(sort $(dir $(C_SOURCES)))
# list of ASM program objects
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
vpath %.s $(sort $(dir $(ASM_SOURCES)))
 
$(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
	$(CC) -c $(CFLAGS) -Wa,-a,-ad,-alms=$(BUILD_DIR)/$(notdir $(<:.c=.lst)) $< -o $@
 
$(BUILD_DIR)/%.o: %.s Makefile | $(BUILD_DIR)
	$(AS) -c $(CFLAGS) $< -o $@
 
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
	$(CC) $(OBJECTS) $(LDFLAGS) -o $@
	$(SZ) $@
 
$(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
	$(HEX) $< $@
 
$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf | $(BUILD_DIR)
	$(BIN) $< $@
 
$(BUILD_DIR):
	mkdir -p $@/.dep
 
#######################################
# clean up
#######################################
clean:
	-rm -fR $(BUILD_DIR)
 
#######################################
# dependencies
#######################################
-include $(shell mkdir -p $(BUILD_DIR)/.dep 2>/dev/null) $(wildcard $(BUILD_DIR)/.dep/*)
 
.PHONY: clean all
 
# *** EOF ***

All the paths are correct, but i feel like i am missing a linkerflag or a cflag somewhere.

1 ACCEPTED SOLUTION

Accepted Solutions
Jocelyn RICARD
ST Employee

GCC Version is 7.3.1:

c:\STM32\Tools\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825\tools\compiler\bin>arm-none-eabi-gcc.exe --version

arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]

Last compiler and Linker statement:

Building file: C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/Core/Src/stm32l4xx_it.c

Invoking: MCU GCC Compiler

C:\STM32\Secu\SBSFU\STM32CubeExpansion_SBSFU_V2.1.0\Projects\B-L475E-IOT01A\Applications\2_Images\2_Images_SBSFU\SW4STM32\B-L475E-IOT01_2_Images_SBSFU\Debug

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DSTM32L475xx -DUSE_HAL_DRIVER -DUSE_STM32L475E_IOT01 -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Drivers/CMSIS/Device/ST/STM32L4xx/Include" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Drivers/STM32L4xx_HAL_Driver/Inc" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Drivers/BSP/B-L475E-IOT01" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Drivers/BSP/Components/Common" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/Core/Inc" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/SBSFU/App" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/SBSFU/Target" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SECoreBin/Inc" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Middlewares/ST/STM32_Secure_Engine/Core" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Middlewares/ST/STM32_Secure_Engine/Interface" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Drivers/CMSIS/Include" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/Linker_Common/SW4STM32" -Os -g3 -Wall -fmessage-length=0 -Wno-format -Wno-strict-aliasing -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF"Application/Core/stm32l4xx_it.d" -MT"Application/Core/stm32l4xx_it.o" -o "Application/Core/stm32l4xx_it.o" "C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/Core/Src/stm32l4xx_it.c"

Finished building: C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/Core/Src/stm32l4xx_it.c

Building target: SBSFU.elf

Invoking: MCU GCC Linker

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -specs=nano.specs -Xlinker -L ../../../../Linker_Common/SW4STM32 -T"../STM32L475VGTx_FLASH.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "SBSFU.elf" @"objects.list"  -lm

Finished building target: SBSFU.elf

make --no-print-directory post-build

Generating binary and Printing size information:

arm-none-eabi-objcopy -O binary "SBSFU.elf" "SBSFU.bin"

arm-none-eabi-size "SBSFU.elf"

  text   data   bss   dec   hex filename

 53688   336   6288  60312   eb98 SBSFU.elf

arm-none-eabi-objcopy -j .SE_IF_Code "SBSFU.elf" se_inter.elf > /dev/null 2>>1

arm-none-eabi-objcopy --extract-symbol se_inter.elf se_interface_app.elf

arm-none-eabi-objcopy -S --keep-symbols=../se_interface.txt se_interface_app.elf se_interface_app.o

View solution in original post

8 REPLIES 8
Jocelyn RICARD
ST Employee

Hello,

the SECoreBin does not have a main function.

If you compare with SBSFU directory for instance, you will see a difference related to the file startup_stm32l475xx.s

The one in SECoreBin project does not call the main in the reset handler.

I hope this will help

Best regards

Jocelyn

MKoch.15
Associate II

Hi.

I think i have managed to move a bit closer, but i am now getting memory overflow errors:

arm-none-eabi-gcc build/se_bootinfo.o build/se_callgate.o build/se_crypto_common.o build/se_exception.o build/se_fwimg.o build/se_startup.o build/se_user_application.o build/se_utils.o build/stm32l4xx_hal_crc.o build/stm32l4xx_hal_crc_ex.o build/stm32l4xx_hal_firewall.o build/stm32l4xx_hal_flash.o build/stm32l4xx_hal_flash_ex.o build/se_crypto_bootloader.o build/se_low_level.o build/data_init.o build/startup_stm32l475xx.o build/se_stack_smuggler_GNU.o build/se_key.o -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -specs=nosys.specs -specs=nano.specs -TSTM32L475VGTx_FLASH.ld -L../Middlewares/STM32_Cryptographic/Fw_Crypto/STM32L4/Lib -l:libSTM32CryptographicV3.0.0_CM4_GCC.a -Xlinker -L../Linker_Common -nostartfiles -eSE_CallGate -o build/SECoreBin.elf
/usr/lib/gcc/arm-none-eabi/8.2.0/../../../../arm-none-eabi/bin/ld: build/SECoreBin.elf section `.text' will not fit in region `SE_ROM_region'
/usr/lib/gcc/arm-none-eabi/8.2.0/../../../../arm-none-eabi/bin/ld: build/SECoreBin.elf section `.bss' will not fit in region `SE_SRAM1_region'
/usr/lib/gcc/arm-none-eabi/8.2.0/../../../../arm-none-eabi/bin/ld: region `SE_ROM_region' overflowed by 54004 bytes
/usr/lib/gcc/arm-none-eabi/8.2.0/../../../../arm-none-eabi/bin/ld: region `SE_SRAM1_region' overflowed by 1648 bytes
collect2: error: ld returned 1 exit status

Even though i have not changed anything, telling me i am linking in too much code somewhere? :(

Jocelyn RICARD
ST Employee

Hello,

here is what I get when building the same project with eclipse:

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -L"C:\STM32\Secu\SBSFU\STM32CubeExpansion_SBSFU_V2.1.0\Middlewares\ST\STM32_Cryptographic\Fw_Crypto\STM32L4\Lib" -specs=nosys.specs -specs=nano.specs -Xlinker -L ../../../../Linker_Common/SW4STM32 -T"../STM32L475VGTx_FLASH.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "SECoreBin.elf" @"objects.list" -l:libSTM32CryptographicV3.0.0_CM4_GCC.a -lm

Finished building target: SECoreBin.elf

make --no-print-directory post-build

Generating binary and Printing size information:

arm-none-eabi-objcopy -O binary "SECoreBin.elf" "SECoreBin.bin"

arm-none-eabi-size "SECoreBin.elf"

  text   data   bss   dec   hex filename

 18398    80   2616  21094   5266 SECoreBin.elf

So, this is normal that 54004 bytes will not fit.

I would first look at compiler optimization flag.

Best regards

Jocelyn

MKoch.15
Associate II

Alright! I got it to compile now. Thank you very much!

Now i am just trying to compile the next step (SBSFU). And i seem to get sorta the same issue;

arm-none-eabi-gcc build/se_interface_common.o build/se_interface_bootloader.o build/se_interface_application.o build/stm32l4xx_hal_spi_ex.o build/stm32l4xx_hal_i2c_ex.o build/stm32l4xx_hal_rtc.o build/stm32l4xx_hal_flash.o build/stm32l4xx_hal_pwr.o build/stm32l4xx_hal_uart_ex.o build/stm32l4xx_hal_dma_ex.o build/stm32l4xx_hal_dma.o build/stm32l4xx_hal_cortex.o build/stm32l4xx_hal_i2c.o build/stm32l4xx_hal_pwr_ex.o build/stm32l4xx_hal_tim_ex.o build/stm32l4xx_hal_gpio.o build/stm32l4xx_hal_firewall.o build/stm32l4xx_hal_rtc_ex.o build/stm32l4xx_hal_spi.o build/stm32l4xx_hal_adc.o build/stm32l4xx_hal_tim.o build/stm32l4xx_hal_rcc_ex.o build/stm32l4xx_hal_rcc.o build/stm32l4xx_hal_crc.o build/stm32l4xx_hal_uart.o build/stm32l4xx_hal.o build/stm32l4xx_hal_adc_ex.o build/stm32l4xx_hal_crc_ex.o build/stm32l4xx_hal_iwdg.o build/stm32l4xx_hal_flash_ex.o build/sfu_fwimg_core.o build/sfu_error.o build/sfu_loader.o build/sfu_com_trace.o build/sfu_com_loader.o build/sfu_fwimg_services.o build/sfu_new_image.o build/sfu_boot.o build/sfu_test.o build/main.o build/stm32l4xx_it.o build/stm32l4xx_hal_msp.o build/sfu_low_level_security.o build/sfu_low_level.o build/sfu_low_level_flash.o build/stm32l475e_iot01.o build/system_stm32l4xx.o build/sfu_secorebin_Inc.o build/syscalls.o build/startup_stm32l475xx.o -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -specs=nosys.specs -specs=nano.specs -TSTM32L475VGTx_FLASH.ld   -Wl,-Map=build/SBSFU.map,--cref -Wl,--gc-sections -Xlinker -L../Linker_Common -o build/SBSFU.elf
/usr/lib/gcc/arm-none-eabi/8.2.0/../../../../arm-none-eabi/bin/ld: build/SBSFU.elf section `.text' will not fit in region `SB_ROM_region'
/usr/lib/gcc/arm-none-eabi/8.2.0/../../../../arm-none-eabi/bin/ld: region `SB_ROM_region' overflowed by 25152 bytes
collect2: error: ld returned 1 exit status

Jocelyn RICARD
ST Employee

Did you use optimize for size ?

If yes, issue may be related to different gcc compiler version ?

best regards

Jocelyn

MKoch.15
Associate II

Hi

I have "-Os" on my compile statements, and i am trying to compile with "arm-none-eabi-gcc (Arch Repository) 8.2.0"

If you try to compile the SBSFU project using eclipse, what is your linker statement? And what is the version of gcc?

Jocelyn RICARD
ST Employee

GCC Version is 7.3.1:

c:\STM32\Tools\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825\tools\compiler\bin>arm-none-eabi-gcc.exe --version

arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]

Last compiler and Linker statement:

Building file: C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/Core/Src/stm32l4xx_it.c

Invoking: MCU GCC Compiler

C:\STM32\Secu\SBSFU\STM32CubeExpansion_SBSFU_V2.1.0\Projects\B-L475E-IOT01A\Applications\2_Images\2_Images_SBSFU\SW4STM32\B-L475E-IOT01_2_Images_SBSFU\Debug

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DSTM32L475xx -DUSE_HAL_DRIVER -DUSE_STM32L475E_IOT01 -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Drivers/CMSIS/Device/ST/STM32L4xx/Include" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Drivers/STM32L4xx_HAL_Driver/Inc" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Drivers/BSP/B-L475E-IOT01" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Drivers/BSP/Components/Common" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/Core/Inc" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/SBSFU/App" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/SBSFU/Target" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SECoreBin/Inc" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Middlewares/ST/STM32_Secure_Engine/Core" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Middlewares/ST/STM32_Secure_Engine/Interface" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Drivers/CMSIS/Include" -I"C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/Linker_Common/SW4STM32" -Os -g3 -Wall -fmessage-length=0 -Wno-format -Wno-strict-aliasing -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF"Application/Core/stm32l4xx_it.d" -MT"Application/Core/stm32l4xx_it.o" -o "Application/Core/stm32l4xx_it.o" "C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/Core/Src/stm32l4xx_it.c"

Finished building: C:/STM32/Secu/SBSFU/STM32CubeExpansion_SBSFU_V2.1.0/Projects/B-L475E-IOT01A/Applications/2_Images/2_Images_SBSFU/Core/Src/stm32l4xx_it.c

Building target: SBSFU.elf

Invoking: MCU GCC Linker

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -specs=nano.specs -Xlinker -L ../../../../Linker_Common/SW4STM32 -T"../STM32L475VGTx_FLASH.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "SBSFU.elf" @"objects.list"  -lm

Finished building target: SBSFU.elf

make --no-print-directory post-build

Generating binary and Printing size information:

arm-none-eabi-objcopy -O binary "SBSFU.elf" "SBSFU.bin"

arm-none-eabi-size "SBSFU.elf"

  text   data   bss   dec   hex filename

 53688   336   6288  60312   eb98 SBSFU.elf

arm-none-eabi-objcopy -j .SE_IF_Code "SBSFU.elf" se_inter.elf > /dev/null 2>>1

arm-none-eabi-objcopy --extract-symbol se_inter.elf se_interface_app.elf

arm-none-eabi-objcopy -S --keep-symbols=../se_interface.txt se_interface_app.elf se_interface_app.o

MKoch.15
Associate II

YAY! Success! I managed to build it, after adding "-g3 -Wall -fmessage-length=0 -Wno-format -Wno-strict-aliasing -ffunction-sections -c -fmessage-length=0"

Thank you very much!