Add all interrupt/exception handlers with default alias

This commit is contained in:
Alexander Heldt
2024-07-28 11:38:02 +02:00
parent d23cb54d58
commit 11d10f41c2
6 changed files with 715 additions and 89 deletions

View File

@@ -121,7 +121,7 @@ init_memory:
.type reset, %function
reset:
.LFB1:
.loc 1 20 18
.loc 1 21 18
.cfi_startproc
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
@@ -131,17 +131,177 @@ reset:
.cfi_offset 14, -4
add r7, sp, #0
.cfi_def_cfa_register 7
.loc 1 21 3
.loc 1 22 3
bl init_memory
.loc 1 23 3
.loc 1 24 3
bl main
.L9:
.loc 1 26 12 discriminator 1
.loc 1 27 12 discriminator 1
nop
b .L9
.cfi_endproc
.LFE1:
.size reset, .-reset
.section .text.default_handler,"ax",%progbits
.align 1
.global default_handler
.syntax unified
.thumb
.thumb_func
.type default_handler, %function
default_handler:
.LFB2:
.loc 1 99 28
.cfi_startproc
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
push {r7}
.cfi_def_cfa_offset 4
.cfi_offset 7, -4
add r7, sp, #0
.cfi_def_cfa_register 7
.L11:
.loc 1 100 12 discriminator 1
nop
b .L11
.cfi_endproc
.LFE2:
.size default_handler, .-default_handler
.weak spi5
.thumb_set spi5,default_handler
.weak spi4
.thumb_set spi4,default_handler
.weak fpu
.thumb_set fpu,default_handler
.weak i2c3_er
.thumb_set i2c3_er,default_handler
.weak i2c3_ev
.thumb_set i2c3_ev,default_handler
.weak usart6
.thumb_set usart6,default_handler
.weak dma2_stream7
.thumb_set dma2_stream7,default_handler
.weak dma2_stream6
.thumb_set dma2_stream6,default_handler
.weak dma2_stream5
.thumb_set dma2_stream5,default_handler
.weak otg_fs
.thumb_set otg_fs,default_handler
.weak dma2_stream4
.thumb_set dma2_stream4,default_handler
.weak dma2_stream3
.thumb_set dma2_stream3,default_handler
.weak dma2_stream2
.thumb_set dma2_stream2,default_handler
.weak dma2_stream1
.thumb_set dma2_stream1,default_handler
.weak dma2_stream0
.thumb_set dma2_stream0,default_handler
.weak spi3
.thumb_set spi3,default_handler
.weak tim5
.thumb_set tim5,default_handler
.weak sdio
.thumb_set sdio,default_handler
.weak dma1_stream7
.thumb_set dma1_stream7,default_handler
.weak otg_fs_wkup
.thumb_set otg_fs_wkup,default_handler
.weak rtc_alarm
.thumb_set rtc_alarm,default_handler
.weak exti15_10
.thumb_set exti15_10,default_handler
.weak usart2
.thumb_set usart2,default_handler
.weak usart1
.thumb_set usart1,default_handler
.weak spi2
.thumb_set spi2,default_handler
.weak spi1
.thumb_set spi1,default_handler
.weak i2c2_er
.thumb_set i2c2_er,default_handler
.weak i2c2_ev
.thumb_set i2c2_ev,default_handler
.weak i2c1_er
.thumb_set i2c1_er,default_handler
.weak i2c1_ev
.thumb_set i2c1_ev,default_handler
.weak tim4
.thumb_set tim4,default_handler
.weak tim3
.thumb_set tim3,default_handler
.weak tim2
.thumb_set tim2,default_handler
.weak tim1_cc
.thumb_set tim1_cc,default_handler
.weak tim1_trg_com_tim11
.thumb_set tim1_trg_com_tim11,default_handler
.weak tim1_up_tim10
.thumb_set tim1_up_tim10,default_handler
.weak tim1_brk_tim9
.thumb_set tim1_brk_tim9,default_handler
.weak exti9_5
.thumb_set exti9_5,default_handler
.weak adc
.thumb_set adc,default_handler
.weak dma1_stream6
.thumb_set dma1_stream6,default_handler
.weak dma1_stream5
.thumb_set dma1_stream5,default_handler
.weak dma1_stream4
.thumb_set dma1_stream4,default_handler
.weak dma1_stream3
.thumb_set dma1_stream3,default_handler
.weak dma1_stream2
.thumb_set dma1_stream2,default_handler
.weak dma1_stream1
.thumb_set dma1_stream1,default_handler
.weak dma1_stream0
.thumb_set dma1_stream0,default_handler
.weak exti4
.thumb_set exti4,default_handler
.weak exti3
.thumb_set exti3,default_handler
.weak exti2
.thumb_set exti2,default_handler
.weak exti1
.thumb_set exti1,default_handler
.weak exti0
.thumb_set exti0,default_handler
.weak rcc
.thumb_set rcc,default_handler
.weak flash
.thumb_set flash,default_handler
.weak rtc_wkup
.thumb_set rtc_wkup,default_handler
.weak tamp_stamp
.thumb_set tamp_stamp,default_handler
.weak pvd
.thumb_set pvd,default_handler
.weak wwdg
.thumb_set wwdg,default_handler
.weak systick
.thumb_set systick,default_handler
.weak pend_sv
.thumb_set pend_sv,default_handler
.weak debug_monitor
.thumb_set debug_monitor,default_handler
.weak x
.thumb_set x,default_handler
.weak sv_call
.thumb_set sv_call,default_handler
.weak usage_fault
.thumb_set usage_fault,default_handler
.weak bus_fault
.thumb_set bus_fault,default_handler
.weak mem_manage
.thumb_set mem_manage,default_handler
.weak hard_fault
.thumb_set hard_fault,default_handler
.weak nmi
.thumb_set nmi,default_handler
.global interrupt_vector_table
.section .isr_vector,"a"
.align 2
@@ -150,23 +310,94 @@ reset:
interrupt_vector_table:
.word stack_start
.word reset
.space 400
.word nmi
.word hard_fault
.word mem_manage
.word bus_fault
.word usage_fault
.word 0
.word 0
.word 0
.word 0
.word sv_call
.word debug_monitor
.word 0
.word pend_sv
.word systick
.word wwdg
.word pvd
.word tamp_stamp
.word rtc_wkup
.word flash
.word rcc
.word exti0
.word exti1
.word exti2
.word exti3
.word exti4
.word dma1_stream0
.word dma1_stream1
.word dma1_stream2
.word dma1_stream3
.word dma1_stream4
.word dma1_stream5
.word dma1_stream6
.word adc
.word exti9_5
.word tim1_brk_tim9
.word tim1_up_tim10
.word tim1_trg_com_tim11
.word tim1_cc
.word tim2
.word tim3
.word tim4
.word i2c1_ev
.word i2c1_er
.word i2c2_ev
.word i2c2_er
.word spi1
.word spi2
.word usart1
.word usart2
.word exti15_10
.word rtc_alarm
.word otg_fs_wkup
.word dma1_stream7
.word sdio
.word tim5
.word spi3
.word dma2_stream0
.word dma2_stream1
.word dma2_stream2
.word dma2_stream3
.word dma2_stream4
.word otg_fs
.word dma2_stream5
.word dma2_stream6
.word dma2_stream7
.word usart6
.word i2c3_ev
.word i2c3_er
.word fpu
.word spi4
.word spi5
.space 116
.text
.Letext0:
.file 2 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/machine/_default_types.h"
.file 3 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/sys/_stdint.h"
.section .debug_info,"",%progbits
.Ldebug_info0:
.4byte 0x172
.4byte 0x184
.2byte 0x5
.byte 0x1
.byte 0x4
.4byte .Ldebug_abbrev0
.uleb128 0x7
.4byte .LASF628
.byte 0x1d
.4byte .LASF629
.4byte .LASF630
.byte 0x1d
.4byte .LASF631
.4byte .LASF632
.4byte .LLRL0
.4byte 0
.4byte .Ldebug_line0
@@ -238,36 +469,45 @@ interrupt_vector_table:
.4byte 0x9d
.uleb128 0xb
.uleb128 0xc
.4byte .LASF622
.4byte .LASF624
.byte 0x1
.byte 0x1f
.byte 0x69
.byte 0xe
.4byte 0x98
.uleb128 0x5
.byte 0x3
.4byte interrupt_vector_table
.uleb128 0xd
.4byte .LASF631
.4byte .LASF633
.byte 0x1
.byte 0x3
.byte 0xd
.uleb128 0xe
.4byte .LASF632
.4byte .LASF634
.byte 0x1
.byte 0x4
.byte 0xc
.4byte 0x6e
.uleb128 0xf
.4byte .LASF633
.4byte .LASF622
.byte 0x1
.byte 0x14
.byte 0x63
.byte 0x6
.4byte .LFB2
.4byte .LFE2-.LFB2
.uleb128 0x1
.byte 0x9c
.uleb128 0x10
.4byte .LASF623
.byte 0x1
.byte 0x15
.byte 0x6
.4byte .LFB1
.4byte .LFE1-.LFB1
.uleb128 0x1
.byte 0x9c
.uleb128 0x10
.4byte .LASF634
.uleb128 0x11
.4byte .LASF635
.byte 0x1
.byte 0x6
.byte 0x6
@@ -275,41 +515,41 @@ interrupt_vector_table:
.4byte .LFE0-.LFB0
.uleb128 0x1
.byte 0x9c
.4byte 0x170
.4byte 0x182
.uleb128 0x2
.4byte .LASF623
.4byte .LASF625
.byte 0x8
.byte 0x13
.4byte 0x7c
.uleb128 0x2
.4byte .LASF624
.4byte .LASF626
.byte 0x8
.byte 0x20
.4byte 0x7c
.uleb128 0x2
.4byte .LASF625
.4byte .LASF627
.byte 0x8
.byte 0x2b
.4byte 0x7c
.uleb128 0x2
.4byte .LASF626
.4byte .LASF628
.byte 0xe
.byte 0x13
.4byte 0x7c
.uleb128 0x2
.4byte .LASF627
.4byte .LASF629
.byte 0xe
.byte 0x1f
.4byte 0x7c
.uleb128 0x11
.uleb128 0x12
.4byte .LBB2
.4byte .LBE2-.LBB2
.4byte 0x157
.4byte 0x169
.uleb128 0x3
.ascii "dst\000"
.byte 0x9
.byte 0x12
.4byte 0x170
.4byte 0x182
.uleb128 0x2
.byte 0x91
.sleb128 -12
@@ -317,19 +557,19 @@ interrupt_vector_table:
.ascii "src\000"
.byte 0x9
.byte 0x27
.4byte 0x170
.4byte 0x182
.uleb128 0x2
.byte 0x91
.sleb128 -16
.byte 0
.uleb128 0x12
.uleb128 0x13
.4byte .LBB3
.4byte .LBE3-.LBB3
.uleb128 0x3
.ascii "dst\000"
.byte 0xf
.byte 0x12
.4byte 0x170
.4byte 0x182
.uleb128 0x2
.byte 0x91
.sleb128 -20
@@ -558,12 +798,37 @@ interrupt_vector_table:
.uleb128 0x6
.uleb128 0x40
.uleb128 0x18
.uleb128 0x7c
.uleb128 0x7a
.uleb128 0x19
.byte 0
.byte 0
.uleb128 0x10
.uleb128 0x2e
.byte 0
.uleb128 0x3f
.uleb128 0x19
.uleb128 0x3
.uleb128 0xe
.uleb128 0x3a
.uleb128 0xb
.uleb128 0x3b
.uleb128 0xb
.uleb128 0x39
.uleb128 0xb
.uleb128 0x27
.uleb128 0x19
.uleb128 0x11
.uleb128 0x1
.uleb128 0x12
.uleb128 0x6
.uleb128 0x40
.uleb128 0x18
.uleb128 0x7c
.uleb128 0x19
.byte 0
.byte 0
.uleb128 0x11
.uleb128 0x2e
.byte 0x1
.uleb128 0x3f
.uleb128 0x19
@@ -589,7 +854,7 @@ interrupt_vector_table:
.uleb128 0x13
.byte 0
.byte 0
.uleb128 0x11
.uleb128 0x12
.uleb128 0xb
.byte 0x1
.uleb128 0x11
@@ -600,7 +865,7 @@ interrupt_vector_table:
.uleb128 0x13
.byte 0
.byte 0
.uleb128 0x12
.uleb128 0x13
.uleb128 0xb
.byte 0x1
.uleb128 0x11
@@ -611,7 +876,7 @@ interrupt_vector_table:
.byte 0
.byte 0
.section .debug_aranges,"",%progbits
.4byte 0x24
.4byte 0x2c
.2byte 0x2
.4byte .Ldebug_info0
.byte 0x4
@@ -622,6 +887,8 @@ interrupt_vector_table:
.4byte .LFE0-.LFB0
.4byte .LFB1
.4byte .LFE1-.LFB1
.4byte .LFB2
.4byte .LFE2-.LFB2
.4byte 0
.4byte 0
.section .debug_rnglists,"",%progbits
@@ -639,6 +906,9 @@ interrupt_vector_table:
.byte 0x7
.4byte .LFB1
.uleb128 .LFE1-.LFB1
.byte 0x7
.4byte .LFB2
.uleb128 .LFE2-.LFB2
.byte 0
.Ldebug_ranges3:
.section .debug_macro,"",%progbits
@@ -2621,7 +2891,7 @@ interrupt_vector_table:
.ascii "INTMAX_MIN (-INTMAX_MAX - 1)\000"
.LASF315:
.ascii "__ULACCUM_EPSILON__ 0x1P-32ULK\000"
.LASF629:
.LASF631:
.ascii "src/startup.c\000"
.LASF476:
.ascii "__MISC_VISIBLE 1\000"
@@ -2843,8 +3113,6 @@ interrupt_vector_table:
.ascii "__FDPIC__\000"
.LASF111:
.ascii "__INT_LEAST16_WIDTH__ 16\000"
.LASF168:
.ascii "__DBL_MAX_EXP__ 1024\000"
.LASF529:
.ascii "_UINT16_T_DECLARED \000"
.LASF523:
@@ -2863,7 +3131,7 @@ interrupt_vector_table:
.ascii "__ARM_NEON\000"
.LASF400:
.ascii "__ARM_FEATURE_CMSE\000"
.LASF630:
.LASF632:
.ascii "/home/alex/code/own/c-compile-experiments\000"
.LASF229:
.ascii "__FLT64_IS_IEC_60559__ 2\000"
@@ -2935,7 +3203,7 @@ interrupt_vector_table:
.ascii "__ULFRACT_EPSILON__ 0x1P-32ULR\000"
.LASF53:
.ascii "__INT_LEAST32_TYPE__ long int\000"
.LASF634:
.LASF635:
.ascii "init_memory\000"
.LASF272:
.ascii "__ULFRACT_IBIT__ 0\000"
@@ -2963,7 +3231,7 @@ interrupt_vector_table:
.ascii "__FLT32X_DENORM_MIN__ 4.9406564584124654e-324F32x\000"
.LASF427:
.ascii "__ARM_FEATURE_FP16_SCALAR_ARITHMETIC\000"
.LASF631:
.LASF633:
.ascii "stack_start\000"
.LASF286:
.ascii "__SACCUM_FBIT__ 7\000"
@@ -2971,7 +3239,7 @@ interrupt_vector_table:
.ascii "__WCHAR_TYPE__ unsigned int\000"
.LASF173:
.ascii "__DBL_MIN__ ((double)2.2250738585072014e-308L)\000"
.LASF624:
.LASF626:
.ascii "_data_end\000"
.LASF258:
.ascii "__FRACT_MIN__ (-0.5R-0.5R)\000"
@@ -3023,9 +3291,9 @@ interrupt_vector_table:
.ascii "__UDA_FBIT__ 32\000"
.LASF582:
.ascii "INT_FAST32_MIN (-__INT_FAST32_MAX__ - 1)\000"
.LASF625:
.ascii "_data_addr\000"
.LASF627:
.ascii "_data_addr\000"
.LASF629:
.ascii "_bss_end\000"
.LASF417:
.ascii "__THUMBEL__ 1\000"
@@ -3191,6 +3459,8 @@ interrupt_vector_table:
.ascii "__INT_LEAST16_TYPE__ short int\000"
.LASF201:
.ascii "__FLT32_MAX_EXP__ 128\000"
.LASF622:
.ascii "default_handler\000"
.LASF522:
.ascii "__LEAST32 \"l\"\000"
.LASF223:
@@ -3265,7 +3535,7 @@ interrupt_vector_table:
.ascii "__SVID_VISIBLE 1\000"
.LASF414:
.ascii "__GCC_ASM_FLAG_OUTPUTS__ 1\000"
.LASF623:
.LASF625:
.ascii "_data_start\000"
.LASF601:
.ascii "UINT8_C(x) __UINT8_C(x)\000"
@@ -3301,8 +3571,8 @@ interrupt_vector_table:
.ascii "__SIZEOF_LONG__ 4\000"
.LASF499:
.ascii "__int20\000"
.LASF118:
.ascii "__UINT_LEAST8_MAX__ 0xff\000"
.LASF168:
.ascii "__DBL_MAX_EXP__ 1024\000"
.LASF463:
.ascii "_DEFAULT_SOURCE\000"
.LASF14:
@@ -3453,10 +3723,12 @@ interrupt_vector_table:
.ascii "__WINT_WIDTH__ 32\000"
.LASF498:
.ascii "short\000"
.LASF626:
.LASF628:
.ascii "_bss_start\000"
.LASF471:
.ascii "__ATFILE_VISIBLE 1\000"
.LASF16:
.ascii "__SIZEOF_INT__ 4\000"
.LASF530:
.ascii "__int16_t_defined 1\000"
.LASF613:
@@ -3543,7 +3815,7 @@ interrupt_vector_table:
.ascii "__ARM_FEATURE_SIMD32 1\000"
.LASF75:
.ascii "__WCHAR_MAX__ 0xffffffffU\000"
.LASF633:
.LASF623:
.ascii "reset\000"
.LASF18:
.ascii "__SIZEOF_LONG_LONG__ 8\000"
@@ -3597,7 +3869,7 @@ interrupt_vector_table:
.ascii "__UINT64_C(c) c ## ULL\000"
.LASF310:
.ascii "__LACCUM_EPSILON__ 0x1P-31LK\000"
.LASF632:
.LASF634:
.ascii "main\000"
.LASF250:
.ascii "__SFRACT_EPSILON__ 0x1P-7HR\000"
@@ -3665,7 +3937,7 @@ interrupt_vector_table:
.ascii "__LDBL_EPSILON__ 2.2204460492503131e-16L\000"
.LASF67:
.ascii "__INTPTR_TYPE__ int\000"
.LASF622:
.LASF624:
.ascii "interrupt_vector_table\000"
.LASF145:
.ascii "__DEC_EVAL_METHOD__ 2\000"
@@ -3697,7 +3969,7 @@ interrupt_vector_table:
.ascii "_NEWLIB_VERSION \"4.3.0\"\000"
.LASF321:
.ascii "__ULLACCUM_FBIT__ 32\000"
.LASF628:
.LASF630:
.ascii "GNU C17 12.3.1 20230626 -mcpu=cortex-m4 -mthumb -mf"
.ascii "loat-abi=hard -mfpu=fpv4-sp-d16 -march=armv7e-m+fp "
.ascii "-g3 -ggdb -O0 -ffunction-sections -fdata-sections -"
@@ -3734,8 +4006,8 @@ interrupt_vector_table:
.ascii "__INT_FAST32_TYPE__ int\000"
.LASF161:
.ascii "__FLT_HAS_QUIET_NAN__ 1\000"
.LASF16:
.ascii "__SIZEOF_INT__ 4\000"
.LASF118:
.ascii "__UINT_LEAST8_MAX__ 0xff\000"
.LASF38:
.ascii "__INTMAX_TYPE__ long long int\000"
.LASF511: