Dearr all,
I'm trying to make a map file from gcc environment as the below. the below is the snippet code from makefile in linux
# gcc all_gcc: $(GNG_CC) $(GNU_CC_FLAGS) $(STARTUP_DIR)/$(STARTUP_FILE).s \ $(TESTNAME).c \ $(SOFTWARE_DIR)/common/retarget/retarget.c \ $(SOFTWARE_DIR)/common/retarget/uart_stdout.c \ $(DEVICE_DIR)/Source/$(SYSTEM_FILE).c \ -I $(DEVICE_DIR)/Include -I $(CORE_DIR) \ -I $(SOFTWARE_DIR)/common/retarget \ -L $(LINKER_SCRIPT_PATH) \ -D__STACK_SIZE=0x200 \ -D__HEAP_SIZE=0x1000 \ $(USER_DEFINE) -T $(LINKER_SCRIPT) -o $(TESTNAME).o # Generate disassembly code $(GNU_OBJDUMP) -S $(TESTNAME).o > $(TESTNAME).lst # Generate binary file $(GNU_OBJCOPY) -S $(TESTNAME).o -O binary $(TESTNAME).bin # Generate hex file $(GNU_OBJCOPY) -S $(TESTNAME).o -O verilog $(TESTNAME).hex
# Generate map file arm-none-eabi-gcc -Xlinker -Map=out.map
I've added " arm-none-eabi-gcc -Xlinker -Map=out.map" to there but I'm always having a error.
would you please help me what am I supposed to do to resolve this problem?
/opt/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function 'exit': exit.c:(.text.exit+0x2c): undefined reference to '_exit' /opt/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/crt0.o: In function '_start': (.text+0xec): undefined reference to 'main' collect2: error: ld returned 1 exit status make: *** [all_gcc] Error 1
May be GCC forum can help ?