bare-metal-programming-guide
bare-metal-programming-guide copied to clipboard
Missing .vectors section
Compiling with the first provided command does place .vectors atop:
$ arm-none-eabi-gcc -T link.ld -nostdlib main.o -o firmware.elf
$ arm-none-eabi-objdump -h firmware.elf | grep vectors
0 .vectors 000001ac 08000000 08000000 00001000 2**2
Compiling with Makefile build command does not:
$ make
arm-none-eabi-gcc main.c -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion -Wformat-truncation -fno-common -Wconversion -g3 -Os -ffunction-sections -fdata-sections -I. -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Tlink.ld -nostartfiles -nostdlib --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=firmware.elf.map -o firmware.elf
$ arm-none-eabi-objdump -h firmware.elf | grep vectors
Why?