LPC1768 Bootloader

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

LPC1768 Bootloader

1,989 Views
shyamshankar
Contributor II

Hi,

I am working on developing a LPC1768 bootloader to load an application from address 0x5000 using IAP.

I understand that these are the steps to be followed for IAP :

--Chip_IAP_PreSectorForReadWrite

--Chip_IAP_EraseSector

--Chip_IAP_PreSectorForReadWrite

--Chip_IAP_CopyRamToFlash

However, I seem to be confused on how we load the binary to that particular location in Flash i.e. 0x5000.

Chip_IAP_CopyRamToFlash copies the binary to that address in the Flash, but how do we specify the RAM address where the application.bin is residing in order to be copied to 0x5000 ? 

Also, I am using LPCExpresso IDE, so is setting the Flash address in the MCU Settings enough for specifying the load address from the application side??

Regards,
Shyam.

Labels (4)
2 Replies

1,319 Views
jeremyzhou
NXP Employee
NXP Employee
Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.
To loading the application code successful, 1024 or 512 bytes are copied to a array which locates at specific address in the RAM every time, then using the Copy RAM to Flash command to implement the program operation. 
After several cycles, the loading work will complete.
Have a great day,
TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
 

1,320 Views
shyamshankar
Contributor II

Hi jeremy,

Thank you for the reply.

Could you please tell me, if I were to use IAP to load an application to flash via bootloader, how would I transfer the application Binary?? Would using a serial terminal like Teraterm be enough to send the binary via UART ?? If I were to do so, how would we know how many bytes to receive from the binary, is there an end of binary command to be detected ?

"After several cycles, the loading work will complete."

So if my Application binary were of size, say around 15Kb, I would have to use several calls to CopyRAMtoFlash(). Is that right??

Regards,

Shyam.

0 Kudos
Reply