Welcome to the main wiki page for CprE 488! See below for relevant information for the weekly labs, and the Project Page for information regarding the course project.
- 1 ZedBoard Tricks and Tips
- 2 XPS Tricks and Tips
- 3 SDK Tricks, Tips, and Common Errors
- 4 MP-4 Frequently Asked Questions (FAQ)
- 5 MP-3 Frequently Asked Questions (FAQ)
- 6 MP-2 Frequently Asked Questions (FAQ)
- 7 MP-1 Frequently Asked Questions (FAQ)
- 8 MP-0 Frequently Asked Questions (FAQ)
- 9 General Software Help
- 10 Hardware Design Help
ZedBoard Tricks and Tips
Auto-loading a design using the sdcard
- A system.bit file created during the conventional XPS build process.
- An application that will be loaded after the bitfile programming.
XPS Tricks and Tips
Multiple XPS sessions. When you open up XSDK, it (very quickly, nearly invisibly) copies the SDK_Export/ from your currently-open XPS project into your system_hw_platform project. This can lead to some seriously painful bugs:
- You do a normal export from your project and open up SDK, but while working on SDK you also decide to open up a previous project to see where you might have gone wrong.
- You open up two XPS (or two XSDK) projects to compare approaches.
A bitfile / .elf mismatch can cause all sorts of problems, because at the very least you are going to be driving signals that correspond to unmapped memory regions which can lock the CPU. Keep it to 1 XPS + 1 XSDK session, and open up other files you want to simultaneously inspect outside the Xilinx tools.
I don't see a drop-down menu to connect ports together. When XPS runs on Windows 10, this seems to be a recurring issue. There are 2 possible solutions that might help:
- Expand the XPS window to cover both monitor screens
- Add the "Nets" column to the Ports tab (right-click on the headers). Then the drop-down menu will appear if you click on the Nets column.
SDK Tricks, Tips, and Common Errors
Fixing Cairo Error. On some configurations there is a problem when the JVM running XSDK tries to render graphics using Cairo causing the following error:
cairo-misc.c:380: _cairo_operator_bounded_by_source: Assertion `NOT_REACHED' failed. To fix this problem we simply tell the JVM to disable rendering using Cairo by calling XSDK with the following command:
xsdk -vmargs -Dorg.eclipse.swt.internal.gtk.cairoGraphics=false. The
-vmargs is needed to tell Eclipse to pass the next argument to the JVM.
No Active System Dialog Box. This dialog opens occasionally in XSDK if you rebuild the program while one was already running. Unfortunately, this confuses XSDK to the point where it needs to be restarted. To fix this error do the following:
- Close XSDK, turn off the Zedboard
- Re-open XSDK and open the workspace with your project
- Turn on the Zedboard, reprogram it with the FPGA file and your softwae
- Continue the lab
To avoid this problem from happening, always stop the program running on the Zedboard before you build a new version of the software (yes, this gets annoying). There are 2 ways to stop the program:
- Press the Red square on the right-side of the console's task bar
- Make a switch/button able to end the main while loop and return from the main function
Fatal error: No Input Files. This error can occur on Windows when XSDK can't get to the file system path where your source files are located. The root cause of this issue is using UNC paths (aka. \\my.files.iastate.edu\users...) to store and access the project. XSDK requires that a drive letter be used to access the project instead of UNC path. To fix this error do the following:
- File -> Switch Workspace -> Other
- Click Browse
- Expand the U: drive letter (under My PC)
- Navigate to the folder the workspace was located in. There is a folder for the Desktop, Documents folder, etc. there that contains the same files as your Windows profile folder
- Click Ok, the path displayed should now start with "U:\"
- Click Ok, XSDK should now restart and be at the proper directory
- Re-compile the code and continue working
Invalid Command Name: "ps7_init" or No Target with ID 64 in the System. This error occurs when moving an XSDK workspace from one directory to another (such as moving between people's accounts). The root cause is the program launcher cannot find a file it needs to start the processor cores, so it errors. Luckily the fix is very simple:
- Click Run -> Run Configurations
- Select the configuration you are using (usually project_name.elf under the Xilinx C/C++ application heading) from the list on the Left
- Under the Device Initialization tab, modify the field labeled "Path to initialization TCL file" to have the new path to your workspace
- Run the program, and it should now work
MP-4 Frequently Asked Questions (FAQ)
Q: I would like to record the time between GPS updates for my PID code.
A: Your PID code can assume a constant update rate of 1. This greatly simplifies the PID code.
Q: Why is the SDK compiler giving errors when I try to use math functions such as atan, pow, sqrt?
A: You need to make sure you have included <math.h>, also you need to link to the math library to your project. Here is a link that talks about this: http://www.zedboard.org/content/problems-fpu-commands-sqrt-atan. Here is the summary: 1) right click on your application project, 2) select the C/C++ Build Settings option, 3) click on the Tool Settings tab, 4)locate the ARM Linux gcc linker-->Libraries pane, 4)add the 'm' library
Q: My quad is ARMing and responding to Bluetooth commands when I have a printf placed in my "send quad commands" loop, but if I remove the printf things stop working.
A: It appears the Zedboard can send commands to the quad faster than it can process. Try placing a usleep(10000) (i.e. about 10ms) in your send loop in order to slow the Zedboard down a little. In other words, make sure there is a delay between sending an "RC channel" message.
Q: I'm sending ARM commands to the Quad, but the Quad is not ARMing (i.e. the red light on the Quad's main board does not come on, which will often start the blades spinning, but not always).
A: There are several possible issues: 1) The channel commands are 2-bytes each, when you write each channel into your communication buffer you need to write the least significant byte first, 2) You should be continuously sending commands to the quad (faster than once per second), if you just send a single ARM command the quad will not respond, 3) Have your Roll, Pitch, AUX1, AUX2, AUX3, AUX4 set to about 1500, this is equivalent to having an RC controller stick dead-center.
Q: For the set RC channel command, the multiWii command wiki says to send 16 uint16_t values, but only shows 8 channels. I'm confused.
A: The multiWii website has a typo. Since you are only sending 8 channels, it should say send 8 uint16_t values.
Q: It's great that the GPS client will send my Zedboad X,Y,Z,Yaw information, but what is the format....
A: When your Zedboard requests GPS information from the client, the client will respond with a 16-byte buffer of data. Each X,Y,Z,Yaw value (in that order) are floats, thus each is 4-bytes long. To verify you get the byte order correct you will want to send a debug message back to the GPS client that displays the GPS values that you received.
Q: I'm initializing my UART0 correctly with XUartPs_CfgInitialize(), but when I call XUartPS_RecvByte(), I am often receiving garbage data. What am I doing wrong?
A: There are several possible issues at this stage of MP-4. 1) Check that you are initializing your pointer to the XUartPs_Config structure properly using XUartPs_LookupConfig(). 2) Either call XUartPs_SetBaudRate() or XUartPs_EnableUart(). 3) Explicitly reset the TX and RX data paths in the UART0, by setting the appropriate bits in the control register to '1'. This last part is probably a Xilinx bug, since the system reset should also reset the UARTs.
Q: After adding UART0, how can I continue to print out debug messages to PuTTy?
Q: How can I determine the Bluetooth MAC address for my quad?
Note: Quad 2 is currently the one on the stand in the back of the lab.
MP-3 Frequently Asked Questions (FAQ)
Q: How can I speed up the SLOW Linux kernel compile process?
Q: What if I encounter an error when trying to convert the device tree to a binary file?
A: Check that the xilinx.dts file does not contain any duplicate entries and try again.
Q: When trying to boot from the SD card, my output from PuTTY mentions something about xillydemo.bit and fails to load.
A: This is likely due to the misconfigured environment variables on the zedboard. After the failure message shows, you will also get an interactive terminal for the board. In this terminal, you can reset the environment variables with the command "env default -a" and save them to the boards memory with the command "saveenv". Power Cycling the board should allow the correct boot file to run.
Q: I'm sick of constantly taking out the SD card, copying over my driver, booting Linux back up, and then testing my driver. Is there a better way?
Q: I get an error saying line 1: syntax error: unexpected "(" when I run my code on a Zedboard.
A: This means that the file you compiled to run on the Zedboard was not built for the ARM architecture, probably because the cross-compilation environment was not setup. Run the setup.sh script from MP-3 to set it up, and try making the code again. To verify it built correctly, you can use "file [filename]" command on a linux server (not the Zedboard) and it should give you an output that says "[filename]: ELF 32-bit LSB Executable, ARM, Version 1".
A list of required packages for compiling the Linux kernel on an ECpE remote machine can be found here: Packages. This list was compiled by running through the lab on a new RHEL7 machine.
MP-2 Frequently Asked Questions (FAQ)
Q: How does converting from RGB to YCbCr work?
Q: What is the starting color sensor for the Bayer pattern we are applying?
Q: We're seeing multiple compile errors when creating the First Stage Boot Loader (FSBL) design. It's worked all semester long - what gives?
MP-1 Frequently Asked Questions (FAQ)
Q: How do I bind a transmitter to the quad receiver?
A: Follow this YouTube Link 
Q: How do I get my changes to my axi_ppm MPD file to be reflected in the XPS project?
Q: How do I get my changes to my axi_ppm IP core to be reflected in Vivado?
A: After packaging the IP, go back to the MP Vivado project and select Reports>Report IP Status. Your axi_ppm should report itself as obsolete and have an option to upgrade.
Q: What is the MPD file format? How do I add my external signals to the auto-generated IP core?
Q: How do I use the logic level converters?
Q: My simulation has a "component instance is not bound" error. What does this mean? Why can't I see the signals of my user_logic component?
Q: Which transmitter should I use for flight testing, and how should it be configured?
A: Note: for safety reasons, do not perform ANY flight testing without the TA or instructor present. We are using transmitter #2, also labelled as "To Quad". There are two switches of note on this transmitter. The upper-left switch is the throttle kill-switch: keep this set to "Off" (toggled forward). The upper-right switch is the trainer switch: keep this set to "Slave" (toggled forward) so that this can act as a flight test master kill switch.
MP-0 Frequently Asked Questions (FAQ)
Q: When running the vga_test application, why am I only seeing green and blue bars? Where is my red channel?
A: Your VTC timing is slightly off, leading to non-blank pixels being transmitted during the horizontal and/or vertical blanking period. See the wikipedia entry on Raster bar for an example of the effects that are possible by messing with the blanking period. Assuming you are only off by 1 pixel, the easiest solution is to tweak vga_test (and any other software application using this VGA setup) to set the first column of your 640x480 framebuffer to black.
Q: How do I get a 12-bit RGB signal? The settings in axis_vid_out seem to provide separate channels for Red, Blue, and Green, and there's no 4-bit option there.
Q: I'm not seeing anything on my VGA monitor, and I've hooked up everything correctly (as far as I can tell). What should I do next?
Q: I can't see all the signals that are being discussed in the MP-0 document. What gives?
Q: What do a correct v_sync and h_sync look like?
Q: I don't understand whether or not I need to connect signal X in component Y.
Q: This assignment is too hard!
General Software Help
Remote Linux access:
- Download and install NX Client. Note, several students have expressed a preference for the older (3.5) version of the NX Client. We have archived versions for Windows, OS X, and Linux available on the class website under the resources page.
- Connect to one of the standard remotely accessible Linux machines: ISU Remote Access Servers
Q: I type xsdk & or xps & in the terminal and nothing is appearing on the display.
A: There have been issues using the Xilinx tools on a KDE desktop environment. For best results be sure you are using GNOME. To change the environment, click configure on the NX session login prompt, then change the drop-down box under Desktop to say GNOME.
Q: The setup.sh script is erroring when run saying either if: Expression Syntax or ZED_SETUP not defined.
A: You are running the wrong shell on your terminal. Type bash , then rerun the script.
Hardware Design Help
EDK User Guide