Generating empty elf in openstm32 - system workbench
Closed this issue · 1 comments
Dear Admin,
Came across the project and tried to implement on stm32f042x6 connected to macos catalina with SystemWorkbench IDE.
However I got below error message during compilation.
Applications/Xcode.app/Contents/Developer/usr/bin/make -f ldscript.mk ROMLEN=32K RAMLEN=6K OUTFILE=build/objfw/script.ld
Building linker script
building bootloader
text data bss dec hex filename
0 0 0 0 0 build/firmware.elf
creating build/firmware.hex
arm-none-eabi-objcopy: error: the input file 'build/firmware.elf' has no sections
make[1]: *** [build/firmware.hex] Error 1
make: *** [stm32f042x6] Error 2
I thought it was due to my minor modification but it was not. I tried those mentioned "tested" board and got the same error message.
Last to mention, I also made modification to the linker script. It is in the last few lines of the ldscript.mk as.
Mine is,
PHONY: all $(OUTFILE)
all: $(OUTFILE)
$(file >> $<,$(LDSCRIPT))
$(OUTFILE):
@echo Building linker script
@echo '/* This file is automatically generated */' > $@
The above is the previous version as the latest version will trigger another error:
file script.Id cannot be found
Hope someone may take a look. Thank you very much.
Problem solved.
I wrongly applied a staled toolchain (the ac6-tools). It runs perfect in stm32ide with the latest mcu arm gcc.