a_ziliu 发表于 2014-2-12 21:25
半主機模式與實體的 uart 是有區別的,請看測試報告 IF SEMIHOSTED
LDR R0, [R13, #24] ; Get previous PC
LDRH R1, [R0] ; Get instruction
LDR R2, =0xBEAB ; The sepcial BKPT instruction
CMP R1, R2 ; Test if the instruction at previous PC is
BKPT
BNE HardFault_Handler_Ret ; Not BKPT
ADDS R0, #4 ; Skip BKPT and next line
STR R0, [R13, #24] ; Save previous PC
BX LR
把这段代码加到哪个文件里面呢 |