AN 693: Remote Hardware Debugging over TCP/IP for Altera SoC

ID 723698
Date 5/11/2015
Public

1.6.1. Example Implementation of Remote Debugging on an Altera SoC (5CSXSoC)

Requirements:
  • microSD card for the Linux image
  • USB cables
  • Cyclone V SoC golden hardware reference design (GHRD)
  • Linux drivers
  • Setup Tcl script
  1. Start Linux on the Altera SoC.
  2. Get the USB serial UART cable and driver.
    1. Connect by serial to the board using PuTTY and selecting serial and the correct COM number with speed 57600.
    2. Press Enter and login as root.
      If the above fails, double-check that the serial driver is in the Device Manager.
      If you are sure the failure is not due to a configuration issue, then the Linux kernel might not be on the SD card.
  3. After you get a connection via serial, get the board's IP with >>ifconfig
  4. Add the SLD Hub Controller from the GHRD.1
    Figure 6. SLD Hub Controller in GHRD


  5. Generate in Qsys.
  6. Compile the design.
  7. Program the board with the GHRD .sof.
  8. Transfer the sld_hub.ko driver to the board via SFTP.
  9. Transfer the mmlink user application to the board via SFTP.
    Figure 7. mmlink Application


  10. Run the SLD Hub Controller Linux driver and mmlink application.
    >>insmod sld_hub.ko
    >>./mmlink
  11. Use System Console to connect to the board.
    >>system-console-jtag_server--rc_script=mmlink_setup.tcl<design>.sof<ip>3333
    Figure 8. Connect with System Console


  12. Open the SignalTap II Logic Analyzer and select SystemConsole on localhost:xxxx under Hardware and Sld Hub Controller System under Device.
    Figure 9. Selecting Hardware and Device


  13. Run analysis and view the waveforms.
Figure 10. Altera SoC Successfully Connected


Note: The SLD Hub Controller driver (sld_hub.ko) is compatible with Linux kernel 3.8.0-00069-g54902df-dirty.
1 The SLD Hub Controller Avalon Memory Mapped Slave connects to h2f AXI Master (HPS).