Contents
1 The board

The board is based on MicroZed board with Xilinx Zynq-7000 System on Chip. MicroZed board is extended with the MZ_APO board containing connectors, LEDs, button, display and other peripherals. For the PSR course, we will only need the connector for connecting the motors.
For more information, please see:
2 Boards with physical access
If you happen to have the board physically next to you, follow the instructions below.
2.1 Connecting the board
To work with the board you need:
- The board.
- Power supply (5 – 24 V).
- USB cable type AB for serial console.
- Ethernet connection to university network.
To see the board's console, start a serial terminal program (e.g. gtkterm) and set it up for serial port ttyUSB0 and baudrate 115200. You can save this configuration under the name default so that it is loaded automatically when gtkterm starts next time.
2.2 Booting
The VxWorks image is loaded from the network using TFTP protocol. In the lab KN:E-2 there are no special needs. VxWorks is just booted after connecting the board to the network and to the power supply.
After VxWorks is ready to be used, you can see the same prompt as in the simulator.
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]] ]]]] ]]]]]]]]]] ]] ]]]] (R) ] ]]]]]]]]] ]]]]]] ]]]]]]]] ]] ]]]] ]] ]]]]]]] ]]]]]]]] ]]]]]] ] ]] ]]]] ]]] ]]]]] ] ]]] ] ]]]] ]]] ]]]]]]]]] ]]]] ]] ]]]] ]] ]]]]] ]]]] ]]] ]] ] ]]] ]] ]]]]] ]]]]]] ]] ]]]]]]] ]]]] ]] ]]]] ]]]]] ] ]]]] ]]]]] ]]]]]]]] ]]]] ]] ]]]] ]]]]]]] ]]]] ]]]]]] ]]]]] ]]]]]] ] ]]]]] ]]]] ]] ]]]] ]]]]]]]] ]]]] ]]]]]]] ]]]]] ] ]]]]]] ] ]]] ]]]] ]] ]]]] ]]]] ]]]] ]]]] ]]]]]]]] ]]]]] ]]] ]]]]]]] ] ]]]]]]] ]]]] ]]]] ]]]] ]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]] Development System ]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]] VxWorks 6.9 SMP ]]]]]]]]]]]]]]]]]]]]]]]]]] KERNEL: WIND version 2.13 ]]]]]]]]]]]]]]]]]]]]]]]]] Copyright Wind River Systems, Inc., 1984-2017 CPU: Xilinx Zynq-7000 ARMv7 MPCore. Processor #0. Memory Size: 0xfb00000 (251Mb). BSP version 6.9/12. Created: Oct 25 2019 13:23:46 ED&R Policy Mode: Deployed WDB Comm Type: WDB_COMM_END WDB: Ready. PSR rocks! ->
2.3 Troubleshooting
In case that the board fails to boot into VxWorks, i.e., following prompt appears on your serial terminal:
Zynq>
Try to reboot the board by pressing RST button on the board, or using reset command. The serial terminal stays open so you can observe the booting sequence.
The following sections shows the possible issues and their appearance on the terminal.
2.3.1 Unplugged ethernet cable
ethernet@e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! Copying Linux from SD to RAM... reading uImage ** Unable to read file uImage ** Zynq>
2.3.2 Wrong (or non-existent) network connection
ethernet@e000b000 Waiting for PHY auto negotiation to complete.. done BOOTP broadcast 1 BOOTP broadcast 2 BOOTP broadcast 3 BOOTP broadcast 4 BOOTP broadcast 5 BOOTP broadcast 6 BOOTP broadcast 7 BOOTP broadcast 8 BOOTP broadcast 9 BOOTP broadcast 10 BOOTP broadcast 11 BOOTP broadcast 12 BOOTP broadcast 13 BOOTP broadcast 14 BOOTP broadcast 15 BOOTP broadcast 16 BOOTP broadcast 17 Retry time exceeded Copying Linux from SD to RAM... reading uImage ** Unable to read file uImage ** Zynq>
2.4 Connecting Workbench IDE to the board
- Create a new connection to the target in the WindRiver Workbench. In Remote Systems window click an icon to create a new connection. In the New Connection dialog select Wind River VxWorks 6.x Target Server Connection and press Next.

In the next dialog, fill in the IP address of the target computer, specify the Kernel image file /opt/psr/vxWorks-microzed and select Finish.
Please, check your IP address by the ifconfig command.

- Now, the connection is ready. You can use it the same way as you worked with the simulator. The only difference is that instead of closing the simulator, you have to reboot the target machine (by pressing the reset button on the board).
3 Boards with remote access
Note
Currently (as of November 24, 2021), four boards are available. The rest is present in KN:E-2 (lab room).
Few boards are accessible remotely over the internet.

To access the board, run the following command from a Linux terminal or some Windows equivalent (e.g. PuTTY):
ssh -L 17476:/run/psr-hw/wrproxy -o "ExitOnForwardFailure yes" «login»@rtime.felk.cvut.cz
Use you ČVUT login and main password (same as in KOS) (or set up public key authentication for password-less login). If this is successful, you'll see something like this:
## Using bootline (@ 0x101100): gem(0,0)host:pulsar e=10.35.95.50:ffffff00 h=10.35.95.2 g=10.35.95.1 tn=mzapo00 o=mac:02:0a:35:00:2a:08 ## Starting vxWorks at 0x00200000 ... User: target Ethernet address: 02:0a:35:00:2a:08 Adding 8042 symbols for standalone. ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]] ]]]] ]]]]]]]]]] ]] ]]]] (R) ] ]]]]]]]]] ]]]]]] ]]]]]]]] ]] ]]]] ]] ]]]]]]] ]]]]]]]] ]]]]]] ] ]] ]]]] ]]] ]]]]] ] ]]] ] ]]]] ]]] ]]]]]]]]] ]]]] ]] ]]]] ]] ]]]]] ]]]] ]]] ]] ] ]]] ]] ]]]]] ]]]]]] ]] ]]]]]]] ]]]] ]] ]]]] ]]]]] ] ]]]] ]]]]] ]]]]]]]] ]]]] ]] ]]]] ]]]]]]] ]]]] ]]]]]] ]]]]] ]]]]]] ] ]]]]] ]]]] ]] ]]]] ]]]]]]]] ]]]] ]]]]]]] ]]]]] ] ]]]]]] ] ]]] ]]]] ]] ]]]] ]]]] ]]]] ]]]] ]]]]]]]] ]]]]] ]]] ]]]]]]] ] ]]]]]]] ]]]] ]]]] ]]]] ]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]] Development System ]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]] VxWorks 6.9 SMP ]]]]]]]]]]]]]]]]]]]]]]]]]] KERNEL: WIND version 2.13 ]]]]]]]]]]]]]]]]]]]]]]]]] Copyright Wind River Systems, Inc., 1984-2017 CPU: Xilinx Zynq-7000 ARMv7 MPCore. Processor #0. Memory Size: 0xfb00000 (251Mb). BSP version 6.9/12. Created: Oct 25 2019 13:23:46 ED&R Policy Mode: Deployed WDB Comm Type: WDB_COMM_END WDB: Ready. PSR rocks! ->
If all boards are occupied, you'll see the list of all connected and waiting users and since when they are connected.
To connect to the board from the Wind River Workbench, create a new remote system connection:

and sent the target server options as follows:

It is important to set the following (the rest can be left with default values):
- Backend: wdbproxy
- Proxy server name or address: 127.0.0.1
- Target port: 0x4444 (corresponds to the value 17476 from ssh -L option; if want to use two boards simultaneously, run the ssh command twice with different port numbers and use corresponding numbers here)
- Connection type: UDP (this is the default)
- Kernel image: /opt/psr/vxWorks-microzed
To reset the board, press Ctrl-X in the terminal.
To disconnect from the board, either close the terminal window or type "~." (tilde, dot; without quotes).
Now, continue with section Compiling and running your programs.
3.1 Public key authentication
To use the board without always typing your password, you can set up public key authentication. If you don't have a SSH key pair, create one:
ssh-keygen
This will ask you a few questions. You can answer them with default values by just pressing Enter. Then, copy your public key to the rtime server:
ssh «login»@rtime.felk.cvut.cz set-authorized-keys < ~/.ssh/id_rsa.pub
If you see no errors, the operation was successful and the next connection to the board will not require any password.
4 Compiling and running your programs
To compile an application for the target DO NOT FORGET to change Build Spec to ARMARCH7gnu_SMP (for DKM) or ARMARCH7gnu_RTP (for RTP). In case you are connected to the board, you have to change Active Build Spec (which is not saved after turning off the Workbench), in case you are uploading to BRUTE, you have to change Default Build Spec.

If you cannot see ARMARCH7gnu_SMP / ARMARCH7gnu_RTP in the list click More... and select it from the list there. If it is not present even there, right click on the project, select Properties, then Build properties, click Import, select Default settings and click Finish. Now, you should be able to select ARMARCH7gnu_SMP / ARMARCH7gnu_RTP as described above.
4.1 Troubleshooting
This section covers errors that you can frequently encounter. In case you find another one, let us know!
4.1.1 Wrong binary is being downloaded (DKM)
Launch step finished with this error: WTX Loader Error: Incorrect object module format
This is shown when wrong Build Specification is selected for the binary. Follow the steps above to change it. Then, compile your project.
In case you encounter this even with changed specification, it means that your Run Configuration still use old binary. Either create new Run Configuration or change the current one by adding the correct binary and removing the old one:

4.1.2 Wrong binary is being downloaded (RTP)
Launch step finished with this error: Failed to launch RTP ...
Create failed. Target errno reported: S_errno_ECONNREFUSED
This is shown when wrong Build Specification is selected for Real-Time Process. Follow the steps above to change it to ARMARCH7gnu_RTP. Then, compile your project.
Similarly to the issue above, when changing the build specification does not help, Run Configuration is still using the old .vxe file. Either create new Run Configuration or change the current one by replacing the executable file:
