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

"const" variable and EBTR fuse

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



Joined: 02 Jun 2010
Posts: 74

View user's profile Send private message

"const" variable and EBTR fuse
PostPosted: Mon Oct 15, 2012 12:24 am     Reply with quote

Hi.


I noticed that if I enable EBTR bit in the fuse, the read from const variable in the program from certain variable just fails.


Does "Memory protected from table reads" mean that const variable can not be read from program memory correctly??

Thanks
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Mon Oct 15, 2012 12:50 am     Reply with quote

Yes.
The table read instruction, is what is used to access const values.
This allows one part of the code, to read a value stored elsewhere in the ROM. The 'security' implications are that if someone manages to write code into your chip, then this code can read the contents of the rest of memory.
However they have to have written code into the chip to do this, and there are other fuses to prevent this.

Best Wishes
hello188



Joined: 02 Jun 2010
Posts: 74

View user's profile Send private message

PostPosted: Tue Nov 13, 2012 12:14 am     Reply with quote

Hi.
I also noticed that I have to disable EBTRB bit along with EBTR to get proper const variable reading.
Does CCS-C compiler put constant variables into boot block??
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Tue Nov 13, 2012 2:30 am     Reply with quote

If you are not using it for a bootloader, then 'yes', of course.
It is not a 'bootblock', unless you define it as such. Otherwise it is just the low part of the program memory.

Best Wishes
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