11.07.2015 Views

Imagecraft c compiler and development environment for the atmel avr

Imagecraft c compiler and development environment for the atmel avr

Imagecraft c compiler and development environment for the atmel avr

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ICCV8 <strong>for</strong> AVR – C Compiler <strong>for</strong> Atmel AVRProgram <strong>and</strong> Data Memory UsageProgram MemoryThe program memory is used <strong>for</strong> storing your program code, constant tables, <strong>and</strong>initial values <strong>for</strong> certain data such as strings <strong>and</strong> global variables. See Program Data<strong>and</strong> Constant Memory. The <strong>compiler</strong> generates a memory image in <strong>the</strong> <strong>for</strong>m of anoutput file that can be used by a suitable program such as an ISP (In SystemProgramming) Programmer.Internal SRAM-Only Data MemoryThe Data Memory is used <strong>for</strong> storing variables, <strong>the</strong> stack frames, <strong>and</strong> <strong>the</strong> heap <strong>for</strong>dynamic memory allocation. In general, <strong>the</strong>y do not appear in <strong>the</strong> output file but areused when <strong>the</strong> program is running. A program uses data memory as follows:HWStackHigh AddressSWStackHeapGlobal Variables<strong>and</strong> StringsCPU <strong>and</strong> I/ORegistersLow AddressThe bottom of <strong>the</strong> memory map is address 0. The first 96 (0x60) locations are CPU<strong>and</strong> IO registers. The newer ATMega devices have even greater amount of IOregisters. The <strong>compiler</strong> places global variables <strong>and</strong> strings from after <strong>the</strong> IO registers.147

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!