
Memory Layout and Configuration
SC100 C Compiler
6-13
6.3.5.1 File structure and syntax
More than one section of each type can be included in the file. The order in which the sections are defined
in the file is unimportant. Each of the section types is optional and can be omitted.
The syntax of the application configuration file is as follows:
translation_unit:
header_section
configuration section_list
end configuration
;
header_section:
opt_version
;
opt_version:
version string_content |
;
section_list:
section | section_list section
;
section:
schedule_section | binding_section | overlay_section
;
6.3.5.2 Schedule section
The schedule section defines the entry point structure of an application, by specifying a "call tree". The call
tree root is a C function name that defines the starting entry point for an application. Each node in the call
tree is the name of an entry point of a unit that can be called during the execution of the application.
Each call tree node is defined as a call tree item, and is given a
ct
number that is unique for the
application. A call tree item can be one of three types:
Background task, identifying the main entry point, defined as
main
Interrupt handler, identifying an interrupt routine entry point, defined as
it_entry
, with a number
that is used by the binding section to link to the associated hardware interrupt vector
Task entry point, defined as
task_entry
, for example, an operating system task
The schedule section can optionally include an overlay specification, which informs the compiler which
groups of local variables can use the same memory location during execution of the application. The
compiler is able to overlay groups of local variables automatically, but only when it is clear that the two
sets of variables do not share the same lifetime, and are therefore not active simultaneously. By specifying
overlays in this file, you provide the necessary information in advance to help the compiler make more
efficient use of memory space.
The overlay specification in the schedule section relates to local variables only. Overlays for global
variables are specified in the overlay section, as described in
Section 6.3.5.4,
“
Overlay section.
”