Hello
We already made project using LPC43xx controller and build our bootloader as this :
Bootloader located at 0x1A bank for 64kB
Application code located at 0x1A + 0x10000 and whole 0x1B flash
The bootloader is able to read a (non consecutive) bin file from an SD card and program it to the 2 flash and also to read the flash to do a backup onto the SDcard.
We are beginning a new project that requires to have encrypted firmware. So we want to start programming on an LPC43S57. I m studying your LPCScrypt documentation, LPC43XX user manual and I found this answer : https://community.nxp.com/thread/420419
As I understood the firmware files have to be encoded using LPCScrypt tool and the AES key have to be programmed with it as well.
The begging of the code must be linked for bank 0x10.
Then -as a newbie in encrypted device - I think I missed something... or I didn't get something. Internal SRAM at bank 0x10 is only 96kB. So how to manage larger code ? We except there is a possibility to use the whole 2 banks of 512kB of Flash for code no ?
In example, if we have an external RAM how to set the firmware decrypting engin to copy decrypted code at the correct RAM address ?
Another question, what about our booloader code that is using IAP functions, will those IAP functions work the same once the AES key is programmed into the OTP memory ?
Hello Sylvio,
You are correct you need to use the LPCScrypt tool, in order ot encode your code and you need to use the AES key just like you mention in your thread. In order to flash the larger application,The flash address to program can either be specified as a numeric hex address or (if programming from the base address of the flash) as the name returned from a queryflash command. Images can be programmed at an offset from the flash base address, but care must be taken to link and align such images to a flash sector base address
You can find more details in the LPCScrypt User Guide, https://www.lpcware.com/system/files/LPCScrypt_User_Guide_0.pdf
Regarding using IAP functions, once the the device it is encrypted you can not use it.
Best Regards,
Sol