We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I'm working with Keil MCB1700 target board testing NXP LPC1768 Cortex chip. But cant get JLink RDI to debug the Blinky demo using Vision3 version V3.80 evaluation. Any ideas would be appreciated!
Following the QSG, first the Blinky demo build is OK. Then I want to use JLink RDI (not ULINK), for target test. After configuring RDI interface driver in the flash tools settings using C:\Keil\ARM\Segger\JLinkRDI.dll C:\Keil\ARM\Segger\JLinkRDI.ini Download Blink.AXF seems to work, but after that breakpoints and target execution do not. The target ends up somewhere other than main and I can't properly debug the session.
from uVision I can edit the R15(PC) and alter the dis-assembly instruction, and a quick test with c:\Keil\ARM\Segger\JLink.exe seems OK
SEGGER J-Link Commander V4.03l ('?' for help) Compiled Feb 17 2009 17:08:48 DLL version V4.03r, compiled Mar 9 2009 18:04:21 Firmware: J-Link ARM V6 compiled Jun 30 2009 11:04:04 Hardware: V6.00 S/N : 56001411 Feature(s) : RDI VTarget = 3.300V Info: TotalIRLen = 4, IRPrint = 0x01 Info: Found Cortex-M3 r2p0, Little endian. Info: TPIU fitted. Info: ETM fitted. Info: FPUnit: 6 code (BP) slots and 2 literal slots Found 1 JTAG device, Total IRLen = 4: Id of device #0: 0x4BA00477 Cortex-M3 identified. JTAG speed: 5 kHz J-Link>
So this is very puzzling!
you may try uVision4 with the J-LINK/J-TRACE driver, not the RDI agent.
To my experience, J-Link with RDI agent works with uVision, but not reliable. I once tried both J-LINK and U-LINK2 for the same code. With U-LINK2, the code ran correctly. With J-Link and RDI agent, the code ran into dead loop.
http://www.keil.com/forum/docs/thread15797.asp
This is already very helpful. thank you for the responses. I upgraded to uVision 4 and changed over to use Cortex-M3 JLink target driver instead of RDI. I can see there is a lot more extensive support for J-Link. and the Driver Setup settings all appear OK
However, unfortunately download to the board and target reset fails. I noticed there is a JLinkLog.txt in the project directory and I pasted it here: Perhaps the root problem is that I have to define the flash memory sectors for the target chip, or that the default for LPC1768Flash project are bad?
--------------- JLINKLOG.TXT ---------------
T0D94 000:343 J-Link ARM DLL Log File (0000ms, 0342ms total) T0D94 000:343 DLL Compiled: Jun 30 2009 19:10:31 (0001ms, 0342ms total) T0D94 000:343 Logging started @ 2009-11-10 09:49 (0001ms, 0342ms total) T0D94 000:344 JLINKARM_SetWarnOutHandler(...) (0000ms, 0343ms total) T0D94 000:344 JLINKARM_OpenEx(...)Firmware: J-Link ARM V6 compiled Jun 30 2009 11:04:04 (0003ms, 0343ms total) T0D94 000:344 returns O.K. (0052ms, 0343ms total) T0D94 000:396 JLINKARM_SetErrorOutHandler(...) (0000ms, 0395ms total) T0D94 000:396 JLINKARM_TIF_Select(JLINKARM_TIF_JTAG) returns 0x00 (0000ms, 0395ms total) T0D94 000:397 JLINKARM_SetSpeed(2000) (0001ms, 0395ms total) T0D94 000:400 JLINKARM_GetHardwareVersion() returns 0xEA60 (0000ms, 0396ms total) T0D94 000:400 JLINKARM_GetDLLVersion() returns 40802 (0000ms, 0396ms total) T0D94 000:400 JLINKARM_GetFirmwareString(...) (0000ms, 0396ms total) T0D94 000:401 JLINKARM_GetDLLVersion() returns 40802 (0000ms, 0396ms total) T0D94 000:401 JLINKARM_GetCompileDateTime() (0000ms, 0396ms total) T0D94 000:403 JLINKARM_GetFirmwareString(...) (0000ms, 0396ms total) T0D94 000:405 JLINKARM_GetHardwareVersion() returns 0xEA60 (0000ms, 0396ms total) T0D94 000:411 JLINKARM_GetIdData(...) >0x2F8 JTAG>TotalIRLen = 4, IRPrint = 0x01 >0x30 JTAG> >0x210 JTAG> >0x30 JTAG> >0xE0 JTAG> >0x78 JTAG> >0x220 JTAG> >0x1F0 JTAG> >0xD8 JTAG> >0xD8 JTAG>Found Cortex-M3 r2p0, Little endian. >0x78 JTAG> >0x160 JTAG> >0xD8 JTAG> >0xD8 JTAG>TPIU fitted. >0xD8 JTAG>ETM fitted. >0xD8 JTAG> FPUnit: 6 code (BP) slots and 2 literal slots >0xD8 JTAG> ScanLen=4 NumDevices=1 aId[0]=0x4BA00477 aIrRead[0]=0 aScanLen[0]=0 aScanRead[0]=0 (0038ms, 0396ms total) T0D94 000:449 JLINKARM_JTAG_GetDeviceID(DeviceIndex = 0) returns 0x4BA00477 (0000ms, 0434ms total) T0D94 000:449 JLINKARM_JTAG_GetDeviceInfo(DeviceIndex = 0) returns 0x00 (0000ms, 0434ms total) T0D94 000:449 JLINKARM_ReadMem (0xE00FF000, 0x0018 Bytes, ...) -- CPU is running >0x258 JTAG> -- Data: 03 F0 F0 FF 03 20 F0 FF 03 30 F0 FF 03 10 F0 FF ... returns 0x00 (0003ms, 0434ms total) T0D94 000:452 JLINKARM_ReadMemU32(0xE000ED00, 0x0001 Items, ...) -- CPU is running >0x160 JTAG> -- Data: 30 C2 2F 41 returns 0x01 (0002ms, 0437ms total) T0D94 000:454 JLINKARM_Halt() >0x160 JTAG> >0xD8 JTAG> >0xDD8 JTAG> returns 0x00 (0009ms, 0439ms total) T0D94 000:463 JLINKARM_IsHalted() >0x100 JTAG> returns TRUE (0002ms, 0448ms total) T0D94 000:465 JLINKARM_ReadMemU32(0xE000EDF0, 0x0001 Items, ...) >0x160 JTAG> -- Data: 03 00 03 00 returns 0x01 (0002ms, 0448ms total) T0D94 000:467 JLINKARM_WriteU32(0xE000EDF0, 0xA05F0003) >0x160 JTAG> returns 0x00 (0002ms, 0450ms total) T0D94 000:469 JLINKARM_WriteU32(0xE000EDFC, 0x01000000) >0x160 JTAG> returns 0x00 (0002ms, 0452ms total) T0D94 000:471 JLINKARM_ReadMemU32(0xE0002000, 0x0001 Items, ...) >0x160 JTAG> -- Data: 60 02 00 00 returns 0x01 (0002ms, 0454ms total) T0D94 000:473 JLINKARM_ReadMemU32(0xE0001000, 0x0001 Items, ...) >0x160 JTAG> -- Data: 01 00 00 40 returns 0x01 (0002ms, 0456ms total)
JLINKARM_AddMirrorAreaEx(Addr = 0x00000000, Size = 0x00000000) (0000ms, 0000ms total) JLINKARM_GetHWStatus(...) returns 0x00 (0000ms, 0460ms total) T0D94 000:482 JLINKARM_GetNumBPUnits(Type = 0xFFFFFF00) >0x2F8 JTAG>TotalIRLen = 4, IRPrint = 0x01 >0x30 JTAG> >0x210 JTAG> >0x30 JTAG> >0xE0 JTAG> >0x78 JTAG> >0x220 JTAG> >0x1F0 JTAG> >0xD8 JTAG> >0xD8 JTAG>Found Cortex-M3 r2p0, Little endian. >0x78 JTAG> >0x160 JTAG> >0xD8 JTAG> >0xD8 JTAG>TPIU fitted. >0xD8 JTAG>ETM fitted. >0xD8 JTAG> FPUnit: 6 code (BP) slots and 2 literal slots >0xD8 JTAG> returns 0x06 (0036ms, 0460ms total) T0D94 000:518 JLINKARM_GetNumBPUnits(Type = 0xF0) returns 0x800 (0000ms, 0496ms total) T0D94 000:518 JLINKARM_GetNumWPUnits() returns 0x04 (0000ms, 0496ms total) T0D94 000:522 JLINKARM_GetSpeed() returns 0x7D0 (0000ms, 0496ms total) T0D94 000:526 JLINKARM_ReadMemU32(0xE000E004, 0x0001 Items, ...) >0x168 JTAG> -- Data: 01 00 00 00 returns 0x01 (0003ms, 0496ms total) T0D94 000:529 JLINKARM_WriteMem(0xE0001000, 0x001C Bytes, ...) -- Data: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... >0x278 JTAG> returns 0x1C (0002ms, 0499ms total) T0D94 000:531 JLINKARM_ReadMem (0xE0001000, 0x001C Bytes, ...) >0x278 JTAG> -- Data: 01 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 ... returns 0x00 (0002ms, 0501ms total) T0D94 000:533 JLINKARM_SetResetType(JLINKARM_RESET_TYPE_NORMAL) returns JLINKARM_RESET_TYPE_NORMAL (0000ms, 0503ms total) T0D94 000:533 JLINKARM_Reset() >0x2F8 JTAG>TotalIRLen = 4, IRPrint = 0x01 >0x30 JTAG> >0x210 JTAG> >0x30 JTAG> >0xE0 JTAG> >0x78 JTAG> >0x220 JTAG> >0x1F0 JTAG> >0xD8 JTAG> >0xD8 JTAG>Found Cortex-M3 r2p0, Little endian. >0x78 JTAG> >0x160 JTAG> >0xD8 JTAG> >0xD8 JTAG>TPIU fitted. >0xD8 JTAG>ETM fitted. >0xD8 JTAG> FPUnit: 6 code (BP) slots and 2 literal slots >0xD8 JTAG> >0x168 JTAG> >0x160 JTAG> >0x190 JTAG> >0xD8 JTAG> >0xD8 JTAG> >0x160 JTAG> >0x160 JTAG> >0xD8 JTAG> >0xD8 JTAG> >0x160 JTAG> >0xD8 JTAG> >0xDD8 JTAG> >0x100 JTAG> (0079ms, 0503ms total) T0D94 000:612 JLINKARM_Halt() >0xD8 JTAG> returns 0x00 (0002ms, 0582ms total) T0D94 000:614 JLINKARM_IsHalted() >0xD8 JTAG> returns TRUE (0002ms, 0584ms total) T0D94 002:446 JLINKARM_Close() >0x160 JTAG> >0x160 JTAG> ***** Error: Bad JTAG communication: Write to IR: Expected 0x1, got 0x0 (TAP Command : 10) @ Off 0xCB. (0045ms, 0584ms total) T0D94 002:446 (0049ms, 0584ms total)
1. download to the board fails CHECK YOUR MEMORY MAP in uVISION and JLINK
2. target reset fails. CHECK YOUR JLINK RESET STRATEGY. This should match with your JTAG circuit design.
Hi,
can you write this as an email to our suport (w. example project would be nice) so that I can test & fix this issue?
BR, /th.
btw ... RDI is not further supported. For ARM7/9 the J-Link / J-trace works fine, and for all the Cortex Devices there is a great new J-Link/Trace driver which supports nearly everything the J-Link/Trace is capable of.
J-Trace will be supported soon.