I debug very easy programm: while(1) {i++;} create without cmsis.
When debug have error:
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:2331
Error message from debugger back end:
Cannot access memory at address 0xffd3901c
Cannot access memory at address 0xffd3901c
and log:
SEGGER J-Link GDB Server V6.45c (beta) Command Line Version
JLinkARM.dll V6.45c (DLL compiled Mar 27 2019 17:38:20)
Command line: -nosilent -swoport 2332 -select USB=17935099 -telnetport 2333 -singlerun -endian little -noir -speed auto -port 2331 -vd -device LPC1778 -if SWD -halt -reportuseraction
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: yes
Generate logfile: off
Verify download: on
Init regs on start: off
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: LPC1778
Target interface: SWD
Target interface speed: auto
Target endian: little
Connecting to J-Link...
J-Link is connected.
Device "LPC1778" selected.
Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
Hardware: V8.00
S/N: 17935099
Feature(s): RDI,FlashDL,FlashBP,JFlash
Checking target voltage...
Target voltage: 3.32 V
Listening on TCP/IP port 2331
Connecting to target...Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x412FC230. Implementer code: 0x41 (ARM)
Found Cortex-M3 r2p0, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 002BB000 SCS
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 002BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 002BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 002BB923 TPIU-Lite
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 002BB924 ETM-M3
Found SW-DP with ID 0x2BA01477
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x412FC230. Implementer code: 0x41 (ARM)
Found Cortex-M3 r2p0, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 002BB000 SCS
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 002BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 002BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 002BB923 TPIU-Lite
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 002BB924 ETM-M3
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000062 (Data = 0xF000E7FD)
Read 2 bytes @ address 0x00000062 (Data = 0xE7FD)
Reading 64 bytes @ address 0x00000000
Reading 64 bytes @ address 0xFFD39000
WARNING: Failed to read memory @ address 0xFFD39000
WARNING: Failed to read memory @ address 0xFFD3901C
GDB closed TCP/IP connection
Restoring target state and closing J-Link connection...
Shutting down...
Server has been shut down.
Why debug need 0xFFD39000???? It is reserved area. In IAR similar soft debug without problem. Hardware is good.
all project is:
Hello grigory,
How about use J-Link Commander?
And which version of MCUXpresso IDE you used?
BR
Alice
MCUxpresso 10.3.0
Problem SOLVED after create new workspace + autoconfig debug settings.
Thanks for your sharing.
Please export and post your project
JLinkExe
SEGGER J-Link Commander V6.45c (Compiled Mar 27 2019 17:38:30)
DLL version V6.45c, compiled Mar 27 2019 17:38:20
Connecting to J-Link via USB...O.K.
Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
Hardware version: V8.00
S/N: 17935099
License(s): RDI,FlashDL,FlashBP,JFlash
VTref=3.319V
Type "connect" to establish a target connection, '?' for help
J-Link>device LPC1778
J-Link>si 1
Selecting SWD as current target interface.
J-Link>speed 2000
Selecting 2000 kHz as target interface speed
J-Link>r
Target connection not established yet but required for command.
Device "LPC1778" selected.
Connecting to target via SWD
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x412FC230. Implementer code: 0x41 (ARM)
Found Cortex-M3 r2p0, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 002BB000 SCS
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 002BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 002BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 002BB923 TPIU-Lite
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 002BB924 ETM-M3
Cortex-M3 identified.
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
J-Link>qc
but GDB server fault:
JLinkGDBServer -device LPC1778 -if SWD -speed 1000
SEGGER J-Link GDB Server V6.45c (beta) Command Line Version
JLinkARM.dll V6.45c (DLL compiled Mar 27 2019 17:38:20)
Command line: -device LPC1778 -if SWD -speed 1000
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: yes
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: LPC1778
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
Hardware: V8.00
S/N: 17935099
Feature(s): RDI,FlashDL,FlashBP,JFlash
Checking target voltage...
Target voltage: 3.32 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...
infinity wait here.