View previous topic :: View next topic |
Author |
Message |
Andreas
Joined: 25 Oct 2004 Posts: 136
|
Include romdata |
Posted: Fri Dec 23, 2005 6:40 am |
|
|
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
|
|
Posted: Fri Dec 23, 2005 9:13 am |
|
|
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
|
|
Posted: Fri Dec 23, 2005 11:41 am |
|
|
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 |
|
|
|