Unable to debug demo programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to debug demo programs

Jump to solution
965 Views
schoelch_frank
Contributor I

Hello,

to upgrade from an old LPC2134 design based on IAR EWARM to LPC54102, I installed the current version of LPCXpresso 8.2.2 under Win7 and purchased the demoboard OM13077.An upgrade to MCUXpresso is not intended at the moment as the old LPC2000 is not supported.

For the first test, I tried to debug the periph_blinky program. However this did not work as desired.

At first, errors "No source found" were displayed for various adresses 0x... Pressing F8, the application could be set into run mode, but the LED on the demoboard stayed dark. Also, the debugger only showed the .axf under Thread #1 and main() has not been shown.

Then I opened the periph_adc and tried to debug this. since then, an error g_pfnVectors() at 0x0 occurs. Pressing F8 leads to the same error within a quarter of a second or so. It has been impossible to run the application at all.

I deleted the project directory and started from the beginning, but not the periph_blinky also shows error g_pfnVectors() at 0x0 . I tried to erase the flash using the IC symbol in the ribbon bar, but this leads to a timeout error after about 5 seconds. Reinstalling LPCXpresso did not help.

All jumpers on the demoboard are in the factory settings which seems to be correct according to the manual.

Is this a software fault or am I doing something wrong?

LPCXpresso.png

0 Kudos
1 Solution
541 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Frank

I test on my side, the same error with you . I haven't find the really reason.

While, it can work well on MCUXpresso IDE, also now we recommend customer use

this new IDE, all the updates about LPC will based on it :

https://www.nxp.com/support/developer-resources/software-development-tools/mcuxpresso-software-and-t...    

There are two libraries support LPC54102 now, LPCopen and SDK, recommend use SDK.

The way to use LPCopen on MCUXpresso IDE is the same with LPCxpresso IDE.

About how to install and  use SDK on MCUxpress IDE,  please refer to "MCUXpresso_IDE_User_Guide.pdf".


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
11 Replies
541 Views
schoelch_frank
Contributor I

Hi, thanks *a lot* for your effort!

Will this error be solved in the LPCXpresso suite?

I'd like to use MCUXpresso, however I also have to support the old LPC2134 design. Maintaining two different IDEs is a bit of a pain.

0 Kudos
541 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Frank Schoelch,

There isn't any update for LPCxpresso IDE, so sorry for the inconvenient to you.

BR

Alice

0 Kudos
541 Views
schoelch_frank
Contributor I

deviceselection.gif

0 Kudos
542 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Frank

I test on my side, the same error with you . I haven't find the really reason.

While, it can work well on MCUXpresso IDE, also now we recommend customer use

this new IDE, all the updates about LPC will based on it :

https://www.nxp.com/support/developer-resources/software-development-tools/mcuxpresso-software-and-t...    

There are two libraries support LPC54102 now, LPCopen and SDK, recommend use SDK.

The way to use LPCopen on MCUXpresso IDE is the same with LPCxpresso IDE.

About how to install and  use SDK on MCUxpress IDE,  please refer to "MCUXpresso_IDE_User_Guide.pdf".


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
541 Views
schoelch_frank
Contributor I

Device selection should be correct as shown in the picture. This is preconfigured in the project periph_blinky contained in the zip-file lpc5410x_lpcxpresso_3.01a.zip of the Examples folder of LPCXpresso.

Could someone of the NXP team test if there's an issue with the compatibility of LPCXpresso 8.2.2_650 and the Demoboard OM13077?

0 Kudos
541 Views
schoelch_frank
Contributor I

Entering ISP mode didn't help, the old messages are still shown.

I tried lpcscrypt  to check if there's a basic communication and it's unable to read the device ID:

C:\nxp\LPCScrypt_2.1.0_842\bin>lpcscrypt querypart
Error opening COM5: Read Timeout
(Sometimes ISP reset, or erasing the flash, can help...)
Previous error(s) stops further processing
Error: <Command line>:0: Read Timeout
   Script cmd:      batchmode 1
   Last target cmd: =print 18886
Terminated with errors

C:\nxp\LPCScrypt_2.1.0_842\bin>

However, if I flash the J-Link firmware into the LPC-Link2 and use Segger J-Flash Tool, I can read the Core ID correctly and I can also read back the content of the flash of the LPC54102.

I suppose there's a major bug inside this development toolchain.

0 Kudos
541 Views
converse
Senior Contributor V

A couple of things

- when using LPCscrypt you are connecting to, and programming the on-board debugger - not the target chip. So, running 'query part' will read the part number of the LPC43xx that is the debugger.

- are you sure your target is an LPC54102J512. I have seen a similar problem when attempting to debug the wrong part. It is vitally important that the IDE know exactly what the part number of the debug target is.

0 Kudos
541 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Can you try booting the board into ISP mode before you try to start a debug session and see if that helps. For more info see : https://community.nxp.com/message/630748 

Regards,

MCUXpresso IDE Support

0 Kudos
541 Views
schoelch_frank
Contributor I

Updated the debugger Firmware to the current 2019 version using LPCScrypt and it didn't help.

0 Kudos
541 Views
schoelch_frank
Contributor I

Hello,

I checked the device setting and it's fine. Also I installed LMPXpresso on a different computer and it shows exactly the same issues. I even received a second new demoboard and it does not work. I tried to program the flash manually and got the following log:

Ni: LPCXpresso RedlinkMulti Driver v8.2 (Sep  5 2016 10:12:38 - crt_emu_cm_redlink.exe build 725)
Pc: (  0) Reading remote configuration
Pc: (  5) Remote configuration complete
Nc: Probe Firmware: LPC-LINK2 CMSIS-DAP V5.134 (NXP Semiconductors)
Nc: Serial Number:  A000000002
Nc: VID:PID:  1FC9:0090
Nc: USB Path: \\?\hid#vid_1fc9&pid_0090&mi_00#7&de4dbc8&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Pc: ( 30) Emulator Connected
Xl:
Xw:
Xc:
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Connected&Reset. DpID: 2BA01477. CpuID: 410FC240. Info: <None>
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Nc: inspected v.2 On-chip Flash Memory C:\nxp\LPCXpresso_8.2.2_650\lpcxpresso\bin\Flash\LPC5410x_512K.cfx
Nc: image 'LPC5410x (512K Flash) Jun 21 2016 11:53:08'
Nc: NXP: LPC54102J512  Part ID: 0x00000000
Pc: ( 65) Chip Setup Complete
Nt: Connected: was_reset=true. was_stopped=false
Cr:v LPCXpresso Free License - Download limit is 256K
Pc: ( 70) License Check Complete
Nt: Loading 'periph_blinky.axf' ELF 0x00000000 len 0x2D1C
Nc: Opening flash driver C:\nxp\LPCXpresso_8.2.2_650\lpcxpresso\bin\Flash\LPC5410x_512K.cfx
Nc: AFTER driver startup timeout
Wc: Driver Addresses
Wc:  Start:  02000000
Wc:  Entry:  02000035
Wc:  End:    02000388
Wc:  Stack:  02000588
Wc:  Mailbox:02008588
Wc: Driver Register State
Wc:  R0:     600F4C09
Wc:  R1:     00000004
Wc:  R2:     00000000
Wc:  R3:     0DBA6000
Wc:  R4:     86F80000
Wc:  R5:     00000000
Wc:  R6:     40000084
Wc:  R7:     00002EE0
Wc:  R8:     00000000
Wc:  R9:     00000000
Wc:  R10:    00000000
Wc:  R11:    00000000
Wc:  R12:    00000000
Wc:  SP:     02BF8558
Wc:  LR:     FFFFFFF9 (exception from main thread)
Wc:  PC:     F9C48400
Wc:  xPSR:   00000003
Wc:  MSP:    02BF8558
Wc:  PSP:    02000588
Wc:  CFBP:   00000001
Wc:Stacked Exception information
Wc:Exception registers
Wc:E000ED04:  ICSR:   00000803 (VECTPEND=0(none), RETTOBASE, VECTACTIVE=3(hard fault))
Wc:E000ED28:  MMFSR:  01 (IACCVIOL)
Wc:E000ED29:  BFSR:   15 (STKERR, IMPRECISERR, IBUSERR)
Wc:E000ED2A:  UFSR:   0002 (INVSTATE)
Wc:E000ED2C:  HFSR:   40000000 (FORCED)
Wc:E000ED30:  DFSR:   00000000
Wc:E000ED3C:  AFSR:   00000000
Wc:E000ED24:  SHCSR:  00000000
Wc:E000ED34:  MMAR:   E000EDF8
Wc:E000ED38:  BFAR:   E000EDF8
Nc: Flash Driver V.2 startup failed - rc Ef(34): Timed-out initializing flash.
Pb: (100) Writing Flash ended with an error.
Ed:05: File 'periph_blinky.axf' load failure: Ef(34): Timed-out initializing flash.
Pc: (100) Target Connection Failed

Is there a way to update the firmware of the LPC-Link2 on the OM13077?

0 Kudos
541 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Frank Schoelch ,

 - Please make sure choose right chip part number when debug .

- The MCUxpresso IDE support this board now,  the MCUXpresso SDK lib also support this board,

you can development lpc54102 based on SDK.

https://mcuxpresso.nxp.com/en/builder     

- I have ordered  this board, after get it , I will also test it on my side .


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos