Hi Sylvio Barth ,
1) As I understood LPC43Sxx manual and LPCScrypt manual when we use encryption of firmware the code must be linked at bank 0x10 that means it will be automatically decrypted into the RAM at the address. The fact is that at this address we only get 96kB of RAM... and the internal flash is 2x512kB and we - for sure - will need firmware > then 96kB at least > 512kB. So I except we need to add in memory map external RAM memory to run firmware > 96kB. But I wonder to know how to make it in a way that the decryption engine knows where to jump in memorymap when the first 96kB are overpassed ?
I didn't found any answer or information about that neither any project example. That's a pity... and really blocked us in the development of our project. I didn't find any place to get support about that. Could you help ?
The image size should be set to no more than the size of the SRAM located at 0x1000 0000 when configure secure booting from an encrypted image, we can't customize or expand the range as the ROM code follows the booting flow permanently.
2) On this post https://community.nxp.com/message/864381?commentID=864381&et=watches.email.thread#comment-864381 Soledad wrote me that IAP functions are disabled as soon as we program an encryption key. So I wonder how to write a flashing firmware bootloader for encrypted firmware update for my project. Our client wants to be able to let the user update the firmware. On other project (using LPC43xx not encrypted) I used the IAP functions for that. Could you help me as well about this topic ?
First, let me clarify it, the IAP also can be used after I contact with the AE team.
And I'd like to suggest the approach to make it.
1. You can encrypt the bootloader, then store the encrypted image in the external SPIFI flash.
2. The MCU booted from the external flash, after the booting process successes, the bootloader code can read the bin file from the SD card and transfer the bin file to the internal flash.
Remark: To add the security, you can encrypt the bin file with the Key 2 from the OTP memory bank2 and decrypted by using the AES API before been programmed in the internal flash.
3.Set program counter to starting address of the application code, then run.
Regarding to get the information about the LPC43S/18Sxx secure application, you can contact with the distributor through the link below:
Distributor Network|NXP
Hope it helps.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------