avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-chat] Re: [avr-gcc-list] Constatnts in .data section


From: Jörgen Birkler
Subject: [avr-chat] Re: [avr-gcc-list] Constatnts in .data section
Date: Wed, 1 Jun 2005 21:14:18 +0200

See <pgmspace.h> in avr-clib. Maybe not a topic for the avr-gcc list.
 
BTW:
attached time.h compatible lib for the avr. (string functions not ready yet)
 
 
Also rtc.h: Only inlude and call "rtc_init();", enable global interrupts and you have a RTC in your AVR.
 
/Jörgen
----- Original Message -----
Sent: Wednesday, June 01, 2005 2:20 PM
Subject: [avr-gcc-list] Constatnts in .data section

Hello,
I have in my code some constants like this one for example:
const static uint16_t mm_days[12]=
{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
 
As far as I can see it will be placed in .data section in RAM after init. I would prefer to have it in flash memory and not to spend RAM for it. I can afford speed reduction in access to this area. So how can I force gcc to do it if it is possible.
 
Thanks. Alex.
I'm not a member of the list so please take care to "reply all"

 


_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Attachment: clib-time.zip
Description: Zip compressed data

Attachment: rtc.h
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]