sandbox/blue-pill/blinky/startup.s

37 lines
792 B
ArmAsm
Raw Normal View History

/*
* Startup code for the STM32F103-based blue pill board.
*
* TODO: revisit stack pointer
* TODO: is the IRQv buffer actually needed right now?
*/
2018-03-08 03:50:01 +00:00
.cpu cortex-m3
.thumb
.globl vectors
vectors:
.align 2
2018-03-08 03:50:01 +00:00
.long 0x20002000 /* best guess at stack pointer */
.long reset_handler /* reset handler */
2018-03-08 03:50:01 +00:00
.long hang /* NMI handler */
.long hang /* hard_fault_handler */
.long hang /* memory management handler */
.long hang /* bus fault handler */
.long hang /* usage fault handler */
.skip 0x20 /* reserved */
2018-03-08 03:50:01 +00:00
.long hang /* svcall handler */
.long hang /* debug handler */
.skip 4 /* reserved */
2018-03-08 03:50:01 +00:00
.long hang /* pendsv handler */
.long hang /* systick handler */
.skip 0x100 /* remaining / IRQ vectors */
.thumb_func
hang: b .
2018-03-08 03:50:01 +00:00
.thumb_func
reset_handler:
bl main