CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Program code now and eeprom later

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
MarcosAmbrose



Joined: 25 Sep 2006
Posts: 38
Location: Adelaide, Australia

View user's profile Send private message

Program code now and eeprom later
PostPosted: Mon Sep 25, 2006 10:13 pm     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Tue Sep 26, 2006 7:55 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 26, 2006 9:32 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 26, 2006 5:08 pm     Reply with quote

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

View user's profile Send private message Visit poster's website AIM Address MSN Messenger

PostPosted: Tue Sep 26, 2006 5:26 pm     Reply with quote

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: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: Program code now and eeprom later
PostPosted: Tue Sep 26, 2006 5:58 pm     Reply with quote

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!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group