Main Content

Command Line Session with AMD SoC Devices

You can configure and open a command-line session with the hardware.

You can use this optional procedure to:

If you have multiple AMD® Zynq® boards connected to your host computer, disconnect the ones you are not using.

Identify COM Port

Determine the COM port number, assigned to the USB UART connection of AMD SoC device by the development computer:

  1. In Windows®, open Devices and Printers.

  2. Locate the USB device that connects to the AMD SoC device, such as Cypress Serial or Silicon Labs CP210x USB to UART Bridge. The device name includes the port number.

Open Serial Connection

Open a serial connection to the device using a terminal software, such as PuTTy:

  1. In the PuTTy configuration window, select the Serial category.

    Use the PuTTY Configuration dialog box to configure the connection.

  2. Enter the following values:

    • Serial line to connect to: Enter the COM port number.

    • Speed: 115200

    • Flow control: None

  3. Select the Session category.

    Use the PuTTY Configuration dialog box to configure the connection.

  4. In Connection type, select Serial.

  5. In Saved Sessions, enter a new name, such as Serial.

  6. Click Save, and then click Open.

  7. When a terminal window opens, press the Enter key on your keyboard. The terminal window displays a Linux® command prompt.

    The terminal window displays a Linux command prompt.

Get Platform IP Address

To get the AMD SoC device IP address using the Linux command line:

  1. At the Linux command line, enter: ifconfig

  2. Locate the eth0 device, and get the value of inet addr from the command-line output. For example:

    zynq> ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:0A:35:00:01:22
              inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:26581 errors:5 dropped:0 overruns:0 frame:0
              TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:2953666 (2.8 MiB)  TX bytes:11772 (11.4 KiB)
              Interrupt:54 Base address:0xb000
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  3. To confirm the connection to the platform, see Sending PING Request to AMD SoC Device.

  4. When you are finished, close the terminal window.

    Note

    Leaving the terminal session open prevents the build process from connecting to the AMD SoC device and produces a build error.

Open SSH Connection

Open an SSH connection to the platform using a terminal software, such as PuTTy:

  1. To configure the PuTTy for SSH connection, select Session.

    Use the PuTTY Configuration dialog box to configure the connection.

  2. Enter the following values:

    • Host Name (or IP address): Enter the inet addr of the device.

    • Port: 22

  3. For Saved Sessions, enter a new name, such as SSH.

  4. Click Save, then Open.

  5. When a terminal window opens, login as the user root with password root.

    The terminal window displays a Linux terminal.

  6. Close the terminal session.

    Note

    Leaving the terminal session open prevents the build process from connecting to the AMD SoC device and produces a build error.

  7. At the MATLAB® Command prompt, create a hardware object by specifying all the optional arguments:

    h = zynq('linux', '192.168.1.101', 'root', 'root', '/tmp')
    h =  
    
      LinuxShell with properties: 
    
        IPAddress: '192.168.1.101' 
         Username: 'root'  
             Port: 22

See Also

|

Related Topics

External Websites