Changes

Jump to: navigation, search

AN-BMSC-001: Running Wind River VxWorks 6.9 on Bora

6,900 bytes added, 16:01, 31 August 2015
Created page with "=AN-BELK-004: Running Wind River VxWorks 6.9 on Bora= ==Introduction== Bora SoM is particularly suited for the use in deep embededd applications such as biomedical, aerospace..."
=AN-BELK-004: Running Wind River VxWorks 6.9 on Bora=
==Introduction==
Bora SoM is particularly suited for the use in deep embededd applications such as biomedical, aerospace and trasportation. In many of these cases, system specifications require the use of commercial real-time operating systems such as Wind River VxWorks (http://www.windriver.com/products/vxworks/).

This application notes describes the porting of VwWorks 6.9 on Bora. The porting has been tested on Bora/BoraEVB hardware platform. The following peripherals are supported:


{| class="wikitable"
|-
! Peripheral !! Status !! Details
|-
| UART || working || used as console (default 115200bps)
|-
| Ethernet || working || used with WDB connection
|-
| USB Host || working || tested with INCLUDE_USB_GEN2_STORAGE_INIT
|-
| USB Target || working || tested with INCLUDE_MS_EMULATOR_INIT
|-
| SHDC || working with limitation || tested with BoraEVB microSD slot and Kingstone 16GB microSDHC class 4
|-
| QSPI || working || tested with Bora on-module QSPI NOR Flash
|-
| QSPI Flash || working || tested with Bora on-module QSPI NOR Flash
|-
| L2 Cache || working || enabled by default
|-
| I2C || working || tested by reading DS3232 registers
|-
| PS GPIO || working || register level access to peripheral
|-
| DEVCFG || working || tested by loading FPGA bitstream from BELK
|-
| RTC || working || support for BORA on-module DS3232 RTC
|}

The following peripheral are NOT supported in current BSP release

{| class="wikitable"
|-
! Peripheral !! Available on BORA/BoraEVB !! Details
|-
| AWDT/SWDT || Y || Not supported in Xilinx BSP
|-
| NAND || Y || Not supported in Xilinx BSP
|-
| SPI || Y || Not supported in Xilinx BSP
|-
| XADC || Y || Not supported in Xilinx BSP
|-
| CAN || Y || Not supported in Xilinx BSP
|-
| PCIe || N || Not supported in Xilinx BSP
|-
| EEPROM || N || Supported in Xilinx BSP
|}

==Supported boot sequences==
Two boot sequences are supported:
# Zynq Boot ROM, FSBL, U-Boot, VxWorks kernel (1)
# Zynq Boot ROM, FSBL, VxWorks bootrom, VxWorks kernel


(1) Please note that U-Boot released along with BELK 2.1.0 is not capable of launching VxWorks image. <strike>At this URL TBD it is available the patch required to enable this functionality.</strike>. You need to apply the following patch to add VxWorks boot support:

<pre>
diff --git a/include/configs/bora.h b/include/configs/bora.h
index b827ab7..0810e9c 100644
--- a/include/configs/bora.h
+++ b/include/configs/bora.h
@@ -46,6 +46,8 @@

#include <configs/zynq_common.h>

+#define CONFIG_CMD_ELF
+
#undef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS \
"addcons=setenv bootargs ${bootargs} console=${console},115200n8 debug maxcpus=${nr_cpus} earlyprintk\0" \
@@ -122,7 +124,13 @@
"fatload mmc 0 ${loadaddr_kern} ${kernel_image} && " \
"fatload mmc 0 ${loadaddr_fdt} ${devicetree_image} && " \
"run mmcargs addcons addmem && " \
- "bootm ${loadaddr_kern} - ${loadaddr_fdt}\0"
+ "bootm ${loadaddr_kern} - ${loadaddr_fdt}\0" \
+ "bootaddr=0x101100\0" \
+ "vxargs=setenv bootargs gem(0,0)host:vxWorks.st h=${serverip} e=${ipaddr} g=${gatewayip} tn=${hostname} u=target pw=vxTarget f=0x0\0" \
+ "loadvx=tftp ${loadaddr} ${vxfile}\0" \
+ "vxfile=bora/vxWorks\0" \
+ "jtag_vx=run vxargs; bootvx 0x200000\0" \
+ "net_vx=run loadvx vxargs; bootvx ${loadaddr}\0"

#define CONFIG_CMD_CACHE
</pre>

===U-Boot based boot sequence===
This example shows how to retrieve (via TFTP) and run VwWorks image. First of all some new environment variables are set:
<pre>
setenv loadvx 'tftp ${loadaddr} ${vxfile}'
setenv vxfile bora/vxWorks
setenv net_vx 'run loadvx vxargs; bootvx ${loadaddr}'
</pre>
The following dump shows the messages printed out on console during the whole boot process:
<pre>
zynq-uboot> run net_vx
Gem.e000b000 Waiting for PHY auto negotiation to complete..... done
Using Gem.e000b000 device
TFTP from server 192.168.0.23; our IP address is 192.168.0.77
Filename 'bora/vxWorks'.
Load address: 0x8000000
Loading: T #################################################################
[snip]
#
1 MiB/s
done
Bytes transferred = 12313616 (bbe410 hex)
## Ethernet MAC address not copied to NV RAM
Loading .text @ 0x00200000 (2322020 bytes)
Loading .wrs_build_vars @ 0x00436e64 (336 bytes)
Loading .data @ 0x00436fc0 (243212 bytes)
Loading .tls_data @ 0x004725cc (8 bytes)
Loading .tls_vars @ 0x004725d8 (12 bytes)
Clearing .sbss @ 0x004725e4 (4 bytes)
Clearing .bss @ 0x004725e8 (156896 bytes)
## Using bootline (@ 0x101100): gem(0,0)host:vxWorks.st h=192.168.0.23 e=192.168.0.77 g= tn=bora u=target pw=vxTarget f=0x0
## StartingþtffsDevCreate failed.
Target Name: vxTarget

Adding 8527 symbols for standalone.


VxWorks

Copyright 1984-2014 Wind River Systems, Inc.

CPU: Xilinx Zynq-7000 ARMv7
Runtime Name: VxWorks
Runtime Version: 6.9
BSP version: 6.9/7
Created: Dec 16 2014 14:02:34
ED&R Policy Mode: Deployed
WDB Comm Type: WDB_COMM_END
WDB: Ready.


->
</pre>
===VxWorks bootrom based boot sequence===
The following dump shows the messages printed out on console in case of VxWorks bootrom based boot sequence:

<pre>
VxWorks System Boot


Copyright 1984-2015 Wind River Systems, Inc.





CPU: Xilinx Zynq-7000 ARMv7
Version: VxWorks 6.9
BSP version: 6.9/2
Creation date: Mar 25 2015 17:48:05




Press any key to stop auto-boot...
1
auto-booting...


boot device : fs
unit number : 0
processor number : 0
host name : bora2
file name : /tffs0/vxWorks
inet on ethernet (e) : 192.168.0.77
host inet (h) : 192.168.0.13
gateway inet (g) : 192.168.0.254
user (u) : target
ftp password (pw) : vxTarget
flags (f) : 0x0
target name (tn) : xlnx_zynq7k

Loading /tffs0/vxWorks...2189460 + 488768
Starting at 0x200000...


usrNetDevNameGet: no network device
usrNetDevNameGet: no network device

Adding 8271 symbols for standalone.
usrNetDevNameGet: no network device
wdbCommDevInit: could not get device name
wdbConfig: error configuring WDB communication interface


VxWorks

Copyright 1984-2015 Wind River Systems, Inc.

CPU: Xilinx Zynq-7000 ARMv7
Runtime Name: VxWorks
Runtime Version: 6.9
BSP version: 6.9/2
Created: Mar 26 2015 12:05:55
ED&R Policy Mode: Deployed
WDB Comm Type: WDB_COMM_END
WDB: Agent configuration failed.


Trying to create RAM disk /bd/0
Instantiating /bd/0 as rawFs, device = 0x20001
OK. Trying to format RAM disk /bd/0 as dosFs
Formatting /bd/0 for DOSFS
-> Instantiating /bd/0 as rawFs, device = 0x20001
Formatting...OK.
usbTargRbcCmdDataUpdate: BytesPerBlock is 512,NumOfBlock is 20480
usbTargInitialize() returned OK
usbTargTcdAttach() returned OK
targChannel = 0x1
usbTargEnable() returned OK
FSL TCD initialized

->
</pre>
4,650
edits

Navigation menu