NAI BSP Guide for VxWorks 7 — 68ARM4
Applies to VxWorks 7 24.03, 25.03, 25.09, 26.03.
Warnings
- The first VSB build fails if parallel builds are enabled — see the note in section 2.
- The VxWorks source tree needs the driver source changes in section 6; make them before building the VSB in section 2.
- A known problem with the dpni and netDrv drivers can make copying
files off the FTP-backed
/host.hostmount fail; section 5.4.3 includes a RAM disk workaround.
Overview
This guide covers installing the 68ARM4 BSP and building a VxWorks 7 kernel image from it: the VxWorks Source Build (VSB), the VxWorks Image Project (VIP), and the SSK2 downloadable kernel module (DKM) that carries the NAI libraries and sample applications. It then covers booting the finished image on the 68ARM4 with U-Boot, over the network or from SATA, the driver source changes the VxWorks source tree needs, and using the external (backplane) I2C bus.
The supplied delivery contains three folders:
base
nai68arm4
Documentationnai68arm4 is the 68ARM4 BSP. base contains the NAI library (SSK)
and the sample application sources for the 68ARM4 and its function
modules. Documentation contains the NAI library documentation for
each function call in the SSK.
1. Install the BSP
Copy the nai68arm4 folder into the VxWorks installation’s board
directory for your release.
For VxWorks 7 24.03 - 26.03:
$(WIND_BASE)/source/os/arch/arm/board/nxp/2. Create the VxWorks Source Build (VSB)
- Open Workbench and select File > New > Wind River Workbench Project.
- Click Based on Category > select Platform Development.
- Click Build Type > select VxWorks Source Build > Next.
- Name the project (for example
nai68arm4-vsb) > Next. - Click the BSP dropdown and select
nai68arm4_x_x_x_xwith CPU ARMARCH8A. - Select Address Mode as 64-bit (LP64).
- Ensure “Link in sources to project” is checked.
- Click Finish to create the VSB.
- Right-click the VSB project and select Build Project.
NOTE: The build starts with parallel builds enabled, which crashes the 68ARM4 VSB build. Disable it with the parallel-builds button in the Build Console, then right-click the VSB project and select Rebuild Project.
3. Create the VxWorks Image Project (VIP)
- Open Workbench and select File > New > Wind River Workbench Project.
- Click Based on Category > select Platform Development.
- Click Build Type > select VxWorks Image Project > Next.
- Name the project (for example
nai68arm4-vip) > Next. - Base the VIP on the VSB project built in section 2. Make sure the VSB project and BSP name are correct, then click Next.
- Click Profile > select PROFILE_DEVELOPMENT > Finish.
NOTE: PROFILE_DEVELOPMENT is recommended while a project is in the development phase.
Then configure the kernel:
- Expand the VIP project and double-click Kernel Configuration > Bundles.
- Right-click NAI BSP default components > Add.
- Right-click Standalone kernel shell > Add.
- File > Save (or
Ctrl+S).
NOTE: The NAI BSP default components bundle includes the NAI BSP in its entirety. The standalone kernel shell adds components useful during development. The VIP is built at the end of section 4, after the DKM is referenced.
4. SSK2 Downloadable Kernel Module (DKM)
The DKM carries the NAI libraries (SSK) and sample applications and is linked into the kernel image through a VIP project reference.
4.1 Create the DKM
- Open Workbench and select File > New > Wind River Workbench Project.
- Click Based on Category > select Application Development.
- Click Build Type > select Downloadable Kernel Module > Next.
- Name the project (for example
nai68arm4-dkm) > Next. - Click Based on > select a source build project, ensure the VSB from section 2 is selected, then click Finish.
- Delete the automatically created
dkm.c. - Add the
nai_bsp,nai_libs,mbcore_baseandnai_sample_appsfolders (from the delivery’sbasefolder) into the DKM project.
NOTE: If
nai_bspcontains more than onenaibsp_config_<sbc>_vxworks7folder, bring in only the one for this board —naibsp_config_68arm4_vxworks7.
4.2 DKM include paths
-
Right-click the DKM project and select Rebuild Project. On the first build you are prompted to generate the include paths.
-
Click Generate Includes… > Next > Add and add the following paths to the DKM project:
$(PRJ_ROOT_DIR) $(PRJ_ROOT_DIR)/nai_bsp $(PRJ_ROOT_DIR)/nai_bsp/naibsp_config_68arm4_vxworks7 $(PRJ_ROOT_DIR)/mbcore_base/common/include -
Click Finish.
-
Right-click the DKM project > Rebuild Project.
4.3 Reference the DKM from the VIP
-
Right-click the VIP project and select Properties > Project References.
-
Check the box for the DKM project and click Apply and Close.
-
Right-click the VIP project again and select Properties > Build Properties > Paths > Add, then add the following paths, replacing
<PATH_TO_DKM_PROJECT>with the actual DKM project path:<PATH_TO_DKM_PROJECT>/nai_bsp <PATH_TO_DKM_PROJECT>/nai_bsp/naibsp_config_68arm4_vxworks7 -
Click Apply and Close.
-
Right-click the VIP project > Rebuild Project.
At this point the kernel image is built and ready to be loaded onto the 68ARM4.
5. Booting VxWorks 7 with U-Boot
This section covers booting the newly created VxWorks image with U-Boot, over the network via TFTP or from SATA.
Before starting, attach a serial cable between the 68ARM4 and the host PC, connect the board to the same network as the host, and open a terminal emulator on the host. Every prompt from section 5.3 onward — U-Boot and the VxWorks shell — is reached over that console.
Baud rate: 115200
Data: 8 bit
Parity: None
Stop: 1 bit
Flow control: None5.1 Host TFTP server
Start a TFTP server on the host PC. For Windows:
$(WIND_BASE)/host/x86-win64/bin/tftpd64.exeSet Current Directory to the directory that contains the
uVxWorks and nai68arm4.dtb files:
$(WIND_HOME)/workspace/<VIP_PROJECT>/default5.2 Host FTP server (WFTPD)
The TFTP server only hands uVxWorks and the DTB to U-Boot. The FTP
server backs the /host.host file system the running VxWorks kernel
mounts (it appears in the devs listing in section 5.4.2), using the
u=/pw= credentials from the boot line. The mount is made at
boot, so start the FTP server before booting the target. Booting
continues without it, but section 5.4.3 copies the image files off
/host.host to SATA — that step needs the mount in place.
Start an FTP server on the host PC. For Windows:
$(WIND_BASE)/host/x86-win32/bin/wftpd32.exeConfigure the FTP server as follows:
- Click the Security tab > users/rights > New User.
- Username:
winner - Password:
winner - Home Directory: the same directory the TFTP server points to.
NOTE: The username and password must match the
u=andpw=values in thevxargsboot line (sections 5.3 and 5.4). If you choose different credentials here, change them there as well.
5.3 U-Boot network boot
Stop U-Boot on the 68ARM4 by pressing the Esc key. Once at the
U-Boot prompt, modify the U-Boot environment variables to reflect
your environment. During boot the VxWorks kernel reads the bootargs
variable to get the host, target and network mask, as well as the
username and password for the FTP server running on the host.
U-Boot environment variables:
setenv ipaddr 192.168.1.16
setenv netmask 255.255.255.0
setenv serverip 192.168.1.5
setenv vxargs 'setenv bootargs dpni(0,0)host:vxWorks h=192.168.1.5 e=192.168.1.16:ffffff00 u=winner pw=winner f=0x01'
saveenvNOTE:
hinvxargsandserveripare based on your host PC IP configuration.
To boot the VxWorks kernel over the network:
tftpboot 0x85000000 uVxWorks
tftpboot 0x84000000 nai68arm4.dtb && fsl_mc apply DPL 0x20d00000
run vxargs && bootm 0x85000000 - 0x84000000To automate booting over the network:
setenv vxBootTftp 'tftpboot 0x85000000 uVxWorks && tftpboot 0x84000000 nai68arm4.dtb && fsl_mc apply DPL 0x20d00000 && bootm 0x85000000 - 0x84000000'
setenv vxBootCmdTftp 'echo Loading VxWorks from TFTP... && run vxargs && run vxBootTftp'
setenv bootcmd run vxBootCmdTftp
saveenvOn the next power cycle, the target boots VxWorks over the network automatically.
5.4 Booting from SATA
The 68ARM4 supports booting the VxWorks image directly from SATA. The board is first booted once over TFTP so the SATA drive can be formatted and the image files copied to it from the VxWorks shell.
5.4.1 Set up the U-Boot environment
Stop U-Boot on the 68ARM4 by pressing the Esc key. Once at the
U-Boot prompt, set up the environment exactly as in section 5.3
(ipaddr, netmask, serverip and vxargs, followed by
saveenv). If you have already worked through section 5.3, saveenv
stored those values and they are still in place.
Then load and boot the kernel over TFTP:
tftpboot 0x85000000 uVxWorks
tftpboot 0x84000000 nai68arm4.dtb && fsl_mc apply DPL 0x20d00000
run vxargs && bootm 0x85000000 - 0x840000005.4.2 Format the SATA drive
U-Boot needs a FAT32 filesystem to boot a VxWorks kernel. This section
assumes the SATA drive is already partitioned — if /ata2b is missing
from the devs listing below, partition the drive first. After booting
the image, retrieve the name of the SATA device on the 68ARM4. Enter
the following at the VxWorks command line:
devsThe SATA device appears in the listing as /ata2b:
drv refs name
3 [ 3] /adt7461.0
9 [ 3] /ata2a
9 [ 3] /ata2b
2 [ 3] /eeprom/0
15 [ 3] /host.host
0 [ 5] /null
7 [ 5] /objectMcPortal0
...
6 [ 5] /restoolMcPortal
5 [ 3] /spiFpga.0
4 [ 3] /tpm0
1 [ 5] /ttyS0
1 [ 3] /ttyS1
8 [ 3] /vxbusIf /host.host is missing from the listing, the FTP server was not up
when the kernel booted — start it (section 5.2), boot VxWorks again
over TFTP as in section 5.4.1, and repeat this section.
NOTE: The mount is named
host.<host-name>after the host-name field of thevxargsboot line (section 5.3), sodpni(0,0)myPC:vxWorkswould give/host.myPCinstead. This section and section 5.4.3 will refer to/host.host.
To write to the SATA on the 68ARM4, the SATA write protection must be disabled. Enter the following at the VxWorks command line:
naiSetSataWriteProtect 0Then format for FAT32:
dosFsVolFormat "/ata2b",0x20The format reports its progress and ends with OK.
5.4.3 Copy the VxWorks image to SATA
Once the SATA drive has been formatted, copy nai68arm4.dtb and
uVxWorks to it.
The FTP server’s home directory (section 5.2) is the VIP’s default
folder, and the running kernel mounts it as /host.host — or under
your own host name, as described in section 5.4.2. The image files
are reached there directly. On the VxWorks command line:
cd "/host.host"
cp "nai68arm4.dtb","/ata2b"
cp "uVxWorks","/ata2b"NOTE: There is a problem with the dpni and netDrv drivers — Wind River is aware of it and will have a patch out shortly. Until a patch is available, use the RAM disk workaround below.
A workaround is to add an FTP server and a RAM disk to the VIP kernel configuration. Expand the VIP project > double-click Kernel Configuration > Components > add the following:
INCLUDE_RAM_DISK_FORMAT_DOSFS
INCLUDE_RAM_DISK
INCLUDE_IPFTPSMake sure the RAM disk is /ram and its size is large enough to hold
uVxWorks and nai68arm4.dtb. Set the RAM disk parameters below,
then rebuild the VIP and boot it over TFTP again:
RAM_DISK_DEV_NAME "/ram"
RAM_DISK_SIZE 0x1400000Then, from an FTP client on the host such as WinSCP, transfer the two files to the RAM disk on the target.
For WinSCP:
File Protocol: FTP
Encryption: No Encryption
Host name: 192.168.1.16 #The IP configuration of the Board
Port Number: 21
Username: any name except anonymous
Password: leave blankYou are now logged in to the /ram directory. Locate uVxWorks and
nai68arm4.dtb on the host and transfer them into /ram.
On the VxWorks command line, confirm the files are on the RAM disk, then copy them to the SATA drive:
-> naiSetSataWriteProtect 0
-> ls "/ram"
/ram/nai68arm4.dtb
/ram/uVxWorks
value = 0 = 0x0
-> cp "/ram/nai68arm4.dtb","/ata2b"
copying file /ram/nai68arm4.dtb -> /ata2b/nai68arm4.dtb
value = 0 = 0x0
-> cp "/ram/uVxWorks","/ata2b"
copying file /ram/uVxWorks -> /ata2b/uVxWorks
value = 0 = 0x0
-> ls "/ata2b"
/ata2b/uVxWorks
/ata2b/nai68arm4.dtb
value = 0 = 0x0Once both files have been copied to SATA, power cycle the 68ARM4 to configure U-Boot.
5.4.4 Configure U-Boot for SATA boot
Stop U-Boot on the 68ARM4 by pressing the Esc key. Once at the U-Boot prompt, modify the U-Boot environment variables to reflect your environment:
setenv dtbvipbootstart 0x84000000
setenv vipbootstart 0x85000000
setenv vxBootSata 'scsi scan && load scsi 0:2 ${vipbootstart} uVxWorks && load scsi 0:2 ${dtbvipbootstart} nai68arm4.dtb; fsl_mc apply DPL 0x20d00000; bootm ${vipbootstart} - ${dtbvipbootstart}'
setenv vxBootCmdSata 'echo Loading VxWorks from SATA... && run vxargs && run vxBootSata'
setenv bootcmd run vxBootCmdSata
saveenvOn the next power cycle of the target, VxWorks boots from SATA automatically.
6. Required VxWorks Driver Source Changes
The following files in the VxWorks source tree need to be modified and then rebuilt.
6.1 vxbAquantiaPhy.c / vxbAquantiaPhy.h
In vxbAquantiaPhy.h, ADD the model definition:
#define MII45_MODEL_AQR113C 0x31c31c13In aquantiaPhyProbe() in vxbAquantiaPhy.c, FIND the phyId check
and ADD the MII45_MODEL_AQR113C case:
...
if ((phyId == MII45_MODEL_AQ1202) || (phyId == MII45_MODEL_AQ2104) ||
(phyId == MII45_MODEL_AQR105) || (phyId == MII45_MODEL_AQR106) ||
(phyId == MII45_MODEL_AQR107) || (phyId == MII45_MODEL_AQR405) ||
(phyId == MII45_MODEL_AQR405X) || (phyId == MII45_MODEL_AQR107X)
/* START CODE ADDED BY NAI */
|| (phyId == MII45_MODEL_AQR113C)
/* END CODE ADDED BY NAI */
)
{
kprintf("%s ok for phyId 0x%x\n", __func__, phyId);
return OK;
}
...6.2 vxbXspiFlash.c
In vxbXspiFlash.c, ADD the following configuration structure for
the IS25WP01G:
static const XSPI_FLASH_XFER_SUPPORT_INFO is25wp01gTransCfg = {
{
{true, 0}, /* READ */
{true, 8}, /* FAST READ */
{true, 8}, /* FAST READ DTR */
{true, 8}, /* READ 1_1_2 */
{true, 4}, /* READ 1_2_2 */
{false, 0}, /* READ 1_1_2 DTR */
{true, 4}, /* READ 1_2_2 DTR */
{true, 8}, /* READ 1_1_4 */
{true, 6}, /* READ 1_4_4 */
{false, 0}, /* READ 1_1_4 DTR */
{true, 6}, /* READ 1_4_4 DTR */
{false, 0}, /* READ 1_1_8 */
{false, 0}, /* READ 1_8_8 */
{false, 0}, /* READ 1_1_8 DTR */
{false, 0}, /* READ 1_8_8 DTR */
{false, 0}, /* READ 8_8_8 */
{false, 0}, /* READ 8_8_8 DTR */
{true, 0}, /* PP */
{false, 0}, /* PP 1_1_2 */
{false, 0}, /* PP 1_2_2 */
{true, 0}, /* PP 1_1_4 */
{false, 0}, /* PP 1_4_4 */
{false, 0}, /* PP 1_1_8 */
{false, 0}, /* PP 1_8_8 */
{false, 0}, /* PP 8_8_8 */
{false, 0} /* PP 8_8_8 DTR */
}
};and ADD the following device information structure to
xspiFlashList[]:
{
"IS25WP01G", XSPI_FLASH_ISSI, 0x701b, 0x9d70, 256, 4 * 1024, 32768,
&is25wp01gTransCfg,
XSPI_FLASH_SUPPORT_CHIP_ERASE |
XSPI_FLASH_NO_FSR |
XSPI_FLASH_SUPPORT_4B_CMD,
NULL,
NULL
},6.3 vxbI2cRtc.c
In vxbI2cRtcAttach() in vxbI2cRtc.c, ADD the following check for
the attachment of the appropriate GPIO controller before the RTC is
attached:
VXB_DEV_ID pGpioDev = vxbDevAcquireByName("fslQoriqGpio", 2);
if (pGpioDev == NULL) {
return EAGAIN;
}
if ((vxbDevFlagsGet(pGpioDev) & VXB_FLAG_ATTACHED) != VXB_FLAG_ATTACHED) {
return EAGAIN;
}6.4 vxbFdtFslSpi.c
In vxbFdtFslSpi.c, ADD the following device match entry to
fslSpiMatch[]:
{
"fsl,lx2160a-dspi",
NULL,
},7. Using external I2C
Open nai68arm4.dts in the BSP and grep for:
// Add backplane I2C device here by replacing cmps12Add your I2C device by replacing the CMPS12 example. Change the I2C
address (reg = <0x60> below) and the clock frequency
(data-scl-frequency) to match your device, and ensure status is
"okay":
// Add backplane I2C device here by replacing cmps12
&i2c2 {
status = "okay";
CMPS12: cmps12@60
{
reg = <0x60>;
data-scl-frequency = <100000>;
};
};7.1 68RT/INT6/ARM4 Rear Transition Module (RTM) I/O Adapter Detail
J2 Mini-DisplayPort Pinout / Break-out Cable Adapter
| VPX RP | 68INT6/Generic Signal (REF) | RTM Mini DisplayPort J2 | 68ARM4 Signal (REF) | mDP-to-DB9 Adapter |
|---|---|---|---|---|
| GND | 1 | |||
| RP1-D11 | HDMI_HPD | 2 | GPIO7 (68ARM4: RN26-IN) | 8 |
| RP1-A09 | DDP_B0_D_P | 3 | GPIO5 (68ARM4: RN26-IN) | 6 |
| n/c | 4 | |||
| RP1-B09 | DDP_B0_D_N | 5 | GPIO6 (68ARM4: RN26-IN) | 7 |
| n/c | 6 | |||
| GND | 7 | |||
| GND | 8 | |||
| RP1-D09 | DDP_B1_D_P | 9 | ||
| RP1-E10 | DDP_B3_D_P | 10 | ||
| RP1-E09 | DDP_B1_D_N | 11 | ||
| RP1-F10 | DDP_B3_D_N | 12 | ||
| GND | 13 | |||
| GND | 14 | 5 | ||
| RP1-B10 | DDP_B2_D_P | 15 | ||
| RP1-A11 | HDMI_SCL_AUXP | 16 | I2C_CLK (68ARM4: RN70-IN) | 2 |
| RP1-C10 | DDP_B2_D_N | 17 | ||
| RP1-B11 | HDMI_SDA_AUXN | 18 | I2C_DAT (68ARM4: RN70-IN) | 3 |
| GND | 19 | |||
| RP1-E11 | +V5S_VIDEO | 20 | GPIO8 (68ARM4: RN26-IN) | 9 |
NOTE: Please be advised that the 68ARM4 GPIO signals are not currently functioning in accordance with the defined product specifications. This issue is under review for resolution.
7.2 Finding the VxBus ID
After VxWorks boots, enter vxbDevShow at the shell. Device i2c-1
is the backplane I2C device; the value in parentheses next to your
device (0xffff80000202cdc0 in the example below) is the VxBus ID
for your device:
-> vxbDevShow
mainbus-0 at root nexus level(0)
mainbus-0: <NAI 68ARM4>
fdtBus-0 (refs: 7) on mainbus0 (refs: 2)
fdtBus-0: <FDT bus controller> (0xffff80000202c140) level(1)
...
simpleBus-0 (refs: 27) on fdtBus0 (refs: 7)
simpleBus-0: <simple bus controller> (0xffff80000202c5a0) level(2)
...
i2c-0 (refs: 4) on simpleBus0 (refs: 27)
i2c-0: <Freescale Integrated I2C Controller> (0xffff80000202ca00) level(3)
adt7461-0 (refs: 0) on i2c0 (refs: 4)
adt7461-0: <ADT7461 I2C Temperature Sensor Driver> (0xffff80000202caa0) level(4)
security-manager-0 (refs: 0) on i2c0 (refs: 4)
security-manager-0: <(no driver attached)> (0xffff80000202cb40) level(4)
eeprom-0 (refs: 0) on i2c0 (refs: 4)
eeprom-0: <At24 eeprom> (0xffff80000202cbe0) level(4)
rtc-0 (refs: 0) on i2c0 (refs: 4)
rtc-0: <Dallas rtc> (0xffff80000202cc80) level(4)
i2c-1 (refs: 1) on simpleBus0 (refs: 27)
i2c-1: <Freescale Integrated I2C Controller> (0xffff80000202cd20) level(3)
cmps12-0 (refs: 0) on i2c1 (refs: 1)
cmps12-0: <(no driver attached)> (0xffff80000202cdc0) level(4)7.3 I2C read/write calls
The Wind River library source/os/drv/vxbus/buslib/src/i2c/vxbI2cLib.c
provides the calls to I2C read/write:
IMPORT STATUS vxbI2cDevRead (VXB_DEV_ID pDev, UINT8 * pAddrBuf, size_t addrLen,
UINT8 * pDataBuf, size_t dataLen);
IMPORT STATUS vxbI2cDevWrite (VXB_DEV_ID pDev, UINT8 * pAddrBuf, size_t addrLen,
UINT8 * pDataBuf, size_t dataLen);
IMPORT STATUS vxbI2cByNameRead (char * devName, UINT32 unit, UINT8 * pAddrBuf,
size_t addrLen, UINT8 * pDataBuf,
size_t dataLen);
IMPORT STATUS vxbI2cByNameWrite (char * devName, UINT32 unit, UINT8 * pAddrBuf,
size_t addrLen, UINT8 * pDataBuf,
size_t dataLen);An example is given below using the VxWorks shell to get the version
of an I2C device, using the VxBus ID found with vxbDevShow:
-> myData=0
New symbol "myData" added to kernel symbol table.
-> myAddr=0
myAddr = 0xffff80001930e040: value = 0 = 0x0
-> vxbI2cDevRead 0xffff80000202cdc0,&myAddr,2,&myData,2
value = 0 = 0x0
-> myData
myData = 0xffff80001930e0a0: value = 58118 = 0xe306Revision History
| Rev | Revision Date | Description | Author |
|---|---|---|---|
| 1 | March 3, 2025 | Initial Release | HP |
| 2 | August 21, 2026 | Markdown edition of this guide, replacing the Rev 1 Word/PDF version | FC |
