|
Real-Time Concepts for Embedded SystemsThe embedded developer can use the SECTION directive to achieve these goals. The MEMORY directive defines the types of physical memory present on the target system and the address range occupied by each physical memory block, as specified in the following generalized syntax MEMORY { Parea-name: org = start-address, len = number-of-bytes P } In the example shown in Figure 2.5, three physical blocks of memory are present: g a ROM chip mapped to address space location 0, with 32 bytes, g some flash memory mapped to address space location 0x40, with 4,096 bytes, and g a block of RAM that starts at origin 0x10000, with 65,536 bytes. Translating this memory map into the MEMORY directive is shown in Listing 2.2. The named areas are ROM, FLASH, and RAM. Listing 2.2: Memory map. MEMORY { PROM: origin = 0x0000h, length = 0x0020h PFLASH: origin = 0x0040h, length = 0x1000h PRAM: origin = 0x1000h, length = 0x10000h } The SECTION directive tells the linker which input sections are to be combined into which output section, which output sections are to be grouped together and allocated in contiguous memory, and where to place each section, as well as other information ...» |
Код для вставки книги в блог HTML
phpBB
текст
|
|