VxWorks / Tornado II FAQ


MBX 860 BSP changes

1 Changes to the default BSP

1.1 File changes

1.2 Include TFFS

1.3 sysSerial.c

2 TFFS problems

3 Serial channels

Index


MBX 860 BSP changes

1 Changes to the default BSP

1.1 File changes

In file sysLib.c: change line 329 from #include <ppcDecTimer.h> to #include <ppc860Timer.h>
In file config.h: change the value of PCI_MSTR_IO_SIZE to the actual value (if you are using a PCI device), see the following part from the config.h:
/*
 * PCI_MSTR_IO_SIZE is used for setting the window sizes of both PCI I/O
 * space and PCI Mem space when setting up the Chip Select registers.
 *
 * Only one chip select register is available for PCI space, so I/O space and
 * Mem space must be the same.  PCI_MSTR_MEM_SIZE is automatically set to the
 * value defined here.  Minimum size is 64 KB, maximum size is 512MB.
 */

/*#define PCI_MSTR_IO_SIZE     0x20000000 */   /* defaults to max size */
#define PCI_MSTR_IO_SIZE       0x100000        /* Let's get sane, people */
    

Note: This item is copied from a WRS document.


1.2 Include TFFS

The first thing you have to do is to create a sysTffs.c file. This file can be created using one of the examples in the src\drv\tffs directory. The file that is very close to the MBX configuration is the file pid7t-sysTffs.c. In this file the same flash-chips are defined.
This file can be copied to your BSP directory and must be renamed to sysTffs.c. There are a few changes needed however.

1. The start address of the flash (line 116). This should be 0xFE000000.
2. The size of the flash (line 117). This should be 0x00400000 ( = 4 Mbyte).
3. On line 524 the configuration of the system is defined. The first parameter indicated the size of the bootrom image. This area is not used by TFFS, so a bootrom image can be placed here.


1.3 sysSerial.c

When including the COM driver (define SERIAL_PORT_COM in config.h) the compiler generates an error. This is caused by differences between the definiton and the IMPORT decralation in sysSerial.c. To fix this problem change the lines with the definiton of sysOutByte and sysInByte:

IMPORT void             sysOutByte (ULONG, UCHAR);
IMPORT UCHAR            sysInByte (ULONG);
    

This definiton is identical to the declaration.


In the default BSP only SMC1 and a COM port are supported. The following archive has the changes and additions in it on how to use the SCC ports (except SCC1, as this one is used for Ethernet).

This is code I got through a FAE from WRS. It is absolutely unsupported code, but it did work for me. In the archive is a new version of sysSerial.c with the additions needed for the SCC ports and a file called ppc860SioScc.c.
This file is the actual driver. It is possible to include this in the ppc860Sio driver. This is the archive: mbx860Scc.tgz.


The ads860 BSP supports SMC2 as the second serial port. This sysSerial.c might be similar to the mbx860. Also, see SPR: #10005 titled "Second SMC initialization in sysSerial.c for ads860" on WindSurf. These changes have already been incorporated in the ads860 BSP for T2.
(From: Lourens Geldenhuys, lourens@mecalc.co.za)


2 TFFS problems

Q: When I include TFFS I get an error message about undefined symbols (mountFTL and formatFTL).

A: This is caused by a missing library in libPPC860gnuvx.a. The missing library is ftllite.o. This library is needed for the AMD flash chips that are on the MBX board (The nftllite.o is included in the library, but this one is not needed). You can extract the object file ftllite.o from the file libPPCEC603gnuvx.a with the following command:

arppc x libPPCEC603gnuvx.a ftllite.o
    

Now you can add this object module to your library (be sure to make of copy of the original library first!)

arppc r libPPC860gnuvx.a ftllite.o

Another possiblity is to copy the file ftllite.o to the object directory of your project and include it as an EXTRA_MODULE in the build specification properties.

I cannot guarantee the working of this module (it is for a different processor), but for me it seems to work.


3 Serial channels

Q: How do I define more serial channels than only one, as defined in the BSP?

A: The first possibility is to use the 2 channels of the Winbond chip. If SERIAL_PORT is SERIAL_PORT_COM only one of the 2 serial ports will be used. To enable the second port the following changes should be made to the BSP:

In MBX800.h:

1. Define NUM_TTY to the number of serial channels, in this case 2.
2. Define N_I8250_CHANNELS to the number of channels to be used on the Winbond chip, in this case 2 (again).
3. Add the following lines to the ISA UART definitions (after line 730).
#define	COM2_INT_VEC		IV_COMM2
#define	COM2_BASE_ADRS		CPU_ISA_COM2_BA
      

In sysSerial.c:

1. Add the extra port definition to devParas:
  static I8250_CHAN_PARAS devParas[] =
      {
         {COM1_INT_VEC, COM1_BASE_ADRS, UART_REG_ADDR_INTERVAL},
+        {COM2_INT_VEC, COM2_BASE_ADRS, UART_REG_ADDR_INTERVAL},
      };
      
2. In function sysSerialChanGet only channel 0 is defined. After line 283 (so within the #if (SERIAL_PORT == SERIAL_PORT_COM)) the line "case 1:" should be added to enable the use of the second serial port.

To allow 2 types of serial port to be used sysSerial.c must be changed a lot. Most work has to be done to combine the 2 types of serial ports. This can be done using 2 new defines USE_SERIAL_PORT_SMC and USE_SERIAL_PORT_COM. These can be defined using new components.


Index

1.1 A File changes for MBX860 BSP
1.2 A Include TFFS
1.3 A Error generated after including the COM driver
B Support more srial ports
C Use second SMC in MBX860
2 A When I include TFFS I get an error message about undefined symbols (mountFTL and formatFTL).
3 A How do I define more serial channels than only one, as defined in the BSP?


VxWorks Homepage
© J.A. Borkhuis, 2000 - 2005
Send me an e-mail if this page was helpfull