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.
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.