The purpose of this lab is to upload a example application from the SDK to the hardware through a JTAG connection (This part is similar to the laboratory number two from first module). Additionally we will get familiar with software debugging.
1. Configure the SoC PL with bitstream
At the beginning we need to configure a hardware and set proper boot mode. We need to enable JTAG boot. We need to enable JTAG boot. It could be done by setting dip switch to position J. Here is picture of this dip switch.
After that we need to connect board via USB cable to PC. On board we need to use USB with label USB JTAG/UART. On PC we need to check if JTAG/UART were properly detected. We need to check the information about USB serial port.
Now we could program FPGA by choosing following option: Xilinx Tools -> Program FPGA.
When it finish the blue LED (D3) on MiniZed should light up. In the SDK should be the message that FPGA was configured successfully.
2. Running the application
To run application please choose option Run As ->Launch on Hardware (System Debugger) from Project Explorer. After that SDK will download the Hello_World ELF to the on-chip RAM and begin executing the code.
You could see output in serial terminal:
3. Debugging an application
To run application please choose option Debug As ->Launch on Hardware (System Debugger) from Project Explorer. The code will be downloaded to the target memory. We will be switched to the Debug perspective.
In this perspective we have all debugging options like: Run Code or Step Run etc.
I have added to this example code a variable called a with its incrementation.
I have added a three breakpoint in lines 128, 131, 132. So, we could easily debug incrementation of variable.
On the top right screen we could see a current value of variables in scope. Here is output from serial console: