Content originally posted in LPCWare by Adrian Fearn on Tue Apr 30 05:43:35 MST 2013
Hi,
I have just started a new project with the LPC11C24 and I have bought an lpcxpresso to play with until the hardware is ready. I want to use the built in bootloader to flash virgin parts over CAN.
I understand that it is not possible to copy the application from the ram to the flash address 0x00000000: How can I flash my application firmware at address 0x00000000?
For testing I tried to download blinky to address 0x0001000 and start execution at 0x00001000. I changed the MCU settings to MFlash32 (rx) : ORIGIN = 0x1000, LENGTH = 0x7000 but after I send 0x1F51,0x01,0x01 blinky does not start.
I don't get errors from the CAN
>067d,2b,00,50,00,5a,5a,00,00 unlock
<05fd,60,00,50,00,00,00,00,00
>067d,40,00,10,00,00,00,00,00 read dev type
<05fd,43,00,10,00,4c,50,43,31 LPC1
>067d,40,00,51,01,00,00,00,00 read serial 0
<05fd,43,00,51,01,04,0a,13,13
>067d,40,00,51,02,00,00,00,00 read serial 1
<05fd,43,00,51,02,2c,1b,52,53
>067d,40,00,51,03,00,00,00,00 read serial 2
<05fd,43,00,51,03,2f,b5,ba,4c
>067d,40,00,51,04,00,00,00,00 read serial 3
<05fd,43,00,51,04,07,00,00,f5
>067d,40,18,10,02,00,00,00,00 read part id
<05fd,43,18,10,02,2b,10,30,14
>067d,40,18,10,03,00,00,00,00 read bootcode ver
<05fd,43,18,10,03,01,07,00,00
>067d,23,15,50,00,00,10,00,10 write ram write add 0x10001000
<05fd,60,15,50,00,00,00,00,00
>067d,21,50,1f,01,00,00,00,00 start dwonload
<05fd,60,50,1f,01,00,00,00,00
>067d,00,f0,09,00,20,29,44,00 7 bytes
<05fd,20,00,00,00,00,00,00,00
>067d,10,08,01,44,00,08,05,44 7 bytes
<05fd,30,00,00,00,00,00,00,00
.
.
.
>067d,00,73,70,61,6e,3d,22,32 7 bytes
<05fd,20,00,00,00,00,00,00,00
>067d,19,22,3e,3c,00,00,00,00 3 bytes
<05fd,30,00,00,00,00,00,00,00
>067d,2b,20,50,00,01,01,00,00 prep sectors 1 - 1
<05fd,60,20,50,00,00,00,00,00
>067d,2b,30,50,00,01,01,00,00 erase sectors 1 - 1
<05fd,60,30,50,00,00,00,00,00
>067d,2b,40,50,01,01,01,00,00 blank check sectors 1 - 1
<05fd,60,40,50,01,00,00,00,00
>067d,2b,20,50,00,01,01,00,00 prep sectors 1 - 1
<05fd,60,20,50,00,00,00,00,00
>067d,23,50,50,01,00,10,00,00 copy ram to flash dst add 0x00001000
<05fd,60,50,50,01,00,00,00,00
>067d,23,50,50,02,00,10,00,10 copy ram to flash src add 0x10001000
<05fd,60,50,50,02,00,00,00,00
>067d,2b,50,50,03,00,10,00,00 copy ram to flash len 0x1000
<05fd,60,50,50,03,00,00,00,00
>067d,23,70,50,01,00,10,00,00 write execution add 0x00001000
<05fd,60,70,50,01,00,00,00,00
>067d,2f,51,1f,01,01,00,00,00 write program control 0x01
<05fd,60,51,1f,01,00,00,00,00
>067d,40,18,10,02,00,00,00,00 read part id (no response as expected)
I am able to use the memory window in lpcxpresso to verify the erasing and flashing was OK.
I was thinking that I have a problem with the image maybe some build setting?
How can I debug the image flashed at 0x1000?
Many thanks!