User manual

Project creation and build UM0036
114/385 Doc ID 7705 Rev 11
Protect - Protects the selected code section from optimization. Adds the -k option to
the selected item in the link script file. Code sections that you have applied protection to
are displayed in red.
Vector file name and Vector address
By default, the filename is set to stm8_interrupt_vector.c for STM8. You can change
the name of the interrupt vector file and also the interrupt vector table start address.
The interrupt vector file is regenerated with each build, which means that you must not
modify it yourself. Instead, you should disable the automatic management of the vector table
by leaving the vector file name edit box empty.
The script link file contains a section dedicated for the interrupt vector table. This section is
automatically generated in Automatic mode, and in Semi-automatic mode if <BEGIN
VECTOR_FILE> and <END VECTOR_FILE> markers are present. By default, the section
will consist of the following lines:
#Setting the beginning of the .const section at 0x8000:
+seg .const -b 0x8000
#The vector table is declared in stm8_interrupt_vector.c as a
#constant, so it will start at 0x8000
#address:stm8_interrupt_vector.o
STM8 linker .const and .text section limitations
The .const section must be located in the first 64k segment (mandatory).
Allowing large function to cross memory section boundaries means that you cannot
use the -gnc option (because -gnc forces the compiler to use short jumps).
Customizing linker output settings
The linker Output settings allow you to apply options that define the types and formats or
output. Access this view by selecting Input in the Category list box. The view will change to
that shown in Figure 76.