Debugger problems with LPC4350

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

Debugger problems with LPC4350

2,341 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Tue Mar 27 19:36:24 MST 2012
[SIZE=2]I am using the new Diolan lpc_4350_db1 board with LPCXpresso and have been able to compile, load and run the Hitex examples LedBlinky_Ram and LedBlinky_SST ( the latter after using the flash load
utility (both cases were compiled to Debug mode). The only changes to the project were to the LED
assignments and both projects ran fine[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]In the LedBlinky_Ram case I can use the debugger as usual, but in the LedBlinky_SST case
I always get an E22 error (Remote failure reply).[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]What am I doing wrong?[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]Also, the IDE seems to allow debugging even with Release mode. Is this the case?[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]Thanks for any help[/SIZE]
0 Kudos
Reply
14 Replies

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Fri Jun 22 10:03:00 MST 2012

Quote:
You tried toggling the "Link with Editor" button in the Project Explorer view?



I don't think that's my problem.

It seems that if you simply click on a project to get a source file from it, the IDE always switches to that project without asking the user. It seems to me that it would be safer to ask the user if he/she wants to switch from the current project.

John.
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Fri Jun 22 06:03:07 MST 2012

Quote: JohnR

For Code Red - could you please alter the way the C/C++ window works. At the present, if you choose a file from a different project than the one you think you are working on (maybe just to check something), the compiler switches to the corresponding project. Pressing the build button then builds/runs the wrong project. Just a warning that this is happening would be enough.
.


You tried toggling the "Link with Editor" button in the Project Explorer view?

HTH!!
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Fri Jun 22 05:26:23 MST 2012
Hi,

Did you make sure that the correct flash driver is set in the box above the memory details box?

I switched from LCXpresso to the Red Probe+ and Red Suite and very rarely get download error messsages.

I also now use a really short USB cable and that seems to help but I am not sure.

For Code Red - could you please alter the way the C/C++ window works. At the present, if you choose a file from a different project than the one you think you are working on (maybe just to check something), the compiler switches to the corresponding project. Pressing the build button then builds/runs the wrong project. Just a warning that this is happening would be enough.

John.
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JAlvarez on Thu Jun 21 21:16:07 MST 2012
Thanks for your reply. I am using LPCXpresso 4.2.3_292. The flash driver is SST39VF3201B which according to the Wiki has been reported to work with the LPC4350-DB1.

http://support.code-red-tech.com/CodeRedWiki/LPC1850_4350_Support
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Jun 21 14:01:19 MST 2012
Which version of LPCXpresso are you using. The release notes for the latest (v4.2.3) say:

[LIST]
[*]Improved debug connection reliability for LPC18/43 parts
[/LIST]
You also need to maek sure you are using the correct flash driver for the flash on the board.
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JAlvarez on Thu Jun 21 13:46:50 MST 2012
Did you have to make other changes to debug code on the LPC4350-DB1? I am also testing the LedBlinky_Ram and LedBlinky_SST but keep getting messages like the one below.

Flash driver command failure 100003F0, 2

I modified the the GPIO port and pin for the board LED as well as the scu_pinmux() call to correspond to this board. On the memory map I also changed the flash size to 0x200000 for the LPC4350-DB1 instead of the 0x400000 used on the Hitex board. Instead of the LPC-Link I am using a Red Probe+.

Thanks.
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Wed Mar 28 19:16:12 MST 2012
Some progress.

I set the "Vector catch" entry to true.

Now the debugger starts. It won't however stop on a breakpoint until the debugger is stopped using the Suspend button.

In the example Hitex_BlinkyLED_SST in the loop

  while (1)
  {                                // Loop forever
   msec = 50;
   while(msec);
   GPIO_ClearValue(D6_PORT,(1<<D6_BIT));
   msec = 50;
   while(msec);
   GPIO_SetValue(D6_PORT,(1<<D6_BIT));
  }

Hitting the Suspend button will halt the program in one of the while(msec) lines. If a subsequent breakpoint, at GPIO_SetValue() for instance, is set and the Resume button is hit,  the debugger will restart but sometimes will stop at the breakpoint, sometimes not.

Still this is better than nothing but any ideas are still most welcome.

John
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Wed Mar 28 12:21:49 MST 2012
Hello lpc18_43,

ISP should be 'high', when a 'reset' is given, otherwise the ISP-mode is entered.
When it is floating, there is a change that, by coincidenc, this level is 'low'.
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpc18_43 on Wed Mar 28 12:05:14 MST 2012
Is the ISP pin required for programming modes other than UART0?
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Mar 28 09:51:29 MST 2012
In the first place, please see:

http://support.code-red-tech.com/CodeRedWiki/LPC1850_4350_Support

Also note that we have not seen one of these boards ourselves yet, but IIRC we have seen a customer using it who found that there was a issue with the ISP pin being left floating (rather than pulled up).

Regards,
CodeRedSupport
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Wed Mar 28 07:52:28 MST 2012
In my original post, I said that the flash load utility in the current version of LCPXpresso was used to load the external memory with the debug version of my program.

The code run fine - the LED blinks - but I cannot seem to get the debugger to work as normal.

John.
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpc18_43 on Wed Mar 28 07:20:01 MST 2012
The _SST demo is designed to run from external FLASH.  I am not sure if LPCXpresso knows how to load onto external FLASH.  Have you come across any documentation to the contrary?
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JohnR on Wed Mar 28 04:36:12 MST 2012
I should have made that clearer - I am using the LPC-Link section of an LPCXpresso board connected to the 20-pin JTAG header.

Works great apart from not being able to debug LPCBlinky_SST.

John.
0 Kudos
Reply

2,248 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpc18_43 on Tue Mar 27 23:28:00 MST 2012
How and with what are you uploading firmware to your device?
0 Kudos
Reply