Please note that if you are going to use a bootloader, your precious hex code will be free for anyone to copy it! There can not be bootloader AND code protection at the same time!
Ioannis
Please note that if you are going to use a bootloader, your precious hex code will be free for anyone to copy it! There can not be bootloader AND code protection at the same time!
Ioannis
It works great with a bootloader and codeprotection together. It is even possible to encrypt the hexfile into jibberish on your PC and later letting the bootloader de-jibberish it while flashing it. This way the code is safe all the way (depending on what encryption used) and if you use a PIC that is safer (i.e 18 series).
With codeprotection you can not read or write with an external programmer but the software inside the PIC (loader) can always erase and write in the codespace.
This can be done PIC to PIC or I2C or serial or what ever kind of way....
/me
Hi Jumper,
That was my understanding and plan. To use encrypted hex files and decrypt them at PC.
Do you have any recommendation of the best bootloader or any good information on how to code to talk to them?
Cheers
Rich
Microcode Studio's Bootloader offers a distribution license for about $400 USD and it includes the DLL library if you want to write your own interface and still use their bootloader core. I haven't purchased this yet but been very tempted. I think you could write an app to encrypt/decrypt the hex file then send it to the PIC using the DLLs. Of course the serial data to the PIC is still vulnerable to capture. Also you could distribute a simplified app with the update file already embedded.
I've been forever watching and searching for a secure bootloader. Unfortunately there seems to be no such beast on the market at present. Curious that no one offers this. My own programming skills/knowledge aren't quite up to tackling that yet, but I would certainly be willing to pay a few hundred dollars for a good reliable encrypted bootloader.
I found a bootloader the other day that professed to secure the code. It set a code protect flag in Pic. I have just been googling for it and it has gone. Or rather my memory of the search terms used is gone. How annoying.
I guess it comes down to the Pic. Is it possible to stop people reading the code back out. If the Pic doesn't have the capability, then it isn't going to happen. I will keep looking and will post if I find it.
Rich
Write your own loader in PBP, this link will tell you how. Encrypt the hexfile on the PC-side and let the loader read the data serially or whatever way and at the same time decrypt it and writing the code to the codespace.
This way the hexfile is safe all the way ........ and I trust Microchip's ability to keep the code inside the chip after I have set it to CP. At lest for a reasonable cost and effort :-)
http://www.picbasic.co.uk/forum/showthread.php?t=4498
Maybe it is time to start a real thread with bootloaders in this forum. That link is full with errors and is quite long.... An I2C decryption loader using an external EEprom became 8 kbytes and is working great.
And no, I will not tell you my encryption
/me
There's still the option to use and understand asm and some some open source ones. As far as i remind TinyBootloader is one of them.
But yeah... if you plan to change the code to add your own encryption, you will also need to change the PC software as well.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks