|
| Target (Keil C251)- Xtal (MHz)
- Specifies the CPU clock of your device. In most cases this value is identical with the XTAL frequency.
- CPU Mode
- Source (251 native) instructs the C251 compiler to generate instructions for the source mode of the 251. This gives typically the best results.
Binary (8051 compatible) instructs the compiler to generate instructions for the binary mode of the 251. New 251 instructions are using the ESC prefix (0A5h) byte. Binary mode code generated with the C251 compiler is not compatible with the 8051. - Memory Model
- The memory model determines which default memory type to use for function arguments, automatic variables, and declarations with no explicit memory type specifier.
The memory model does not influence the maximum program code you can generate. The program size is specified with the Code ROM size selection. The memory model primarily specifies the default memory type used and depends therefore only on the variable space required by the application. Note - You should try to use the default TINY memory model. It generates the fastest, most efficient code. If the data requirements of your application grows you should try the XTINY memory model.
By explicitly declaring a variable with a memory type specifier, you may override the default memory type imposed by the memory model. The following table lists the memory areas used for each memory model. Memory Model | Parameters & Automatic Variables | Default Global Variables | Default Constant Variables | Default Pointer Definition | Default Pointer Size |
|---|
TINY | data | data | near | near * | 2 bytes | XTINY | near | near | near | near * | 2 bytes | SMALL | data | data | code | far * | 4 bytes | XSMALL | near | near | code | far * | 4 bytes | LARGE | xdata | xdata | code | far * | 4 bytes |
- Code Rom Size
- The 251 microcontroller family allows program sizes up to 16 Mbytes. The generated 251 code can be optimized by using specific JMP and CALL instructions. The ROM directive lets you choose the combination of JMP and CALL instructions that is used.
Code Rom Size | JMP Instruction | CALL Instruction Inside the Module | CALL Instruction extern Functions |
|---|
SMALL | AJMP | ACALL | ACALL | MEDIUM | AJMP | ACALL | LCALL | COMPACT | AJMP | LCALL | LCALL | LARGE | LJMP | LCALL | LCALL | HUGE | LJMP | LCALL/ ECALL | ECALL |
- Use On-chip Code ROM
- [ToDo Text] Specifies the usage of the on-chip components that are typically enabled in the CPU startup code. Make sure that the dialog settings are identical with the startup file settings.
- 4 Byte Interrupt Frame Size
- The INTR2 directive informs the C251 compiler that the 251 CPU saves the low order 16 bits of the program counter but does not automatically save PSW1 when entering an interrupt. When INTR2 is used, the C251 compiler generates code that manually saves and restores the PSW1 register in interrupt functions. You must use this directive if you want the 8051 compatible behavior.
Data Threshold - data
- Allows you to optimize the memory model settings.
Examples far: 10
locates variables with size < 10 Bytes to far space. Other variables without explicit memory space are in the default space. - near
- Allows you to optimize the memory model settings.
Examples near: 8
locates variables with size < 8 Bytes to near space. Other variables without explicit memory space are in the default space. - xdata
- Allows you to optimize the memory model settings.
Examples xdata: 12
locates variables with size < 12 Bytes to xdata space. Other variables without explicit memory space are in the default space.
- Code Banking
- Enables program code banking.
This checkbox also enables the code bank option in the Options for Group - Properties dialog. A standard 8051 device has an address range of 64 KBytes for code space. To expand program code beyond this 64KB limit, the Keil 8051 tools support code banking. This technique lets you manage one common area and 32 banks of up to 64 Kbytes each for a total of 2 Mbytes of bank-switched memory. - Banks
- Specifies the number of code banks supported by your hardware.
Note - To locate program code into a code bank you must assign the source modules to a code bank. This is done in the dialog Options – Properties that opens with a right mouse click in the project window on the file or file group. This dialog allows you to select the code bank or the common area.
- Bank Area
- Specifies the start and end address of the banked area supported by your hardware.
Note - To locate program code into a code bank you must assign the source modules to a code bank. This is done in the dialog Options – Properties that opens with a right mouse click in the project window on the file or file group. This dialog allows you to select the code bank or the common area.
External Memory #0 - Start/Size - Here you specify all external memory areas of the target hardware. RAM denotes the memory areas where variables are stored. ROM refers to areas that store constants and program code (typical EPROM or Flash memory).
When using the Monitor for testing your program code will run in RAM space. However you still need to specify a ROM area in this dialog, otherwise your application has no memory for constants and program code.
This information is used to derive the linker/locater settings. If you need specific chip select signals for your hardware, you need to configure in addition the startup file of your CPU.
|
|