Good morning.
I tried the LPC55 bootloader resident on its flash and everything was ok.
I mean that the FlashMagic tool, it's an easy and quick way to program the micro controller.
However, in these condition, it's possible (very easily) to read its content. Always with FlashMagic tool.
The question is that I'd like to write my personal bootloader but by a simple pin state (ISP pin) it's possible to read all flash memory bytes.
In these condition it's enough to change the external pin to violate the internal code.
Is there any method where it's possible to disable or enable the LPC55 bootloader ?
You have to set some bits in CFPA / CFMA for code read protection. But unfortunately I don't know how to write in this registers.
See UM11126 chapter 7 for more details.
Hi Bressan thank you for your support.
I'm going to have a look too to the manual.
Attilio
LPC55 bootROM cannot be bypassed, As ROM needs to do some chip system init job, not only booting app.
Hi Jay Heng
Thank for your answer.I understand what you mean.
But with this condition, can you suggest me how I can prevent the flash reading ?
Because by this tool, seem to be always possible.
Thank you in advance.
Attilio
You may need to enable PRINCE encryption here
blhost.exe -p COMx -- key-provisioning enroll
blhost.exe -p COMx -- key-provisioning set_user_key 3 <path to the sbkek.bin> // key code for SB. Sbkek.txt is used by elftosb.exe, sbkek.bin is used by PUF and should be inverted order to sbkek.txt
blhost.exe -p COMx -- key-provisioning set_key 7 16 // prince region0 key code, <set_key> <type> <size>
blhost.exe -p COMx -- key-provisioning set_key 8 16 // prince region1 key code,
blhost.exe -p COMx -- key-provisioning set_key 9 16 // prince region2 key code
blhost.exe -p COMx -- key-provisioning read_key_store key_store0.bin // read out the all key code
//power-on reset
blhost.exe -p COMx -- key-provisioning write_key_store key_store.bin
blhost.exe -p COMx -- key-provisioning write_key_nonvolatile 0 <write_key_nonvolatile> [memoryID]
blhost.exe -p COMx -- fill-memory 0x20034000 4 0x50000000
blhost.exe -p COMx -- fill-memory 0x20034004 4 0x0/0x40000/0x80000 // prince region0/1/2 key code
blhost.exe -p COMx -- fill-memory 0x20034008 4 0x1200
blhost.exe -p COMx -- configure-memory 0 0x20034000 //(Customer Manufacturing/Factory Configuration Area (CMPA))
Thanks Jay
I'm going to have a look to your proposal.
Attilio