LPC55S28 and Segger

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

LPC55S28 and Segger

3,313 Views
anbui
Contributor II

I'm unable to get the external segger to work with the board.

anbui_0-1679001720336.png

 

0 Kudos
21 Replies

3,166 Views
anbui
Contributor II

My setup :
My MCUXpress is v11.5
My JLink is v7.86

We tried on a clean new dev board and still experience the same issue.
I would not thinkt 11.5 vs 11.7 would be the issue, but I will install a new 11.7 and try also.

Do you have any other suggestions on what is causing this issue?

0 Kudos

3,150 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI

Please use latest IDE v10.7 with latest SDK 2.13.

Test with on board jlink interface to confirm if system SW enviroment well.

To avoid other association, create a new project under a new workspace to test the connection.

Have a nice day,

Jun Zhang

0 Kudos

3,236 Views
anbui
Contributor II

Demo board.

0 Kudos

3,243 Views
anbui
Contributor II

Downloads and runs but wont let me debug.

 

 

Found Cortex-M33 r0p3, Little endian.
Cortex-M (ARMv8-M and later): The connected J-Link (S/N 59100629) uses an old firmware module that does not handle I/D-cache correctly. Proper debugging functionality cannot be guaranteed if cache is enabled
FPUnit: 8 code (BP) slots and 0 literal slots
Security extension: not implemented
CoreSight components:
ROMTbl[0] @ E00FE000
[0][0]: E00FF000 CID B105100D PID 000BB4C9 ROM Table
ROMTbl[1] @ E00FF000
[1][0]: E000E000 CID B105900D PID 000BBD21 DEVARCH 47702A04 DEVTYPE 00 Cortex-M33
[1][1]: E0001000 CID B105900D PID 000BBD21 DEVARCH 47701A02 DEVTYPE 00 DWT
[1][2]: E0002000 CID B105900D PID 000BBD21 DEVARCH 47701A03 DEVTYPE 00 FPB
[1][3]: E0000000 CID B105900D PID 000BBD21 DEVARCH 47701A01 DEVTYPE 43 ITM
[0][1]: E0040000 CID B105900D PID 000BBD21 DEVARCH 00000000 DEVTYPE 11 TPIU
SetupTarget() start
Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
SetupTarget() end - Took 1.22ms
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
WARNING: Failed to read memory @ address 0x00000000
Connected to 127.0.0.1
Reading all registers
WARNING: Failed to read memory @ address 0x00000000
Received monitor command: reset
ResetTarget() start
Reset strategy selected in debugger ignored. Performing device specific reset.
No valid application in flash: Wait until the bootloader is done.
CPU halted successfully after enabling debug access
Reset handler addr: 0x00000000
ROM entered ISP command handling loop. Re-enable the debug access.
CPU halted successfully after enabling debug access
ResetTarget() end - Took 423ms
Resetting target
Downloading 15952 bytes @ address 0x00000000 - Verified OK
Downloading 16112 bytes @ address 0x00003E50 - Verified OK
Downloading 900 bytes @ address 0x00007D40 - Verified OK
Downloading 100 bytes @ address 0x000080C4 - Verified OK
J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (33280 bytes)
J-Link: Flash download: Total: 0.909s (Prepare: 0.204s, Erase: 0.070s, Program & Verify: 0.576s, Restore: 0.057s)
J-Link: Flash download: Program & Verify speed: 56 KB/s
Writing register (PC = 0x 180)
Read 4 bytes @ address 0x00000180 (Data = 0x4B13B672)
Reading 64 bytes @ address 0x00000180
Read 2 bytes @ address 0x00000180 (Data = 0xB672)
Reading 64 bytes @ address 0x00002180
Read 2 bytes @ address 0x00002182 (Data = 0x1DBB)
Reading 64 bytes @ address 0x000017C0
Read 2 bytes @ address 0x00001830 (Data = 0x224C)
Read 2 bytes @ address 0x00001846 (Data = 0x4913)
Read 2 bytes @ address 0x0000181A (Data = 0x224C)
Reading 64 bytes @ address 0x00001D00
Read 4 bytes @ address 0x00001DFC (Data = 0x20004958)
Read 2 bytes @ address 0x00001D02 (Data = 0x4B3E)
Reading 64 bytes @ address 0x00006240
Read 2 bytes @ address 0x000062A4 (Data = 0xF107)
Read 4 bytes @ address 0x00000180 (Data = 0x4B13B672)
Read 2 bytes @ address 0x00000180 (Data = 0xB672)
Read 2 bytes @ address 0x00002182 (Data = 0x1DBB)
Read 2 bytes @ address 0x00001830 (Data = 0x224C)
Read 2 bytes @ address 0x00001846 (Data = 0x4913)
Read 2 bytes @ address 0x0000181A (Data = 0x224C)
Read 4 bytes @ address 0x00001DFC (Data = 0x20004958)
Read 2 bytes @ address 0x00001D02 (Data = 0x4B3E)
Read 2 bytes @ address 0x000062A4 (Data = 0xF107)
Reading all registers
Read 4 bytes @ address 0x00000180 (Data = 0x4B13B672)
Read 2 bytes @ address 0x00006276 (Data = 0xF507)
Received monitor command: exec SetRestartOnClose=1
Executed SetRestartOnClose=1
Received monitor command: reset
ResetTarget() start
Reset strategy selected in debugger ignored. Performing device specific reset.
Reset handler addr: 0x00000180
ROM entered ISP command handling loop. Re-enable the debug access.
CPU halted successfully after enabling debug access
ResetTarget() end - Took 214ms
Resetting target
Reading 64 bytes @ address 0x00000000
Reading 64 bytes @ address 0x00000040
Reading 64 bytes @ address 0x00000080
Setting breakpoint @ address 0x00000180, Size = 2, BPHandle = 0x0001
Setting breakpoint @ address 0x00002182, Size = 2, BPHandle = 0x0002
Setting breakpoint @ address 0x00006276, Size = 2, BPHandle = 0x0003
Setting breakpoint @ address 0x000062A4, Size = 2, BPHandle = 0x0004
Starting target CPU...

0 Kudos

3,238 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi anbui 

Do you use NXP demo board or your PCB?

If custom PCB, please make sure the SWD interface design correct. This is for your reference.

https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Design-Considerations-for-Debug/m-p/469565#M44

Thanks,

Jun Zhang

0 Kudos

3,231 Views
anbui
Contributor II

I am using the demo board.

0 Kudos

3,209 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

 

If you use LPC55S28 demo board, it already integrates Jlink debug interface. You don't need use external debugger. we can update on board debuger firmware to Jlink with LPCScrypt

https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mc...

Can you use MCUXpresso IDE to connect board via on board debug interface of Jlink?

Thanks,

Jun Zhang

 

0 Kudos

3,201 Views
jtauch1
Contributor I

Hi Jun,

I am working with An on this issue. We are in the process of fabricating our own custom LPC5526 board. We would like to verify that the seggar debugger we have will work. As An mentioned we are able to program and run the code, but the debug features are not working. 

We are concerned that when we receive our custom boards we will not be able to debug the boards. Can you please help us understand the current limitation and possible work arounds? 

I guess that we might be able to use the LPCEVM as a debugger and connect to our custom board via the 10pin debug header. I believe this was mentioned in the user guide.

 

Thanks,

 

John

0 Kudos

3,196 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI

I tested the demo board with external jlink plus, it works well. See my attached video.

Please make sure you are using latest MCUXpresso IDE v11.7 

My HW enviroment is as below:

ZhangJennie_0-1679367630252.png

Please use your demo board to test the same.

Thanks,

Jun Zhang

0 Kudos

3,127 Views
anbui
Contributor II

You can see my version and sdk is up to date.

anbui_0-1679626898490.png

I'm still unable to debug.

anbui_1-1679627066396.png

If i pause it then I get

anbui_2-1679627107105.png

 

I've attached the segger log.

 

 

 

 

0 Kudos

3,124 Views
anbui
Contributor II

In the segger log, I'm concerned about the


02-00000000-00-00012816-0022: T3A08 012:817.042 JLINK_IsHalted()
02-00000000-00-00012816-0029: T3A08 012:817.560 - 0.522ms returns FALSE

0 Kudos

3,118 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI @anbui 

To identify if the problem is related with specific Jlink probe, please test the connection with onboard Jlink interface, how it works?

if connect board with on board CMSIS-DAP interface, how doesn't it work?

Thanks,

Jun Zhang

0 Kudos

3,081 Views
anbui
Contributor II

Connecting with the onboard linkserver works fine.

We are able to use the segger with the FDM-K22 board without any problems.  Other custom boards we've made work just fine with the segger.

0 Kudos

3,049 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

You says "Connecting with the onboard linkserver works fine." Is NXP demo board or costom board?

Please validate it on demo board.

0 Kudos

3,044 Views
anbui
Contributor II

Linkserver with CMSIS-DAP on the NXP LPC55s28 demo board works fine.  Segger Jlink does not work on the LPC55s28. 

The same Segger works with the NXP FRDM-K22 Fdemo board.  It also works on our custom board with the MK22FN512 processor works with the Segger Jlink.

0 Kudos

3,047 Views
jtauch1
Contributor I

Jun,

Our custom LPC5526 board is finishing layout, so our embedded designer is verifying his seggar debugger with the NXP LPC55 evm board. We have used this same seggar debugger with other custom boards and the K22 Freedom board, so we believe the seggar debugger is working correctly. The issue is only with the NXP LPC55 evm. We also have two of these boards just to rule out that one might be defective.

Please help An resolve this issue.

Thanks,

 

John

0 Kudos

3,019 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

You use demo board+external jlink debugger, please send me a photo here, I need to check your board jumper setting. Thanks.

0 Kudos

3,006 Views
anbui
Contributor II

attachment.jpeg

0 Kudos

2,965 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

Please shunt J3 to ext,2-3, and try again.

If still fail, I wonder your Jlink firmware is old. I suggest you contact Segger to update the latest driver/firmware.

Thanks,

Jennie

0 Kudos

2,943 Views
anbui
Contributor II

I've done that before.

I did it again and the same results.

anbui_0-1680192226231.png

 

0 Kudos