70 likes | 199 Views
ECE 447: Lecture 6. Program Sections. $0000. $1000. $1000-$103F 64 bytes I/O registers. $2000. $2000-$B5FF 37.5 kbytes. $B600-$B7FF 512 bytes EEPROM. $B600. $D000. $D000-$FFFF 12 kbytes ROM. $FFFF. Expanded bus mode. ECE 447: 68HC11E9 Memory Map. External RAM.
E N D
ECE 447: Lecture 6 Program Sections
$0000 $1000 $1000-$103F 64 bytes I/O registers $2000 $2000-$B5FF 37.5 kbytes $B600-$B7FF 512 bytes EEPROM $B600 $D000 $D000-$FFFF 12 kbytes ROM $FFFF Expanded bus mode ECE 447: 68HC11E9 Memory Map External RAM External RAM recommended for use recommended for use External RAM
$0000-$01FF 512 bytes RAM $0000 $1000 $1000-$103F 64 bytes I/O registers $2000 Program area - text External RAM $6000 Data area – data External RAM $B600-$B7FF 512 bytes EEPROM $B600 $D000 $FFFF ECE 447: Linker memory.x map
ECE 447: memory.x MEMORY { page0 (rwx) : ORIGIN = 0x0, LENGTH = 512 /* Board with 32K ROM. */ text (rx) : ORIGIN = 0x2000, LENGTH = 0x4000 data (rwx) : ORIGIN = 0x6000, LENGTH = 0x5600 eeprom (rwx) : ORIGIN = 0xB600, LENGTH = 0x0200 } /* Setup the stack on the top of the data memory bank. */ PROVIDE (_stack = 0xB600 - 1);
$0000-$01FF 512 bytes RAM $0000 .page0 $1000 $1000-$103F 64 bytes I/O registers $2000 .text Program area - text External RAM .data $6000 Data area – data External RAM $B600-$B7FF 512 bytes EEPROM $B600 .eeprom $D000 $FFFF ECE 447: What goes where?
.text1 .text1 Assembler Source 1 .data1 .text2 .bss1 .data1 Linker .data2 .text2 Assembler .bss1 Source 2 .data2 .bss2 .bss2 Object Source Binary (Object) Note: .bss section holds uninitialized reserved data (global variables) It is sometimes just included in the .data section ECE 447: Multiple files?
$1000 $2000 $6000 $B600 $D000 $FFFF ECE 447: What about the stack? MEMORY { page0 (rwx) : ORIGIN = 0x0, LENGTH = 512 /* Board with 32K ROM. */ text (rx) : ORIGIN = 0x2000, LENGTH = 0x4000 data (rwx) : ORIGIN = 0x6000, LENGTH = 0x5600 eeprom (rwx) : ORIGIN = 0xB600, LENGTH = 0x0200 } /* Setup the stack on the top of the data memory bank. */ PROVIDE (_stack = 0xB600 - 1); External RAM .data External RAM stack .eeprom