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 />

The target agent’s linked-in approach has several advantages over the traditional<br />

approach:<br />

■<br />

■<br />

There is only one initialization code module to write. In a traditional<br />

ROM-monitor approach, you must write two initialization code modules: one<br />

for the monitor and one for the OS. In addition, the traditional approach<br />

requires non-standard modifications to resolve contention issues over MMU,<br />

vector table, and device initialization. 1<br />

The code size is smaller because VxWorks and the target agent can share<br />

generic library routines such as memcpy( ).<br />

■<br />

Traditional ROM monitors debug only in “system mode.” The whole OS is<br />

debugged as a single thread. The WDB agent provides, in addition to system<br />

mode, a fully VxWorks-aware tasking mode. This mode allows debugging<br />

selected parts of the OS (such as individual tasks), without affecting the rest of<br />

the system.<br />

How you download the WDB agent and VxWorks kernel depends on your phase<br />

of development. When writing and debugging the board initialization code, you<br />

must create your own download path. This is no better or worse than the<br />

traditional ROM-monitor approach in which you had to create the download path<br />

for porting the monitor itself. After you have the board initialization code working,<br />

how you proceed depends on the speed of your download path.<br />

If you have a fast download path, continue to use it for further kernel<br />

development. This is a win over a traditional ROM monitor approach which often<br />

forces you to use a serial-line download path. If you have a slow download path,<br />

you should burn into ROM the kernel, the agent, and as much generic VxWorks<br />

code as fits.<br />

Because the Tornado development tools let you download and execute code<br />

dynamically, you can download extensions (such as application code, new drivers,<br />

extra hardware initialization code, and the like) and use the WDB agent to debug<br />

the extensions. This is a win over a traditional monitor approach, which requires<br />

that you to download the entire kernel every time, even though most of the code<br />

has not changed.<br />

1. The traditional ROM-monitor approach is to modify the OS initialization code temporarily<br />

to ensure that the MMU, certain parts of the vector table, and the device used by the monitor<br />

are not reset. By running only one set of initialization code, these problem go away.<br />

42

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

Saved successfully!

Ooh no, something went wrong!