Keil5 Jlink Debugging reported the following error, the following steps:
1, after compiling, please do not hurry to click the Start Debugging button, but click Download, first download the program to the chip;
2, check the Jlink SW debugging mode frequency, it is possible that the frequency is too large, the default is 2MHz, modified to 1MHz on the good;
3. In the options for Target , select the Debug tab, then select J-link/j-trace Cortex, click Settings, select the FLASH Download tab in the pop-up window, and then root According to the chip model and flash size, choose a match with your chip configuration, the default is 1M Flash, my chip is 512K.
There is also a debugging to pay attention to the small place is, when you debug, set breakpoints, may only watch global variables, not watch local variables, because the compiler optimized the code.
You need the Options for Target ' STM32 ... ' In the summer of C/C + + selection, find optimization, set the compilation optimization selection for Level 0 (-o0).
**jlink Warning:cpu could not to be halted
Jlink Error:can not read register (R15) while CPU is running
Jlink Error:can not read register (XPSR) while CPU is running
Jlink error:can Not read register 0 (R0) while CPU is running
Jlink Error:can Not read Register 1 (R1) while CPU is running
Jlink Error:can Not read Register 2 (R2) while CPU is running
Jlink Error:can Not read Register 3 (R3) while CPU is running
Jlink Error:can Not read Register 4 (R4) while CPU is running
Jlink Error:can Not read Register 5 (R5) while CPU is running
Jlink Error:can Not read register 6 (R6) while CPU is running
Jlink Error:can Not read Register 7 (R7) while CPU is running
Jlink Error:can Not read Register 8 (R8) while CPU is running
Jlink Error:can Not read Register 9 (R9) while CPU is running
Jlink Error:can not read register (R10) while CPU is running
Jlink Error:can not read register one (R11) while CPU is running
Jlink Error:can not read register (R12) while CPU is running
Jlink Error:can not read register (R13) while CPU is running
Jlink Error:can not read register (R14) while CPU is running
Jlink Error:can not read register (R15) while CPU is running
Jlink Error:can not read register (XPSR) while CPU is running
Jlink Error:can not read register (MSP) while CPU is running
Jlink Error:can not read register (PSP) while CPU is running
Jlink Error:can not read register (CFBP) while CPU is running
Jlink error:can Not read register 0 (R0) while CPU is running
Jlink Error:can Not read Register 1 (R1) while CPU is running
Jlink Error:can Not read Register 2 (R2) while CPU is running
Jlink Error:can Not read Register 3 (R3) while CPU is running
Jlink Error:can Not read Register 4 (R4) while CPU is running
Jlink Error:can Not read Register 5 (R5) while CPU is running
Jlink Error:can Not read register 6 (R6) while CPU is running
Jlink Error:can Not read Register 7 (R7) while CPU is running
Jlink Error:can Not read Register 8 (R8) while CPU is running
Jlink Error:can Not read Register 9 (R9) while CPU is running
Jlink Error:can not read register (R10) while CPU is running
Jlink Error:can not read register one (R11) while CPU is running
Jlink Error:can not read register (R12) while CPU is running
Jlink Error:can not read register (R13) while CPU is running
Jlink Error:can not read register (R14) while CPU is running
Jlink Error:can not read register (R15) while CPU is running
Jlink Error:can not read register (XPSR) while CPU is running
Jlink Error:can not read register (MSP) while CPU is running
Jlink Error:can not read register (PSP) while CPU is running
Jlink Error:can not read register (CFBP) while CPU is running
Jlink error:can Not read register 0 (R0) while CPU is running
Jlink Error:can Not read Register 1 (R1) while CPU is running
Jlink Error:can Not read Register 2 (R2) while CPU is running
Jlink Error:can Not read Register 3 (R3) while CPU is running
Jlink Error:can Not read Register 4 (R4) while CPU is running
Jlink Error:can Not read Register 5 (R5) while CPU is running
Jlink Error:can Not read register 6 (R6) while CPU is running
Jlink Error:can Not read Register 7 (R7) while CPU is running
Jlink Error:can Not read Register 8 (R8) while CPU is running
Jlink Error:can Not read Register 9 (R9) while CPU is running
Jlink Error:can not read register (R10) while CPU is running
Jlink Error:can not read register one (R11) while CPU is running
Jlink Error:can not read register (R12) while CPU is running
Jlink Error:can not read register (R13) while CPU is running
Jlink Error:can not read register (R14) while CPU is running
Jlink Error:can not read register (R15) while CPU is running
Jlink Error:can not read register (XPSR) while CPU is running
Jlink Error:can not read register (MSP) while CPU is running
Jlink Error:can not read register (PSP) while CPU is running
Jlink Error:can not read register (CFBP) while CPU is running
Jlink error:can Not read register 0 (R0) while CPU is running
Jlink Error:can Not read Register 1 (R1) while CPU is running
Jlink Error:can Not read Register 2 (R2) while CPU is running
Jlink Error:can Not read Register 3 (R3) while CPU is running
Jlink Error:can Not read Register 4 (R4) while CPU is running
Jlink Error:can Not read Register 5 (R5) while CPU is running
Jlink Error:can Not read register 6 (R6) while CPU is running
Jlink Error:can Not read Register 7 (R7) while CPU is running
Jlink Error:can Not read Register 8 (R8) while CPU is running
Jlink Error:can Not read Register 9 (R9) while CPU is running
Jlink Error:can not read register (R10) while CPU is running
Jlink Error:can not read register one (R11) while CPU is running
Jlink Error:can not read register (R12) while CPU is running
Jlink Error:can not read register (R13) while CPU is running
Jlink Error:can not read register (R14) while CPU is running
Jlink Error:can not read register (R15) while CPU is running
Jlink Error:can not read register (XPSR) while CPU is running
Jlink Error:can not read register (MSP) while CPU is running
Jlink Error:can not read register (PSP) while CPU is running
Jlink Error:can not read register (CFBP) while CPU is running
Jlink error:can Not read register 0 (R0) while CPU is running
Jlink Error:can Not read Register 1 (R1) while CPU is running
Jlink Error:can Not read Register 2 (R2) while CPU is running
Jlink Error:can Not read Register 3 (R3) while CPU is running
Jlink Error:can Not read Register 4 (R4) while CPU is running
Jlink Error:can Not read Register 5 (R5) while CPU is running
Jlink Error:can Not read register 6 (R6) while CPU is running
Jlink Error:can Not read Register 7 (R7) while CPU is running
Jlink Error:can Not read Register 8 (R8) while CPU is running
Jlink Error:can Not read Register 9 (R9) while CPU is running
Jlink Error:can not read register (R10) while CPU is running
Jlink Error:can not read register one (R11) while CPU is running
Jlink Error:can not read register (R12) while CPU is running
Jlink Error:can not read register (R13) while CPU is running
Jlink Error:can not read register (R14) while CPU is running
Jlink Error:can not read register (R15) while CPU is running
Jlink Error:can not read register (XPSR) while CPU is running
Jlink Error:can not read register (MSP) while CPU is running
Jlink Error:can not read register (PSP) while CPU is running
Jlink Error:can not read register (CFBP) while CPU is running