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

Include romdata

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



Joined: 25 Oct 2004
Posts: 136

View user's profile Send private message

Include romdata
PostPosted: Fri Dec 23, 2005 6:40 am     Reply with quote

Hi Friends

Does anybody out there know how to include of hex file into the programm memory ?

Here is what I like to do:

1. creating a file with webpages
2. defining a specific programm memory location
3. load this fileduring compilation at this location
4. read this data out of prgramm memory and send it
serial out

processor use: PIC18F8720 and 18F2420

Any hep appreciated

best regards

Andreas

BTW: Searching the forum didnt give me a good hint
Ttelmah
Guest







PostPosted: Fri Dec 23, 2005 9:13 am     Reply with quote

Generally, the 'easiest' way, would probably just be to load the file using your programmer. Many allow you to put a block of data at a location, and provided you have already reserved this location, and use the location with your code to access what is expected to be there, then this is quick and easy.
Most people doing similar things in the past, and wanting the result to be just one hex file, have ended up writing little programs to convert the required data to #ROM statements, and then just pasted these into the source.

Best Wishes
Andreas



Joined: 25 Oct 2004
Posts: 136

View user's profile Send private message

PostPosted: Fri Dec 23, 2005 11:41 am     Reply with quote

Hello Ttelmah !

Thanks for Your answer, actually I came to the sme idea, but when You have seen the Microchip C Compiler there it is very easy to get the result:

#pragma romdata file= 0x8000
#include "filename"
#pragma romdata

thats it

I was just wondering if there is a similar way in the CCS Compiler, isn't it ??


best regards
and best season greetings
Andreas
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