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.

B<br />

Upgrading a <strong>BSP</strong> for Tornado 2.2<br />

Changes in the Shared Memory Subsystem<br />

A <strong>BSP</strong> for VxWorks 5.5 requires several modest changes to config.h and possibly<br />

to sysLib.c in order to support the shared memory network and the optional<br />

component VxMP. In past releases of VxWorks, you could ensure that the shared<br />

memory components were included simply by verifying the inclusion of the<br />

shared memory backplane network. But in VxWorks 5.5, VxMP can be configured<br />

without support for the shared memory network.<br />

A new component with the inclusion macro INCLUDE_SM_COMMON has been<br />

added to VxWorks 5.5. Use this macro to test for shared memory support. The<br />

majority of <strong>BSP</strong>s that support shared memory use conditional compilation<br />

statements such as the following:<br />

#ifdef INCLUDE_SM_NET<br />

/* shared memory-specific code */<br />

#endif<br />

For VxWorks 5.5, these statements must be updated to test for<br />

INCLUDE_SM_COMMON:<br />

B<br />

#ifdef INCLUDE_SM_COMMON<br />

/* shared memory-specific code */<br />

#endif<br />

When you modify sysLib.c, follow the simple rule of replacing all instances of<br />

INCLUDE_SM_NET with INCLUDE_SM_COMMON.<br />

With a few exceptions, you can use the same rule in changing config.h. A test for<br />

INCLUDE_SM_NET is still valid in network-related statements, but is not valid as<br />

a test for the common shared memory parameters:<br />

SM_ANCHOR_ADRS SM_ANCHOR_OFFSET SM_CPUS_MAX<br />

SM_INT_ARG1 SM_INT_ARG2 SM_INT_ARG3<br />

SM_INT_TYPE SM_MASTER SM_MAX_WAIT<br />

SM_MEM_ADRS SM_MEM_SIZE SM_OBJ_MEM_SIZE<br />

SM_OFF_BOARD SM_TAS_TYPE<br />

These shared memory parameters do not require conditional compilation and can<br />

be left defined at all times. (Note that some are defined by default in configAll.h<br />

and must be undefined before being redefined in config.h.)<br />

The definition of INCLUDE_SM_NET in config.h may also bring in components<br />

that have changed in VxWorks 5.5, such as INCLUDE_NET_SHOW and<br />

INCLUDE_BSD. These components are no longer needed; the smNetShow( )<br />

routine is now in a separate component, called INCLUDE_SM_NET_SHOW, and<br />

proper BSD or other network configuration is contained in other files.<br />

213

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

Saved successfully!

Ooh no, something went wrong!