02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's 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.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

■<br />

Using a logic analyzer to trace the processor’s address lines.<br />

■<br />

Writing a debugging library to do something like the following:<br />

– Flash an LED.<br />

– Write to persistent memory (local, off-board, or battery backed memory).<br />

– Transmit a character over a serial line in polled mode.<br />

– Send data up through the NetROM debug port.<br />

After you have chosen a debugging mechanism, check that you can jump to your<br />

code’s entry point and run it successfully. Your test code should set up the board’s<br />

RAM as needed and prove that it is working by writing to it and reading back the<br />

value. Your test program will probably use the same initialization code as<br />

VxWorks. For details on the files romInit.s and sysALib.s, see 3.3.1 Writing the <strong>BSP</strong><br />

Files, p.44.<br />

NOTE: If you are testing a debugging library on a ROM-based VxWorks image, be<br />

aware that the data and bss segments are not yet set up. In particular, libraries that<br />

depend on the correct initialization of global variables cannot work yet.<br />

3.3 Writing the <strong>BSP</strong> Pre-Kernel Initialization Code<br />

This section describes how to write the <strong>BSP</strong> files, build and download VxWorks,<br />

debug the initialization code, and how and when to start the WDB agent before<br />

you start the kernel.<br />

3.3.1 Writing the <strong>BSP</strong> Files<br />

Create a <strong>BSP</strong> directory by copying the <strong>BSP</strong> template files from<br />

target/config/templateCPU. Below is a file-by-file description of considerations to<br />

keep in mind when modifying the files.<br />

44

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

Saved successfully!

Ooh no, something went wrong!