Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
Nested Calls Limitations
There are no Nested Calls Limitations, except by RAM size. A Nested call repre-
sents a function call to another function within the function body. With each function
call, the stack increases for the size of the returned address. Number of nested calls
is equel to the capacity of RAM which is left out after allocation of all variables. 
Important notes:
- There are many different types of derivates, so it is necessary to be familiar with 
characteristics and special features of the microcontroller in you are using. 
- Some of the AVR MCUs have hardware multiplier. Due to this, be sure to pay atten
tion when porting code from one MCU to another, because compiled code can vary 
by its size. 
- Not all microcontrollers share the same instruction set. It is advisable to carefully   
read the instruction set of the desired MCU, before you start writing your code.   
Compiler automatically takes care of appropiate instruction set, and if unapropriate 
asm instruction is used in in-line assembly, compiler will report an error. 
- Program counter size is MCU dependent. Thus, there are two sets of libraries : 
- MCUs with program counter size larger than 16 bits (flash memory size larger than  
128kb) 
- MCUs with program counter size less or equal 16 bits (flash memory size smaller 
than 128kb) 
- Assembly SPM instruction and its derivates must reside in Boot Loader section of 
program memory. 
- Part of flash memory can be dedicated to Boot Loader code. For details, refer to 
AVR memory organization. 
Related topics: mikroPascal PRO for AVR specifics, AVR memory organization
110
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
AVR Specifics
mikroPASCAL PRO for AVR
CHAPTER 4