Programing & Debuging lpc2366

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programing & Debuging lpc2366

1,560 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Inclooder on Wed Jun 18 00:15:18 MST 2014
Hello,

I am working on lpc2366 with lpcxpresso. I am connected via SEGGER JLink,
I have made steps described here http://www.segger.com/nxp-lpcxpresso.html

Here is my output from JLinkGDBServer

JLinkARM.dll V4.86a (DLL compiled Jun 11 2014 17:45:07)

-----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:            on
Silent mode:                   off
Single run mode:               off
Target connection timeout:     5 sec.
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 unspecified
Target interface:              JTAG
Target interface speed:        1000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link ARM V8 compiled Nov 25 2013 19:20:08
Hardware: V8.00
S/N: 58006015
Checking target voltage...
Target voltage: 3.33 V
Listening on TCP/IP port 2331
Connecting to target...
J-Link found 1 JTAG device, Total IRLen = 4
JTAG ID: 0x4F1F0F0F (ARM7)
Connected to target
Waiting for GDB connection...



When I hit debug on lpcxpresso i get

Connected to 127.0.0.1
Reading all registers
ERROR: Can not read register 0 (R0) while CPU is running
WARNING: Failed to read memory @ address 0xF7FFFFFF
WARNING: Failed to read memory @ address 0xF7FFFFFF
Reading 8 bytes @ address 0xF7FFFFFF
WARNING: Failed to read memory @ address 0xF7FFFFFF
Reading 7 bytes @ address 0xF7FFFFFF
WARNING: Failed to read memory @ address 0xF7FFFFFF
Resetting target
Downloading 748 bytes @ address 0x00000000
ERROR: Write memory error @ address 0x000000A8, word access: Core error.
Writing register (R8 = 0x00000050)
WARNING: Unsupported register (-1)
WARNING: Failed to read memory @ address 0x00000050
WARNING: Failed to read memory @ address 0x00000050
WARNING: Failed to read memory @ address 0x00000050
WARNING: Failed to read memory @ address 0x00000050
Reading 14 bytes @ address 0x00000050
WARNING: Failed to read memory @ address 0x00000050
WARNING: Failed to read memory @ address 0x00000200
WARNING: Failed to read memory @ address 0x00000200
WARNING: Failed to read memory @ address 0x00000200
WARNING: Failed to read memory @ address 0x00000200
Reading 14 bytes @ address 0x00000200
WARNING: Failed to read memory @ address 0x00000200
WARNING: Failed to read memory @ address 0x00000200
WARNING: Failed to read memory @ address 0x00000200
WARNING: Failed to read memory @ address 0x00000208


My lpcxpresso version is LPCXpresso v7.2.0 [Build 153] [2014-05-19]

What did I wrong?



Regards
0 Kudos
Reply
5 Replies

1,482 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SEGGER - Alex on Tue Jun 24 01:41:59 MST 2014
Hi,

This is why I asked for an logfile...
I thought it was clear that I meant a logfile from a session that failed / showed the error...
The logfile you provided did not indicate any errors etc. and just showed a working session.

As I already wrote, the initial connection attempt made by GDBServer also seems to work properly.
It started to get problematic when LPCXpresso connected to GDBServer, so I assume it is any of the init steps etc. performed by LPCXpresso that causes a problem here.


- Alex
0 Kudos
Reply

1,482 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Inclooder on Tue Jun 24 01:33:37 MST 2014
Hi,

Yes, reset is connected properly. I can program/debug by using crossWorks IDE and jLink, it has native support for Jlink.
The problem occurs when I try to use lpcxpressow with JlinkGDBServer ...

Regards
0 Kudos
Reply

1,482 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SEGGER - Alex on Fri Jun 20 05:29:09 MST 2014
Hi,

Logfile looks good to me so far.
No indicators of the error messages you posted, initially.
I see two things that do not look that good:

1) You are not passing the device name to GDBServer, so it is not able to perform flash download and special reset handling automatically.
Can be done by starting GDBServer like this:

JLinkGDBServerCL.exe -device LPC2366 -if JTAG -speed adaptive

2) It seems the reset does not work properly. Is the reset pin of the LPC2366 properly connected to pin 15 of the J-Link connector?
Did you make sure that nRESET and nTRST are *not* tied together?


- Alex
0 Kudos
Reply

1,482 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Inclooder on Fri Jun 20 03:08:06 MST 2014
Hi,

I am using command line version, I have found "-log" option for the same purpose.
JLinkGDBServer -log "Jlinklog.txt"


Regards
0 Kudos
Reply

1,482 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SEGGER - Alex on Thu Jun 19 04:11:56 MST 2014
Hi,

It seems that basic communication etc. is working, since before LPCXpresso connects to GDBServer, the target CPU could be identified, halted etc.
I assume that there is something going wrong after the connection to LPCXpresso is established.
Can you please generate a GDBServer logfile and post it here?
Please refer to the attached screenshot for information how to generate a GDBServer logfile.
Currently, it just looks like a small configuration problem which can be "fixed" (by configuring it correctly) easily.


Best regards
Alex
0 Kudos
Reply