13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset 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.

Using the Linker2. In the left pane, expand C/C++ Build and select Memory.In the right pane the Memory page appears.3. Open the Memory tab and click on the Add... button.The Add new memory dialog appears.4. Enter the memory name (<strong>for</strong> example my_nvram), type (<strong>for</strong> example nvram) and size.5. Click on the Add... button.The Add new mapping dialog appears.6. You have to specify at least one mapping. Enter the mapping name (optional), address, size anddestination and click OK.The new mapping is added to the list of mappings.7. Click OK.The new memory is added to the list of memories (user memory).8. Click OK to close the Properties dialog.The updated settings are stored in the project LSL file.If you make changes to the on-chip memory as defined in the architecture LSL file, the memory is copiedto your project LSL file and the line #define __MEMORY is added. If you remove all the on-chip memoryfrom your project LSL file, also make sure you remove this define.8.7.8. The Section Layout Definition: Locating SectionsOnce you have defined the internal core architecture and optional memory, you can actually define whereyour application must be located in the physical memory.During compilation, the compiler divides the application into sections. Sections have a name, an indication(section type) in which address space it should be located and attributes like writable or read-only.In the section layout definition you can exactly define how input sections are placed in address spaces,relative to each other, and what their absolute run-time and load-time addresses will be.Example: section propagation through the <strong>toolset</strong>To illustrate section placement, the following example of a C program (bat.c) is used. The programsaves the number of times it has been executed in battery back-upped memory, and prints the number.#define BATTERY_BACKUP_TAG 0xa5f0#include int uninitialized_data;int initialized_data = 1;#pragma section "non_volatile"213

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

Saved successfully!

Ooh no, something went wrong!