I’m working with the Arm Corstone SSE-050 design kit, and I’m transitioning from the older toolchain options (DS-5 and GCC) to DS-6, as recommended by Arm. DS-6 uses armclang instead of armcc for compilation.
Problem: I need to compile startup_sse050.s in the CMSIS folder to generate startup_sse050.o. Here’s the setup: For GCC, the file located at cmsis/Device/ARM/SSE050/Source/GCC/startup_sse050.s is used. This file is written in GNU assembly syntax (e.g., .syntax unified). For DS-5, the file located at cmsis/Device/ARM/SSE050/Source/ARM/startup_sse050.s is used, written in ARM assembly syntax specific to armasm. Question: Since DS-6 uses armclang, which supports GNU syntax, can I use the GCC version of startup_sse050.s (in GNU assembly syntax) for DS-6 with armclang? I want to confirm if this approach is feasible and if it would yield the correct startup_sse050.o without needing further modifications.
So i did this:
$(STARTUP_FILE).o : $(STARTUP_DIR)/$(STARTUP_FILE).s $(DEPS_LIST)
armclang --target=arm-arm-none-eabi -mcpu=cortex-m3 -x assembler-with-cpp -E $< -o $(STARTUP_FILE)_preproc.s
armclang --target=arm-arm-none-eabi -mcpu=cortex-m3 -c $(STARTUP_FILE)preproc.s -o $@
next using multiple .o file .elf file needs to be generated(using armlink).
ARMLINKOPTIONS = --cpu=Cortex-M3 "--keep=$(STARTUPFILE).o(Reset_Handler)" "--first=$(STARTUP_FILE).o(Reset_Handler)" \ --rw_base 0x20000000 --ro_base 0x00000000 --map $(TESTNAME).ELF : $(TESTNAME).o $(SYSTEM_FILE).o $(STARTUP_FILE).o retarget.o uart_stdout.o armlink $(ARM_LINK_OPTIONS) $(TESTNAME).o $(SYSTEM_FILE).o $(STARTUP_FILE).o retarget.o uart_stdout.o -o $@
while using armlink I see the errors:
armlink --rw_base 0x20000000 --ro_base 0x00000000 --keep=startup_SSE050.o(RESET) --first=startup_SSE050.o(RESET) --map --list=hello.map hello.o system_SSE050.o startup_SSE050.o retarget.o uart_stdout.o -o hello.ELF
Warning: L6319W: Ignoring --first command. Cannot find section startup_SSE050.o(RESET).
Error: L6218E: Undefined symbol etext (referred from startup_SSE050.o).
Error: L6218E: Undefined symbol data_start (referred from startup_SSE050.o).
Error: L6218E: Undefined symbol __data_end (referred from startup_SSE050.o). Finished: 0 information, 1 warning and 3 error messages. make[1]: *** [hello.ELF]
Error 1 make[1]: Leaving directory /DIG_DESIGN01/Student/pd/rashi/armSocrates/workspace_24/BMS_190924/sse050/logical/testbench/testcodes/hello'how to resolve this?