making an application updateable using IAP in P89LPC936?

Started by Sarsam NL, April 29, 2005, 05:43:38 AM

Previous topic - Next topic

Sarsam NL

hi all,
I am working on an application which should be updateable using a firmware not readable to the outside world. My question was whether it is possible to use IAP with P89LPC936 to update firmware of my application.

  Any C code could be very helpfull.
 Any help is highly appreciated.
best regards
Sarsam


erikm

how are you going to have the customer update "not readable to the outside world" when it requires providing a file.

If You, yourself, are going to do the updates, then read up on security bits.

Erik

Jan Waclawek

But why, you can encrypt the data and include the decryption routine into your "updater".
You can get inspired by the "des bootloader" adn "aes bootloader" for AVRs by Atmel:
http://www.atmel.com/dyn/resources/prod_documents/doc2541.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR230.zip
http://www.atmel.com/dyn/resources/prod_documents/doc2589.pdf
http://www.atmel.com/dyn/resources/prod_documents/AVR231.zip

Have fun!

Jan Waclawek



Post Edited (04-29-05 22:51)

sarsam NL

thank you Jan,
I will look at it. The firmware can be copied and if no encryption, the application could be stolen and made immitated, i want to research on it how it should be built such that the update should not be hackable. If i have more questions i will certainly post it here.
Thank you for the help,
best regards,
Sarsam

Jan Waclawek

Note I  have updated for the AES bootloader too.
I would recommend you AES better than DES; it is newer, said to be better and - surprise - more compact, so you spare memory implementing it.
But you can use any encryption scheme you chose.
Note, that you still can be compatible with the style of ISP commands (and you can replace the old bootloader with yours), so you (or your customer) can use FlashMagic for convenient updating of the firmware.

Jan Waclawek

PS. If needed, you can use a different key to DES/AES/whichever encryption scheme you use, for each customer; so the update issued for one woun't work for the other.

sarsam NL

dear Jan,
Thank you for the reply,
yes indeed, each customer has its own serial number so dependent on the serial number a encryption scheme is generated. I am new to the embedded systems, do you have any samples which i can work on it? The entering of the ISP mode is clear now thanks to erik, now just wondering how to place the decryption algorithm routine into the isp code, as I can program in C but less in Assembly. If you could help me,

best regards,
Sarsam

Andy Ayre

You can use the Just In Time feature of Flash Magic to automatically program in changing serial numbers. There are even some example JIT modules included with Flash Magic.

Embedded Systems Academy, Inc.
support at esacademy dot com

Jan Waclawek

You need either to write your own ISP bootloader, or to modify the existing one. The following link might help:
http://www.8052.com/forum/thread.phtml?thread=84899

Jan Waclawek

Sarsam NL

Dear Jan,
the link you gave me is not working, i found plenty of threads discussing the bootcode. As i said that i am not much good in ASM :)but know bit of C, so the bootcodes I found were mostly written in ASM, now if i want to use encryption and decryption i must know, when the byte is recieved from the UART so that i can use decryption to decrypt it back to the original, so if you guys could help me a bit, some samples will be very helpfull as i am newbie in programming world.
best regards,
Sarsam

Jan Waclawek

The main result of the "many threads" is in fact the following file
http://www.semiconductors.philips.com/files/markets/microcontrollers/Adding%20ISP%20in%20source%20code.zip
which contains the source files of the LPC9xx bootloader.
Yes, it's asm. I am sorry, but if you want to use it, you will need to learn it.
Alternatively, you can write your own bootloader from scrap in C.

Have fun,

Jan Waclawek

Sarsam NL

Thanks again for the reply, yesterday whole night I was working on learning ASM abit, and i indeed found the source for the ISP. I found also the code where the characters are recieved trough UART, and i will go and play around it. Has anyone written an ISP boot for LPC935/936 of philips which is easy to modify to place encryption or decryption?
best regards,
Sarsam

Sarsam NL

Does anybody know how to exit boot(ISP). I can enter ISP but cant come out of it without reprogramming it. Can anybody help me on this?
best regards
Sarsam

Andy Ayre

Embedded Systems Academy, Inc.
support at esacademy dot com

sarsam NL

thank you andy, ;)
Is there an ISP code for the LPC9XX family which is able to use data encryption as ones for the ATMEL's AVR's?

Thank you all mates

Sarsam

Andy Ayre

Not that I know of. I'm sure someone will eventually write it.

Embedded Systems Academy, Inc.
support at esacademy dot com