View previous topic :: View next topic |
Author |
Message |
MarcosAmbrose
Joined: 25 Sep 2006 Posts: 38 Location: Adelaide, Australia
|
Program code now and eeprom later |
Posted: Mon Sep 25, 2006 10:13 pm |
|
|
Hi All,
CCS has a #rom directive that allows bytes of data to be embedded in the final .Hex file and burnt to the eeprom at program time. However I would like to be able to program the eeprom at a later stage and from a seperate file. I'm using both IC-Prog and WinPic800 with a JDM programmer, but I can't see anywhere in either of these applications where I can program just the eeprom without erasing the code first.
Could someone kindly set me in the right direction. -Cheers |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Tue Sep 26, 2006 7:55 am |
|
|
I'm sorry I don't know how to do what your asking.
BUT, could you tell us why you want to do this?
Perhaps there is another way around your problem. |
|
|
Fro_Guy
Joined: 26 Apr 2006 Posts: 12
|
|
Posted: Tue Sep 26, 2006 9:32 am |
|
|
Hi
I dont know if this is what you are asking but i had a problem where i had to change the eeprom whenever i have had to write a new PIC. What i did was write a program to change the eeprom to the orginal hex file, and then called a .bat file with the program to invoke the compiler and write that version to the PIC. |
|
|
MarcosAmbrose
Joined: 25 Sep 2006 Posts: 38 Location: Adelaide, Australia
|
|
Posted: Tue Sep 26, 2006 5:08 pm |
|
|
OK, Im developing an application that uses parameters stored in the eeprom and these parameters act as security keys. Due to the security implications, I didn't want to write the parameters into the source code where they'd be visibly open. Furthermore, these parameters would change from time to time.
I was initially thinking that I'd program the pic code first and then the eeprom with the parameters at a later date from a seperate file. However I'm now thinking it would be better to transfer the security parameter to the eeprom via the serial uart and write a little app that runs on a pc to handle the transfer. -Any thoughts or ideas?
treitmey wrote: | I'm sorry I don't know how to do what your asking.
BUT, could you tell us why you want to do this?
Perhaps there is another way around your problem. |
|
|
|
bsodmike
Joined: 05 Aug 2006 Posts: 52
|
|
Posted: Tue Sep 26, 2006 5:26 pm |
|
|
Marcos,
What you've suggested would work, but you'd want to impliment some sort of security over the RS232 link, so you would in essence transmit encrypted data to the PIC and it'll perform the decryption on board.
I've not looked in to algorythms suchs as say AES-128, etc but if you google around you might find something that you can implement quite effectively. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
Re: Program code now and eeprom later |
Posted: Tue Sep 26, 2006 5:58 pm |
|
|
MarcosAmbrose wrote: | Hi All,
CCS has a #rom directive that allows bytes of data to be embedded in the final .Hex file and burnt to the eeprom at program time. However I would like to be able to program the eeprom at a later stage and from a seperate file. I'm using both IC-Prog and WinPic800 with a JDM programmer, but I can't see anywhere in either of these applications where I can program just the eeprom without erasing the code first.
Could someone kindly set me in the right direction. -Cheers |
Hi Marcos,
I do not use this programmer but what you are asking is pretty standard stuff. I use the WARP and the ICD2 both of which support this capability.
As you have know your could embed the code to program the EEPROM in your application.
I use bootloaders with most of my projects and I just program in the section I need modified. I use an incremental bootloader that enables me to change a single location.
Your situation is a little more challenging in that you also need security. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
|