sandbox/blue-pill/blinky/startup.s

34 lines
771 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
2018-03-13 05:48:05 +00:00
.section .text
.global vectors
vectors:
.align 2
2018-03-13 05:48:05 +00:00
.long 0x100 /* best guess at stack pointer */
.long reset_handler /* reset handler */
2018-03-13 05:48:05 +00:00
.long 0 /* NMI handler */
.long 0 /* hard_fault_handler */
.long 0 /* memory management handler */
.long 0 /* bus fault handler */
.long 0 /* usage fault handler */
.skip 0x20 /* reserved */
2018-03-13 05:48:05 +00:00
.long 0 /* svcall handler */
.long 0 /* debug handler */
.skip 4 /* reserved */
2018-03-13 05:48:05 +00:00
.long 0 /* pendsv handler */
.long 0 /* systick handler */
.skip 0xf4 /* remaining / IRQ vectors */
2018-03-08 03:50:01 +00:00
.thumb_func
2018-03-13 05:48:05 +00:00
.global reset_handler
reset_handler:
bl main