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

It has a VxWorks symbol table linked in. This is no longer needed because<br />

Tornado uses a host-based symbol table for debugging information.<br />

■<br />

It links in the network subsystem, but does not initialize it.<br />

Instead of using a vxWorks.st image, continue to use vxWorks,orvxWorks_rom.<br />

To link in the network without initializing it, add a dummy conditional to<br />

usrConfig.c right before the call to usrNetInit( ):<br />

3<br />

if (FALSE) /* add this line */<br />

usrNetInit (BOOT_LINE_ADRS); /* so that this is not called */<br />

Then you can call usrNetInit( ) later, and use CrossWind to debug your network<br />

driver(s). It is easiest to get your network driver first working with the cache and<br />

MMU disabled.<br />

The following table in src/config/usrNetwork.c is used to configure the BSD 4.4<br />

network devices:<br />

#ifdef NETIF_USR_DECL<br />

NETIF_USR_DECL /* declarations from <strong>BSP</strong> */<br />

#endif<br />

...<br />

LOCAL NETIF netIf [] = /* network interfaces */<br />

{<br />

#ifdef NETIF_USR_ENTRIES /* Additional entries, from <strong>BSP</strong> */<br />

NETIF_USR_ENTRIES<br />

#endif<br />

#ifdef INCLUDE_DC<br />

{"dc", dcattach, (char*)IO_ADRS_DC, INT_VEC_DC, INT_LVL_DC,<br />

DC_POOL_ADRS, DC_POOL_SIZE, DC_DATA_WIDTH, DC_RAM_PCI_ADRS,<br />

DC_MODE },<br />

#endif /* INCLUDE_DC */<br />

#ifdef INCLUDE_EGL<br />

{"egl", eglattach, (char*)IO_ADRS_EGL, INT_VEC_EGL, INT_LVL_EGL},<br />

#endif /* INCLUDE_EGL */<br />

...<br />

}<br />

For END drivers, network devices are initialized by a table in the configNet.h file.<br />

The table name is endDrvTbl.<br />

#define DEC_LOAD_FUNC dec21x40EndLoad<br />

#define DEC_BUFF_LOAN 1<br />

/*<br />

* ::::::: \<br />

* :<br />

*/<br />

# define DEC_LOAD_STRING<br />

59

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

Saved successfully!

Ooh no, something went wrong!