User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
ee:hydrophones:start [2018/01/24 19:55]
Ryan Summers
ee:hydrophones:start [2018/01/24 20:12]
Ryan Summers
Line 57: Line 57:
  
 ===== Getting Started ===== ===== Getting Started =====
 +This section is designed to help a developer get started updating and programming the HydroZynq.
 +
 +
 === Code === === Code ===
-=== Programming ===+All software and firmware is available in [[https://​github.com/​PalouseRobosub/​hydro-zynq|the GitHub repository]]. There are two primary directories:​ hardware and software. The hardware folder contains all the Verilog and TCL files for interracting with Vivado. TCL scripts have been generated to rebuild the block design in vivado, and a README.txt file in proj/ describes how to use them. Additionally,​ the IO constraints file is provided for the current hardware. 
 + 
 +The software folder contains all C source code used in programming the HydroZynq. An ELF file can be created by using the `mk` script supplied with the source file name.  
 + 
 +Example: 
 +  ./mk app/​main_bin.c 
 + 
 +All files located in src/ will be compiled against the application specified to generate the binary. Finally, a BOOT.bin file (binary image that is used for booting off the SD cared) can be created through the utilization of the '​doit'​ script.  
 + 
 +Example: 
 +  ./doit app/​main_bin.c bit/​adc_dma_revb.bit 
 + 
 +This will automatically mount and copy over the BOOT.bin to the card for the HydroZynq. This script takes in the source file name of the main application as the first argument and the bit stream file as the second parameter.  
 + 
 +**The current firmware utilizes software/​bit/​adc_dma_revb.bit as the bitstream file.** 
 + 
 +=== Programming ​& Debugging ​=== 
 +Programming and debugging can be completed through creation of new BOOT.bin files on the SD card, but this is often extremely inefficient. The [[https://​store.digilentinc.com/​jtag-hs3-programming-cable/​|Digilent HS3]] can be used as a JTAG access point for GDB debug interfaces. To interact with the HydroZynq through JTAG, use the `xmd` command (provided by Xilinx). 
 + 
 +After executing xmd from the command line, you will enter a shell-like environment. To connect to the ARM core for programming,​ enter: 
 +  > connect_arm_hw 
 +   
 +Once connected, if you desired to program the FPGA or the ARM, first stop the ARM CPU. 
 +  > stop 
 + 
 +To program a new bitstream,​ 
 +  > fpga -f [bitstream_file_path] 
 +   
 +To load a new ELF onto the CPU, 
 +  > dow [elf_file_path] 
 +   
 +Finally, the CPU can be restarted,​ 
 +  > run 
 +   
 +Once XMD has been started, a remote GDB server is automatically instantiated. To connect to the GDB server, simply use the debug.sh script located in `software/` to launch up a GDB session. 
 +  ./debug.sh
 === Communicating === === Communicating ===