02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

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.

3<br />

Creating a New <strong>BSP</strong><br />

...<br />

#endif<br />

}<br />

The #include of usrExtra.c links in the other configuration files from<br />

src/config. You do not need these now, but you will need them later as you add<br />

features. For example, when you are ready to start working on the kernel and<br />

the target agent, you need to link in the appropriate configuration code as<br />

follows:<br />

3<br />

#if FALSE<br />

#include "usrExtra.c"<br />

#else<br />

#include "usrWdb.c"<br />

#endif<br />

3.3.2 Building and Downloading VxWorks<br />

The VxWorks image you load to the target depends on the download method you<br />

use. The primary images are as follows:<br />

vxWorks<br />

This image starts execution from RAM. It must be loaded into RAM by some<br />

external means such as the board’s native debug ROMs.<br />

vxWorks_rom<br />

This image starts execution from ROM, but its text and data segments are<br />

linked to RAM addresses. Early on it copies itself into RAM and continues<br />

execution from there.<br />

vxWorks_resrom_nosym<br />

This image executes from ROM. Only the data segment is copied into RAM.<br />

If your download path puts the image in RAM (such as when using a vendor<br />

debug ROM), use vxWorks. If your download path puts the image in ROM (such<br />

as when using NetROM), use either vxWorks_rom or vxWorks_resrom_nosym.<br />

The advantage of vxWorks_rom is that it can be more easily debugged because the<br />

software breakpoints can be set only on RAM addresses. The advantage of<br />

vxWorks_resrom_nosym is that it uses less target memory. The makefile for both<br />

ROM images lets you specify an optional .hex suffix (for example,<br />

vxWorks_rom.hex) to produce an S-record, rather than an object file.<br />

There is a file called depend.cputool containing the file dependency rules used by<br />

the makefile. The makefile automatically generates the dependency file if it does<br />

not already exist. If you add new files to the <strong>BSP</strong>, delete the dependency file and let<br />

the makefile regenerate it.<br />

49

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

Saved successfully!

Ooh no, something went wrong!