Digilent Arty board and Linux - Part 4 - Synthesize, Load and Run

Well, at this point we have generated the FPGA system, we obtained the Linux kernel image using the the Device Tree of our hardware, it is time to synthesize the system on the FPGA, load Linux and run!

The whole process is going to be done from the SDK (Eclipse), so open the Xilinx Vivado Suite, and then open the Xilinx SDK.
The last thing we did here is to create the Device Tree but now we do not want to modify it so Close the device_tree_bsp_0 clicking right over it and closing the project.

Connect the Arty board to your computer and locate the virtual COM port that has been created. The JTAG commands go over the same USB physical connection but two devices are created, the JTAG Debug Port and the virtual COM, separately, so we can from now open the COM port from Putty or similar, at 115200 baud.

  • In the SDK, go to Xilinx Tools > Program FPGA. As we exported the SDK including bitstream, the hardware system wrapper is here configured. Click on Program and wait until the process finishes.

    At this time, the FPGA is configured and Microblaze is running nothing.

  • Copy your created Linux image to the .sdk project subfolder.
     
  • In the SDK now go to Xilinx Tools > XMD console. The XMD console allows us to connect with the microblaze and perform actions like stop the processor, restart it or copy data to Flash or RAM through JTAG. This is just what we will do, to copy our Linux image to RAM.
     
  • To connect with the target, into the XMD console window type
    connect mb mdm 

    the processor information should appear: 

    WARNING: Processor Version 0x23 - UnSupported Version, New Features May Not Work
     
     
    JTAG chain configuration
    --------------------------------------------------
    Device   ID Code        IR Length    Part Name
     1       0362d093           6        xc7a35t
     
    MicroBlaze Processor Configuration :
    -------------------------------------
    Version............................0x23 - UnSupported Version
    Optimization.......................Performance
    Interconnect.......................AXI-LE
    MMU Type...........................Full_MMU
    No of PC Breakpoints...............1
    No of Read Addr/Data Watchpoints...0
    No of Write Addr/Data Watchpoints..0
    Instruction Cache Support..........on
    Instruction Cache Base Address.....0x80000000
    Instruction Cache High Address.....0x8fffffff
    Data Cache Support.................on
    Data Cache Base Address............0x80000000
    Data Cache High Address............0x8fffffff
    Exceptions  Support................on
    FPU  Support.......................off
    Hard Divider Support...............on
    Hard Multiplier Support............on - (Mul64)
    Barrel Shifter Support.............on
    MSR clr/set Instruction Support....on
    Compare Instruction Support........on
    PVR Supported......................on
    PVR Configuration Type.............Full
    Data Cache Write-back Support......off
    Fault Tolerance Support............off
    Stack Protection Support...........off
     
    Connected to "mb" target. id = 0
    Starting GDB server for "mb" target (id = 0) at TCP port no 1234

  • Now find  your Linux image by typing "dir" and moving into directories using "cd directory" or "cd .."
     
  • Once located, type the following command, with your image name
    dow simpleImage.artylinux
  • After finishing the download, the processor keeps stopped. To run the uploaded image simply type
    con 0x80000000

Now you should see the linux booting on your previously opened terminal!!

As configured in our kernel compilation, the user is root and the password is password.

 

Setting up the Ethernet

Once logged in you can set up the ethernet port to be connected to the internet. Firstly we need to assign the device MAC address by typing the following sentence

ifconfig eth0 hw ether 00:11:22:33:44:55

And edit the /etc/network/interfaces file to include the eth0, keeping as follows

#interface file auto-generated by buildroot

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
# Comment avobe an uncomment below to set static IP
# iface eth0 inet static
#  address 192.168.1.125
#  netmask 255.255.255.0
#  gateway 192.168.1.1

 Finally it is time to turn on the ethernet link

ifup eth0

 Done!

 

Take into account that all this process has been done entirely on RAM, when you shutdown the board you loose all the image and any change you did. We will need to upload the image to the Flash memory

 

Syndicate content