Datasheet
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 famil-
iar 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 attention when porting code from one MCU to another, because com
piled 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 writ-
ing your code. Compiler automatically takes care of appropiate instruction
set, and if unapropriate asm instruction is used in in-line assembly, co-
mpiler 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 memo-
ry size larger than 128kb)
- MCUs with program counter size less or equal 16 bits (flash mem-
ory 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: mikroC PRO for AVR specifics, AVR memory organization
114
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
AVR Specifics
mikroC PRO for AVR
CHAPTER 4