stkarm/src/dbg.s

34 lines
440 B
ArmAsm
Raw Normal View History

.data
panic_msg:
.string "=== PANIC : I'm afraid I have lost my towel"
2018-12-28 10:30:39 +00:00
.text
.extern c_printk
.global printk
printk:
push {lr}
2018-12-30 22:07:00 +00:00
/* disables IRQ and FIQ in CPU */
2018-12-28 10:30:39 +00:00
cpsid if
/* C-Implementation */
bl c_printk
2018-12-30 22:07:00 +00:00
/* enables IRQ and FIQ in CPU */
2018-12-28 10:30:39 +00:00
cpsie if
pop {pc}
/* TODO: to be implemented in a more useful way */
.global panic
panic:
cpsid if
ldr r0, =panic_msg
bl printkl
1:
wfi
b 1b