|
|
|
Compiler MetrowerksHCS08CC
CodeWarrior HCS08 C Compiler
Settings:
(Parameters of the compiler-specific code generation and compilation.)
-
Compiler - Compiler identification (change target compiler in Project panel - Cpu local menu - Application options).
-
Unhandled vectors - This property allows you to specify generation of ISR for interrupts unused by Processor expert beans.
Value 'One handler for all' will generate one ISR for all interrupts not used by PE beans and value 'Own handler for every' allows you to have one ISR for each unused interrupt.
There are 2 modes:
-
Generate macros - Generate macros to the project modules. If intention and implementation of some beans' methods allow effective representation methods as macros, these methods will be generated as macros by setting of this property to "yes". Generating methods as macros can reduce code size. Disabling macros can facilitate debugging of the application code.
-
FLASH registers initialization - Generate initialization of registers placed in FLASH memory. It may be necessary to disable this option e.g. when a serial monitor is used.
-
User initialization - In this group user can specify own initialization code that will be executed after reset (see also the Reset Scenario).
-
User data declarations - In this property user can specify own data declarations. Lines from this list will be generated before function _EntryPoint located in the CPU module.
-
User code before PE initialization - In this property user can specify own initialization code. Lines from this list will be generated before any code generated by PE to the function _EntryPoint located in the CPU module.
-
User code after PE initialization - In this property user can specify own initialization code. Lines from this list will be generated between the PE initialization code and the jump to __Startup (C initialization), to the function _EntryPoint located in the CPU module.
-
Memory model - Memory model that is used by compiler.
Banked memory model - all data must be in the 64kB address space. The code can be in the range beyond the 64KB limit using a banking scheme. Function pointers are 24-bit large while data pointers are 16-bit large. Small memory model - all code and data must be in the 64KB address space. All pointers and functions are assumed to have 16-bit addresses if not explicitly specified. Tiny memory model - all data including stack must fit into the zero page. Data pointers are assumed to have 8-bit addresses if not explicitly specified with the keyword __far. The code address space is still 64 kB and function pointers are still 16-bit large. Note: When you change the memory model check the memory model setting of the compiler and used library.
There are 3 options:
- Small: Small memory model
- Tiny: Tiny memory model
- Banked: Banked memory model
-
Generate PRM file - Rewrite LINKFILE during code generation. If you would like to add some parts to the link file you should set this property to 'no'. In the first time this property should be set to 'yes' for linkfile's creation.
The following items are available only if the group is enabled (the value is "yes"):
-
Stack specification - Specification of the stack in the PRM linker file. The stack can be defined by a size or a top address. If the stack is disabled any setting of the stack will not be available in the PRM linker file (see the linker manual for information).
There are 3 modes:
- size - Stack is defined by size and it is put behind the used memory in a RAM area. For details please refer to linker command STACKSIZE in CodeWarrior documentation. The following items are displayed in this mode:
- top address - Stack is defined from the top address down to the begin of a RAM area where is the address defined. For details please refer to linker command STACKTOP in CodeWarrior documentation. The following items are displayed in this mode:
- disabled - Linker commands STACKSIZE and STACKTOP are not used. Stack can be defined below as a STACK memory segment for SSTACK section. There are no items in this mode.
-
Set memory areas default - Click to set default memory areas according to current CPU bean settings (memory mapping and memory model). See CPU memory map window for detail about current memory mapping and available sizes.
-
ROM/RAM Areas - List of available memories. For each memory you must specify: start address, length in bytes and type of the memory area (qualifier). You must define data and code memories.
The definition of the Memory Areas is used to generate LINKFILE for the application. The default definition is suitable for most applications.
The definition of memory areas depends on the selected CPU type and used Memory Model. The definition always contains mandatory memory areas and optional memory areas.
Small memory model:
- Mandatory memory areas
- Memory Area 0 - name ROM, type READ_ONLY
This memory area is intended to store application code. It is placed in the largest section of the largest FLASH/ROM memory by default.
- Memory Area 1 - name Z_RAM, type READ_WRITE
This memory area is placed in the zero page of the RAM (address range 0 - 255). By default it is placed just after the I/O register and its default length is 32 bytes.
- Memory Area 2 - name RAM, type READ_WRITE
The variables of the applications are stored in this memory area. It covers the rest (unoccupied by the Z_RAM) of the first RAM memory block by default.
- Optional memory areas.
Existence of these memory areas depends on selected CPU. They cover the remaining memories of the CPU.
- Memory areas with the name RAM1, RAM2, etc. cover every remaining RAM memory block
- Memory areas with the name ROM1, ROM2, etc. cover every remaining FLASH/ROM memory block. These memory areas are disabled by default due to the limitation of the compiler.
- Memory area with the name EEPROM covers the EEPROM memory (if present). The type of this memory area is READ_ONLY. If present a segment of the name MY_EEPROM_DATA will be created in the LINKFILE.
Tiny memory model:
- Mandatory memory areas
- Memory Area 0 - name ROM, type READ_ONLY
This memory area is intended to store application code. It is placed in the largest section of the largest FLASH/ROM memory by default.
- Memory Area 1 - name Z_RAM, type READ_WRITE
This memory area covers the zero page of the RAM (address range 0 - 255). By default it is placed just after the I/O register and spans to the end of the zero page.
- Optional memory areas. Existence of these memory areas depends on selected CPU. They cover the remaining memories of the CPU.
- Memory areas with the name FAR_RAM1, FAR_RAM2, etc. cover every remaining RAM memory. It is intended to store variables with far modifier. If present a memory area of the name MY_FAR_DATA will be created in the LINKFILE. To use this memory segment use "#pragma DATA_SEG FAR_SEG MY_FAR_DATA" directive in the source code of the application.
- Memory areas with the name ROM1, ROM2, etc. cover every remaining FLASH/ROM memory block. These memory areas are disabled by default due to the limitation of the compiler.
- Memory area with the name EEPROM covers the EEPROM memory (if present). The type of this memory area is READ_ONLY. If present a segment of the name MY_EEPROM_DATA will be created in the LINKFILE.
Banked memory model:
- Mandatory memory areas
- Memory Area 0 - name ROM, type READ_ONLY
This memory area is intended to store non-banked application code. It is placed in the largest section of the largest FLASH/ROM memory by default.
- Memory Area 1 - name Z_RAM, type READ_WRITE
This memory area is placed in the zero page of the RAM (address range 0 - 255). By default it is placed just after the I/O register and its default length is 32 bytes.
- Memory Area 2 - name RAM, type READ_WRITE
The variables of the applications are stored in this memory area. It covers the rest (unoccupied by the Z_RAM) of the first RAM memory block by default.
- Optional memory areas.
Existence of these memory areas depends on selected CPU. They cover the remaining memories of the CPU.
- Memory areas with the name RAM1, RAM2, etc. cover every remaining RAM memory blocks.
- Memory areas with the name ROM1, ROM2, etc. cover every remaining FLASH/ROM memory blocks in the 64kB address range.
These memory areas are used to store banked portion of the application code.
- Memory areas with the name PPPAGE_0, PPAGE_2, etc. cover every remaining FLASH/ROM memory blocks in the extended address range.
These memory areas are used to store banked portion of the application code.
- Memory area with the name EEPROM covers the EEPROM memory (if present). The type of this memory area is READ_ONLY. If present a segment of the name MY_EEPROM_DATA will be created in the LINKFILE.
One Item of the list looks like:
Memory Area0 - Memory area group.
-
ROM/RAM Area - ROM/RAM memory section for data or code.
The following items are available only if the group is enabled (the value is "Enabled"):
-
Name - Area name
-
Address - Start address of the area. This address must be in internal or external memory (if an external bus is supported by the selected derivative). Addresses greater then 0xFFFF are considered to be a global addresses.
-
Size - Size of the area
-
Qualifier - Type of the memory area (read only, read/write, ...)
There are 4 options:
- READ_WRITE: Used for address ranges, which are initialized by the startup code at runtime. Memory area defined with this qualifier will be initialized with 0 at application startup.
Default placement: PRM file will be generated to use this area for initialized and uninitialized DATA.
- READ_ONLY: Used for address ranges, which are initialized at program load time.
Default placement: PRM file will be generated to use this area for CODE and CONSTANT DATA.
- NO_INIT: Used for address ranges, where read write accesses are allowed. Memory area defined with this qualifier will not be initialized at application startup. This may be useful if your target has a battery buffered RAM or to speedup application startup.
Default placement: This memory area is not used by default.
- PAGED: Used for address ranges, where read write accesses are allowed. Memory area defined with this qualifier will not be initialized at application startup. Additionally, the linker will not control if there is an overlap between segments defined with the PAGED qualifier. When overlapped segments are used, it is the user's responsibility to select the correct page before accessing the data allocated on a certain page.
Default placement: This memory area is not used by default.
|
|