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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ICCV8 <strong>for</strong> AVR – C Compiler <strong>for</strong> Atmel AVRIf you reference any text area function by address, <strong>the</strong>n it must be done indirectly. Itsaddress must be put in a word in <strong>the</strong> area func_lit. At runtime, you must dereference<strong>the</strong> content of this word to get <strong>the</strong> correct address of <strong>the</strong> function. Note thatif you are using C to call a function indirectly, <strong>the</strong> <strong>compiler</strong> will take care of all <strong>the</strong>sedetails <strong>for</strong> you. The in<strong>for</strong>mation is useful if you are writing assembly code.Temporarily Deactivating <strong>the</strong> Code CompressorSometimes you may wish to disable <strong>the</strong> code compressor temporarily. For example,perhaps <strong>the</strong> code is extremely timing-sensitive <strong>and</strong> it cannot af<strong>for</strong>d to lose cycles bygoing through <strong>the</strong> extra function call <strong>and</strong> return overhead. You can do this bybracketing code fragments with an instruction pair:asm(“.nocc_start”);...asm(“.nocc_end”);The code compressor ignores <strong>the</strong> instructions between <strong>the</strong>se assembler directives in<strong>the</strong> fragment.The <strong>compiler</strong> provides <strong>the</strong> following macros in <strong>the</strong> system include file:COMPRESS_DISABLE; // disable Code CompressorCOMPRESS_REENABLE; // enable Code Compressor again<strong>for</strong> use in C programs.178

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

Saved successfully!

Ooh no, something went wrong!