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.

2<br />

<strong>BSP</strong> Organization<br />

can have very undesirable effects for customers using multiple <strong>BSP</strong>s from different<br />

sources. Only Wind River original code is allowed in these directories.<br />

Confusing Configuration Options<br />

In the file config.h, the user should be presented with clear choices for configuring<br />

the <strong>BSP</strong>. Material where the user does not have a choice should not be in config.h,<br />

it should be in bspname.h. The user should not have to compute values to be<br />

entered into config.h. If a register needs to be loaded with the high 16 bits of an<br />

address, the user should enter the full address. The code does the computation of<br />

the value to load in the register. The user should not have to do this; see <strong>BSP</strong><br />

Contents, p.196.<br />

2<br />

Using Non-Maskable Interrupts (NMI)<br />

Because the wind kernel uses intLock( ) as the primary method for protecting<br />

kernel data structures, using non-maskable interrupts (NMI) should be avoided. If<br />

an NMI interrupt service routine (ISR) makes a call to VxWorks that results in a<br />

kernel object being changed, then protection is lost and undesirable behavior can<br />

be expected. For more information on ISRs at high interrupt levels, refer to the<br />

VxWorks Programmer’s <strong>Guide</strong>: Basic OS.<br />

Also note that a VxWorks routine marked as interrupt safe does not mean it is NMI<br />

interrupt safe. On the contrary, many routines marked as interrupt safe are actually<br />

unsafe for NMI.<br />

39

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

Saved successfully!

Ooh no, something went wrong!