2018-03-07 23:01:27 +00:00
|
|
|
/*
|
|
|
|
* 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-07 23:01:27 +00:00
|
|
|
.globl vectors
|
2018-03-07 23:55:54 +00:00
|
|
|
vectors:
|
2018-03-07 23:01:27 +00:00
|
|
|
.align 2
|
2018-03-08 03:50:01 +00:00
|
|
|
.long 0x20002000 /* best guess at stack pointer */
|
2018-03-07 23:01:27 +00:00
|
|
|
.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 */
|
2018-03-07 23:01:27 +00:00
|
|
|
.skip 0x20 /* reserved */
|
2018-03-08 03:50:01 +00:00
|
|
|
.long hang /* svcall handler */
|
|
|
|
.long hang /* debug handler */
|
2018-03-07 23:01:27 +00:00
|
|
|
.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-07 23:01:27 +00:00
|
|
|
|
2018-03-08 03:50:01 +00:00
|
|
|
.thumb_func
|
2018-03-07 23:01:27 +00:00
|
|
|
reset_handler:
|
|
|
|
bl main
|