boot2.s (485B)
1 .cpu cortex-m0plus 2 .thumb 3 4 .section .boot2 5 setup_xip: 6 ldr r3, rom_base 7 8 ldrh r0, [r3, #0x14] // rom_func_table 9 ldr r1, =('C' | 'X' << 8) // _flash_enter_cmd_xip() 10 ldrh r2, [r3, #0x18] // rom_table_lookup 11 blx r2 12 blx r0 13 14 ldr r0, =vectors 15 ldr r1, m0plus_vtor 16 str r0, [r1, #0] // M0PLUS: VTOR 17 ldr r1, [r0, #4] // entry point 18 ldr r0, [r0, #0] // stack pointer 19 mov sp, r0 20 bx r1 21 22 .align 2 23 rom_base: 24 .word 0x00000000 25 m0plus_vtor: 26 .word 0xe0000000 + 0xed08 27 literals: 28 .ltorg 29