lpc4357 booting from SPIFI cannot debug

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

lpc4357 booting from SPIFI cannot debug

481 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jcottier on Thu May 02 05:14:20 MST 2013
If I flash the compiled program to SPIF using the the "Flash" utility, it resets and runs fine from location 0x14000000. But if I try to use "Debug" then it tries to load and run from 0x1a000000 ! I have the correct memory config and driver loaded for SPIFI booting.
I thought Eclipse (5.2.2) handled this automatically. Am I doing something wrong or missing something?
0 Kudos
7 Replies

449 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jcottier on Wed May 08 03:33:14 MST 2013
I have now updated to lpcxpresso 5.2.4 and can confirm that it now runs correctly from SPIF when the memory is manually edited. Also confirmed is that the problem appears to be with the imported memory config file LPC1850A_SPIFIflash.xml:-

I made a new LPCxpresso C project in a new workspace, let Eclipse configure the memory and make a skeleton main. Tested that and added code to flash the led. Tested that and then edited the memory: removed flashA and FlashB, added QSPI flash at 0x14000000, size 0x800000, using driver LPC18_43_SPIFI_8MB_64KB. With this configuration the code runs fine in debug from 0x14000000 memory.

I tried again importing in the memory config editor LPC1850A_SPIFIflash.xml and it again failed and tried to run from 0x1a000000 memory. It seems to be because the RAM size definitions are wrong for the LPC4357 part, so not surprising really!
0 Kudos

449 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jcottier on Tue May 07 05:00:31 MST 2013
Because, I have only just updated from v4 and at time this was the latest version. Also I have only just found out that this is maybe the issue today.
0 Kudos

449 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Tue May 07 04:11:27 MST 2013

Quote: jcottier
Hi, The problem is, as per my other post "Memory Configuration Editor not working", that this version LPCexpresso (5.2.2) has a bug and the configuration editor does not work.


So why not just update to v5.2.4 where this is fixed :confused:

HTH!
0 Kudos

449 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jcottier on Tue May 07 02:35:38 MST 2013
Hi, The problem is, as per my other post "Memory Configuration Editor not working", that this version LPCexpresso (5.2.2) has a bug and the configuration editor does not work. It was suggested there that I import the pre-built memory configs as a work around, which is what I have now down using "LPC4350A_SPIFIflash.xml" which is the only one supplied for LPC43xx. From your comments, I guess this was not a good idea as they are not compatible. It looks like that unless I can edit the xml file I am bit stuffed at the moment. BTW I made this as a new project with the latest CMSIS I could find (a hard job at the moment with NXP's shifting of online resources), and copied in the example code fragments into my fresh project. Blinky and Sdram examples work fine.

The board is an LPC4357 element14 evaluation PCB (made by embest) and set to boot from SPFI. Downloading the axf to this and booting cold (power up) runs the program and flashes the led. But when trying to debug it seems to run (no hard faults), but not do anything (no flashing led). Pausing the debug leaves it in some random location in 0x1axxxxxx which it should not be. There are no memory areas defined for that (flashA and Flashb segments are not defined). So it all seems very mixed up.
0 Kudos

449 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri May 03 15:08:17 MST 2013

Quote: jcottier
If I flash the compiled program to SPIF using the the "Flash" utility, it resets and runs fine from location 0x14000000. But if I try to use "Debug" then it tries to load and run from 0x1a000000 ! I have the correct memory config and driver loaded for SPIFI booting.
I thought Eclipse (5.2.2) handled this automatically. Am I doing something wrong or missing something?



It sounds like you have a valid image (one which could boot the board) in Bank A (and possibly Bank B) of internal flash. If so, for the time being, you'll either need to remove it, or remove the memory definition in the Memory Configuration Editor. The debug utility is searching the flash memory regions it's been told about, and it must have decided the Bank A partition can be booted.

Regards,

CodeRedSupport

Edit:   I can load your image to SPIFI flash (@0x14000000) on an MCB4357, but the application doesn't execute (hard fault of some kind).  This sounds like the same behavior you see. Not only that, the supplied image disturbs the debug operation of the part, so there's a serious problem here. Based on the memory description you provided, it seems the defined memory is for a LPC43x0 part, not an LPC4357. The problem could be a result of an invalid reset stack pointer.

My question is can you build and debug one of the supplied demo programs for your processor type? If so, then I suspect a project configuration issue. You'll need to supply the project, and debug configurations in use. In the meantime, perhaps you can fill in a few details of the exact processor and board configuration (including boot pin settings).
0 Kudos

449 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jcottier on Fri May 03 04:36:15 MST 2013
Thanks for your reply. Files uploaded in debug.zip.

This project was compiled, run and stopped manually. The LED's do not flash.

After compiling using "debug" a window pops up for thread  "0x1a00017a" with the message No source available for "0x1a00017a"

The debug tree also shows the above thread and two threads for 0xfffffff8
0 Kudos

449 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu May 02 13:51:42 MST 2013
Can you please zip up and attach the following files from your project build...

- map file
- all of the ".ld" linker scripts files
- the axf file

Plus the debug log...

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

Regards,
CodeRedSupport
0 Kudos