First im trying to understand the memory according to the default.lcf file and the debug view:
MEMORY {
// Data addresses 0-7 are resererved for internal compiler use
DATA (RW) : ORIGIN = d:0x20, LENGTH = 0 // Initialized data
BSS (RW) : ORIGIN = AFTER(DATA), LENGTH = 0 // Uninitialized data
ENGINE() :ORIGIN = 0, LENGTH = 0 // Engine
ETPU_INFO() : ORIGIN = 0, LENGTH = 0 // Internal compiler info - don't remove this line
ENTRY_TABLE(R) : ORIGIN = c:0, LENGTH = 0 // Entry table
TEXT (RX) : ORIGIN = 0x400, LENGTH = 0 // Code
}
SECTION {
...
_STACK_START = 0x1000;
}
What means the letters of origins of memory segment, d:0x20 and c:0? Where i can see information for that?
Where are each section when i debug for simulation? The sections that i try to locate are:
- Internal compilator: the range [0x0000, 0x0020].
- Registers: The location of registers i can see that his range seems that is [0x0000, 0x09FB]. That conflicts with the internal compilator, or is temporal?
- Global and Data Ram: d:0x20 to infinite. I suppose that it ends in 0x1820 if i have 6KBytes available.
- Stack: i dont sure where is but it seems that start in 0x1000 and it grows upward. But the function write_engine_relative_base_addr sets the ERBA with the value 0x200, it results that the ERBA field is 0x100? the ERBA field has 5 bits so the maximum value is 0x1F? i have a conflict with this.
- Entry table: according with the init.tcl file, It sets with the function write_entry_table_base_addr in 0x0000 before de code.
- Code: The code starts in 0x400.
You can see the ram data and code in the memory tab when you debug?