02.08.2013 Views

Introduction To CodeWarrior™ – Simulating The - Freescale ...

Introduction To CodeWarrior™ – Simulating The - Freescale ...

Introduction To CodeWarrior™ – Simulating The - Freescale ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

a. Click on the Add New Text File icon:<br />

b. Edit the file.<br />

c. File > Save As (use .asm as the extension for assembler files).<br />

d. Add it to the project: Project > Add *.asm to the project. In Add Files check both Full Chip Simulation and P&E Multilink<br />

Cyclone Pro.<br />

e. Assemble/Compile it: Project > Compile.<br />

13. View the linker parameter file.<br />

a. Click the + next to Prm and double click the Full_Chip_Simulation_linker.prm file to open it in the editor.<br />

Explore 2.<br />

<strong>The</strong> linker parameter file allows us to locate the various parts of the program in the proper sort of memory. For example, all code<br />

and constant data must be in ROM and variable data and the stack in RAM.<br />

1. Look at the SEGMENTS portion.<br />

a. What memory locations are used for RAM?<br />

b. Where memory locations are used for ROM?<br />

2. Look at the PLACEMENT portion. A variety of default placement options are included. We are interested in where the<br />

DEFAULT_ROM (code and constant data SECTIONS in our assembly program) and the DEFAULT_RAM (variable data<br />

SECTION) will be located.<br />

a. In what memory locations will the code and constants be located?<br />

b. In what memory locations will the variable data be located?<br />

Stimulate 2.<br />

1. What change would you make to the linker parameter file if the target hardware had RAM in memory locations $1000 - $1FFF<br />

(0x1000 <strong>–</strong> 0x1FFF)?<br />

2. What change would you make to the linker parameter file if you wanted to locate the code and constants in memory starting at<br />

$4000 (0x4000)?<br />

14. Make the project.<br />

a. Project > Make or click on the icon<br />

b. Correct any linking errors.<br />

15. Inspect the Linker Map file.<br />

a. Click the + on Linker Map and open Full_Chip_Simulation.map.<br />

Explore 3.<br />

STARTUP SECTION<br />

<strong>Freescale</strong> Semiconductor LABS12CINTRO03S, Rev 1 5

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

Saved successfully!

Ooh no, something went wrong!