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

#ROM statement and BOOTLOADER

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



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

#ROM statement and BOOTLOADER
PostPosted: Mon Nov 03, 2014 7:53 am     Reply with quote

Hi all! im using the bootloader provided by CCS on one project, but im trying to load some values on the eeprom with the #ROM statement.

The code is simple. I just use:

#ROM getenv("EEPROM_ADDRESS") = {0x0102}

This code is on the loaded program, and NOT on the bootloader. When i load the program (using the bootloader), then i check the 0 address of the eeprom and i get 0xFF 0xFF.

How can i load this values to the eeprom on the code, but without using the write_eeprom function?

COMPILER VERSION 4.120 ,pic18F252.


thanks!
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Mon Nov 03, 2014 8:17 am     Reply with quote

That is down to the design of the bootloader.

It needs to accept addresses in the EEPROM range, and allow these to be programmed. The CCS bootloader will only accept lines whose addresses are less than the size of the program memory. It would need extra lines added to also accept lines in the EEPROM area. The code would then need to adjust the EEPGD bit to allow access to this area. Most bootloader don't program this area. Generally you want to keep parameters stored here, and the extra code to access the EEPROM area is not worthwhile.
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

PostPosted: Mon Nov 03, 2014 8:31 am     Reply with quote

Thanks Ttelmah, then i will use a function to store those bytes on the eeprom using the serial port.

I need to free some space on the code and i have some CGRAM characters defined on the program, but if i store them on the eeprom and read them later i could save some space.

thanks again. Very Happy
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Mon Nov 03, 2014 8:47 am     Reply with quote

If they are constant, like CGRAM data, then include this with the bootloader.
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