Atmel CAVR-4 Manual De Usuario
CAVR-4
Part 1. Using the compiler
The DLIB runtime environment
75
Assert
If you have linked your application with support for runtime debugging, C-SPY will be
notified about failed asserts. If this is not the behavior you require, you must add the
source file
notified about failed asserts. If this is not the behavior you require, you must add the
source file
xReportAssert.c
to your application project. Alternatively, you can
rebuild the library. The
_ _ReportAssert
function generates the assert notification.You
can find template code in the
avr\src
directory. For further information, see Building
and using a customized library, page 62. To turn off assertions, you must define the
symbol
symbol
NDEBUG
.
In the IAR Embedded Workbench, this symbol
NDEBUG
is by default defined in a
Release project and not defined in a Debug project. If you build from the command line,
you must explicitly define the symbol according to your needs.
you must explicitly define the symbol according to your needs.
Heaps
The runtime environment supports heaps in the following memory types:
See The heap, page 44 for information about how to set the size for each heap. To use a
specific heap, the prefix in the table is the extended keyword to use in front of
specific heap, the prefix in the table is the extended keyword to use in front of
malloc
,
free
,
calloc
, and
realloc
. The default functions will use one of the specific heap
variants, depending on project settings such as memory model. For information about
how to use a specific heap in C++, see New and Delete operators, page 114.
how to use a specific heap in C++, see New and Delete operators, page 114.
Memory type
Segment name
Extended keyword
Used by default in
memory model
Tiny
TINY_HEAP
_ _tiny
Tiny
Near
NEAR_HEAP
_ _near
Small
Far
FAR_HEAP
_ _far
Medium
Huge
HUGE_HEAP
_ _huge
Large
Table 22: Heaps and memory types