Hi there. I'm trying to track down a problem with code optimisation which results in my M0 target crashing at boot. On this target platform I have to load code onto the target (via the SEGGER J-Link box) using a third party executable (as hashes are written as well as the code). Unfortunately this third party application resets the target after download. As soon as the target is running with this bad code that I want to debug, J-Link can no longer connect to it so I am unable to see what's going on.
My question is: is there some way I'm missing to get J-Link to definitively connect to a target (over SWD) whatever code it is running?
Here's the J-Link output from the bad case:
Display All
...and, for reference, here is the J-Link output from a good case (i.e. with the target running less optimised code which runs fine):
Display All
Rob
My question is: is there some way I'm missing to get J-Link to definitively connect to a target (over SWD) whatever code it is running?
Here's the J-Link output from the bad case:
Source Code
- SEGGER J-Link Commander V6.10c (Compiled Sep 28 2016 18:45:46)
- DLL version V6.10c, compiled Sep 28 2016 18:45:15
- Connecting to J-Link via USB...O.K.
- Firmware: J-Link V9 compiled Sep 1 2016 18:29:50
- Hardware version: V9.30
- S/N: 59304256
- License(s): GDB
- VTref = 1.780V
- Type "connect" to establish a target connection, '?' for help
- J-Link>connect
- Please specify device / core. : CORTEX-M0
- Type '?' for selection dialog
- Device>
- Please specify target interface: J) JTAG (Default) S) SWD
- TIF>S
- Specify target interface speed [kHz]. : 4000 kHz
- Speed>100
- Device "CORTEX-M0" selected.
- Found SWD-DP with ID 0x5BA02477
- AP-IDR: 0x74770001, Type: AHB-AP
- ****** Error: DAP error while reading AIRCR / CPUID register
- Found SWD-DP with ID 0x5BA02477
- AP-IDR: 0x74770001, Type: AHB-AP
- Found SWD-DP with ID 0x5BA02477
- AP-IDR: 0x74770001, Type: AHB-AP
- Found SWD-DP with ID 0x5BA02477
- AP-IDR: 0x74770001, Type: AHB-AP
- Cannot connect to target.
...and, for reference, here is the J-Link output from a good case (i.e. with the target running less optimised code which runs fine):
Source Code
- SEGGER J-Link Commander V6.10c (Compiled Sep 28 2016 18:45:46)
- DLL version V6.10c, compiled Sep 28 2016 18:45:15
- Connecting to J-Link via USB...O.K.
- Firmware: J-Link V9 compiled Sep 1 2016 18:29:50
- Hardware version: V9.30
- S/N: 59304256
- License(s): GDB
- VTref = 1.780V
- Type "connect" to establish a target connection, '?' for help
- J-Link>connect
- Please specify device / core. : CORTEX-M0
- Type '?' for selection dialog
- Device>
- Please specify target interface: J) JTAG (Default) S) SWD
- TIF>S
- Specify target interface speed [kHz]. : 4000 kHz
- Speed>100
- Device "CORTEX-M0" selected.
- Found SWD-DP with ID 0x5BA02477
- AP-IDR: 0x74770001, Type: AHB-AP
- Found Cortex-M0 r0p0, Little endian.
- FPUnit: 4 code (BP) slots and 0 literal slots
- CoreSight components:
- ROMTbl 0 @ E00FF000
- ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
- ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
- ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
- Cortex-M0 identified.
Rob
The post was edited 17 times, last by RobMeades ().