11.07.2015 Views

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

11Linking and Section placementExecutable programs consists of a number of program sections. Typically there willbe program sections <strong>for</strong> code, initialised data and zero'd data. There will often bemore than one code section and these will require placement at specific addresses inmemory.To describe how the program sections of your program are positioned in memory the<strong>CrossWorks</strong> project system uses a Memory Map file <strong>for</strong>mat (page 337) and a SectionPlacement file <strong>for</strong>mat (page 339). These files are both xml files and can be editedeither with the text editor or with the built-in memory map editor. The memory mapfile specifies the start address and size of memory segments of the target. The sectionplacement file specifies where to place program sections in the memory segments ofthe target. Seperating the memory map from the section placement scheme enables asingle hardware description to be shared across projects and also enables a project tobe built <strong>for</strong> a variety of hardware descriptions.For example a memory map file representing a device with two memory segmentscalled FLASH and SRAM would look something like this in the memory map editor.ROOTFLASH 0x40000000 0x1000SRAM 0x00000000 0x1000A corresponding section placement file will refer to the memory segments of thememory map file and list the sections that are to be placed in those segments. This isdone using a memory segment name in the section placement file that matches amemory segment name in the memory map file.For example a section placement file that places a section called .stack in the SRAMsegment and the .vectors and.text section int the FLASH segment would look like thisin the memory map editor.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!