stkarm/src/dbg.s

34 lines
440 B
ArmAsm

.data
panic_msg:
.string "=== PANIC : I'm afraid I have lost my towel"
.text
.extern c_printk
.global printk
printk:
push {lr}
/* disables IRQ and FIQ in CPU */
cpsid if
/* C-Implementation */
bl c_printk
/* enables IRQ and FIQ in CPU */
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