From f145663464f7917f99e1aa4214ce8f3b854f2b35 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Wed, 14 Apr 2021 19:43:48 +0200 Subject: [PATCH] cortexm: add __isr_vector symbol This doesn't change the firmware, but it does make the disassembly of the ELF files. Before: Disassembly of section .text: 00000000 <(machine.UART).Write-0x100>: 0: 20001000 .word 0x20001000 4: 000009db .word 0x000009db 8: 00000f05 .word 0x00000f05 c: 00000f0b .word 0x00000f0b 10: 00000f05 .word 0x00000f05 After: Disassembly of section .text: 00000000 <__isr_vector>: 0: 20001000 .word 0x20001000 4: 000009db .word 0x000009db 8: 00000f05 .word 0x00000f05 c: 00000f0b .word 0x00000f0b 10: 00000f05 .word 0x00000f05 The difference is that the disassembler will now use a proper symbol name instead of using the closest by symbol (in this case, (machine.UART).Write). This makes the disassembly easier to read. --- tools/gen-device-svd/gen-device-svd.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/gen-device-svd/gen-device-svd.go b/tools/gen-device-svd/gen-device-svd.go index 7364b0e47..67d1b1300 100755 --- a/tools/gen-device-svd/gen-device-svd.go +++ b/tools/gen-device-svd/gen-device-svd.go @@ -1103,6 +1103,7 @@ Default_Handler: // https://sourceware.org/binutils/docs/as/Section.html#ELF-Version .section .isr_vector, "a", %progbits .global __isr_vector +__isr_vector: // Interrupt vector as defined by Cortex-M, starting with the stack top. // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading // _stack_top and Reset_Handler.