lpcware

How to debug code in external SDRAM?(LPC1776)

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by noricmadaito on Mon Sep 10 03:48:10 MST 2012
When I power on the board, Main program on the CPU's Flash ROM is executed. Lets say it is "Program A".
"Program A" is received from user through UART0 and copied to external FlashROM. Lets say the copied program is "Program-B". When all of "Program B" is written on external FlashROM, "Program B" then copied to external SDRAM. And lastly, "Program B" is executed on SDRAM.
On the next Power On, the "Copy from external FlashROM to external SDRAM", and "Execute Program B on SDRAM" steps as mentioned above is repeated.
When I want to debug "Program-B", I have to execute "Program A" first,and then start debugging "Program B". But the problem is,  I couldn't debug the axf file of "Program A".
Yet,When I want to debug Program B's axf file directly, The Program couldn't be executed and "HardFault" warning shown.
Could you please teach me how to debug "Program-B".

Outcomes