LPCXpresso can not debug a custom LPC1768 board while Keil uVision can

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPCXpresso can not debug a custom LPC1768 board while Keil uVision can

1,617件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zhiyong on Fri Sep 05 02:16:02 MST 2014
Hi all,

First post in this forum so greetings to everyone.

I am having some trouble debugging a custom board I made with LPCXpresso, hopefully someone could lend me a hand.

The board is made off MBED, Jtag interface was designed based on the following page
http://www.lpcware.com/content/faq/lpcxpresso/debug-design

Power supply is sourced from an on board step down IC.

The program I was trying to debug is a simple blinky exported from mbed.org.

Somehow, the debug process just could not proceed. I have tried LPCXpresso  from version 6.1 to 7.3, with both ULink2 and LPC-link2 debug tool, and 10 pin cable.

The most error message I got was:

Error in final launch sequence

Other error message are:
10: Could not start execution from stop
2: Target marked as non-debugable.

The funny thing is,  the same setup (ulink2 / LPC-link2 + my custom board) works perfectly fine with Keil uVision. So the board itself and debug tools work.

I tend to think I may have missed some configuration in LPCXpresso but could figure out what exactly I am missing. I tried changing Vector catch, reset handling etc, none of them worked.

So that is the situation, any thoughts ideas will be greatly appreciated.
0 件の賞賛
返信
5 返答(返信)

1,336件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Sep 05 12:54:03 MST 2014

Zhiyong,

Thank you for including the additional details and debug log. This is a known problem using SYSRESETREQ with the CMSIS-DAP probe. The CMSIS-DAP probe may have crashed, but in any case, debug is no longer viable.

It's typical of most Keil projects to use VECTRESET as the default reset, whereas LPCXpresso uses SYSRESETREQ as the default. The appropriate reset type is often part (and vendor) dependent, except in this case. Earlier this year, I confirmed that using SYSRESETREQ with CMSIS-DAP on a Keil  ULINK-ME would cause the same debug failure on an LPC1768. This was a Keil uVision project, by the way.

I recommend you change your project Debug configuration "Emulator selection" to Redlink Server. This selection will download the Redlink probe which can use either SYSRESETREQ or VECTRESET for the LPC1768. It defaults to SYSRESETREQ.

If you want to continue to use CMSIS-DAP, you must ensure the project Debug configuration "Reset Handling" selection is VECTRESET.

In either case, cycle power to the LPC-Link2. It would be worthwhile to boot the part on your development board into the ISP, if possible. See:

Regaining debug access to target MCU

Use the Flash dialog to mass erase flash, then restart your debug session.

Regards,
LPCXpresso Support

0 件の賞賛
返信

1,336件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zhiyong on Fri Sep 05 12:16:13 MST 2014
The following steps were done in the order listed below. In short, I was able to get LPCXpresso + Ulink2 to work. The catch was that after changing reset handling in to VECTRESET, a power cycle of board and debug tool is needed. I didn't try this yesterday. I don't think this  power cycle is mentioned in the following FAQ page either , so it might be a good idea to include it.

http://www.lpcware.com/content/faq/lpcxpresso/could-not-start-execution-stop

St this point, I still cannot get LPC-link2 + LPCXpresso to work. Always the error message:

Error in final launch sequence.

So I will proceed with Ulink2.

1) Ulink2 + LPCXpresso V7.3, default launch configuration:

LPCXpresso RedlinkMulti Driver v7.3 (Jul  1 2014 11:18:44 - crt_emu_cm_redlink build 130)
Failed on connect: Ee(36). Could not connect to core.
No connection to emulator device

2) With reset handling in debug changed to VECTRESET:

LPCXpresso RedlinkMulti Driver v7.3 (Jul  1 2014 11:18:44 - crt_emu_cm_redlink build 130)
Failed on connect: Ee(36). Could not connect to core.
No connection to emulator device

3) With the same setup and connection, Keil uVision:
Load "D:\\Download\\mbed_blinky Keil\\build\\mbed_blinky.axf"
Erase Done.
Programming Done.
Verify OK.
Application running ...

4) Still the same setup, coming back into LPCXpresso, this time it actually worked:

LPCXpresso RedlinkMulti Driver v7.3 (Jul  1 2014 11:18:44 - crt_emu_cm_redlink build 130)
Emu(0): Conn&Reset. DpID: 2BA01477. CpuID: 410FC230. Info: (null)
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Loaded LPC175x_6x_512.cfx: LPC175x_6x (512K) Jul  1 2014 11:51:13  On-chip Flash Memory
Connected: was_reset=true. was_stopped=false
v LPCXpresso Free License - Download limit is 256K
Writing 33024 bytes to address 0x00000000 in Flash
Erased/Wrote page  0-7 with 32768 bytes in 10406msec
Erased/Wrote page  8-8 with 256 bytes in 385msec
Flash Write Done
Flash Program Summary: 33024 bytes in 10.79 seconds (2.99 KB/sec)
Stopped (Was Reset)  [Reset from Unknown]

5): LPC-Link2 + LPCXpresso: NO luck.

Just a popup error message: Error in final launch sequence.

6): LPC-link2 + Keil uVision: works fine.
Load "D:\\Download\\mbed_blinky Keil\\build\\mbed_blinky.axf"
Erase Done.
Programming Done.
Verify OK.
Application running ...

7) Going back to LPCXpresso: LPC-link2 + LPCXpresso:

Still the same Error message:
Error in launching the final sequence.

8) Going back to LPCXpresso + Ulink2: Worked again this time.

9) Fresh workspace, fresh import: LPCXpresso + Ulink2

Error message:
  10: Could not start execution from stop
  ACK Fault

Debug log:
LPCXpresso RedlinkMulti Driver v7.3 (Jul  1 2014 11:18:44 - crt_emu_cm_redlink build 130)
Emu(0): Conn&Reset. DpID: 2BA01477. CpuID: 410FC230. Info: (null)
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Loaded LPC175x_6x_512.cfx: LPC175x_6x (512K) Jul  1 2014 11:51:13  On-chip Flash Memory
Connected: was_reset=false. was_stopped=false
v LPCXpresso Free License - Download limit is 256K
Writing 33008 bytes to address 0x00000000 in Flash
Erased/Wrote page  0-7 with 32768 bytes in 10487msec
Erased/Wrote page  8-8 with 240 bytes in 381msec
Flash Write Done
Flash Program Summary: 33008 bytes in 10.87 seconds (2.97 KB/sec)
Stopped (Was Reset)  [Reset from Unknown]
Could not start execution from stop: Nn(05). ACK Fault

10): Reset handling in launching configurations changed to VECTRESET, board powered down -> up, Ulink2 unplugged-replugged

LPCXpresso + Ulink2: worked.

9) & 10) repeats.





0 件の賞賛
返信

1,336件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Sep 05 11:13:09 MST 2014

I'd first like to review your debug session log. Refer to the following FAQ:

The Debug Log

Regards,
LPCXpresso Support
0 件の賞賛
返信

1,336件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zhiyong on Fri Sep 05 10:11:19 MST 2014
Thanks for your quick reply, but I don't think those links apply to my situation. I read the first link(debug design) many times before I developed the board and many times afterwards when I was unable debug the board with LCPXpresso.

Given that Keil uVision can program/debug the board with no problem, I don't think the reasons mentioned in the second and third link (Cable, debug circuit incorrectly designed, no power to the board, MCU in CRP mode, JTAG pins reconfigured by application, JTAG not accessible) are the cause of my problem. As a side note, I actually read those links many times before I decided to give Keil uVision a try.

When I switched to Keil uVision, the only thing that was changed was IDE, so the problem has to be somewhere within LCPXpresso. I changed Vector catch in launch setting to true, but that didn't help. Could it be anything else?
0 件の賞賛
返信

1,336件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Sep 05 02:37:05 MST 2014
Please review these FAQs, which may help you resolve your problem:
http://www.lpcware.com/content/faq/lpcxpresso/debug-design
http://www.lpcware.com/content/faq/lpcxpresso/target-marked-not-debuggable
http://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access
0 件の賞賛
返信