Configuring the SmartFusion2 Starter Kit for uClinux Development Print

 

Before you can work with uClinux on the SmartFusion2, you need to have a firmware bootloader called "U-Boot" installed in the on-chip non-volatile memory. Your SOM comes pre-loaded with U-Boot, but it may have been erased if you loaded other demonstration software on your system. Also, to load Linux and root filesystem images you will need to set up a TFTP server on your PC or in the local network. To load U-Boot and to set up a TFTP server, please see the steps below:

  1. Powering up and connecting the serial console device:
    Refer to section "Hardware Setup" in the Emcraft Systems SmartFusion2 SOM Starter Kit Guide.
  2. Connecting a serial console terminal application to the M2S-SOM console:
    • For a Windows development host, install the drivers.
    • Connect and power up the M2S-SOM.
    • Download and install PuTTY (a free serial and networking terminal application).
    • Open Control Panel -> System -> Hardware -> Device Manager. Extend the Ports (COM & LPT) item and note the name of the USB serial port. If you don't have the USB serial ports listed, the drivers were not probably installed correctly. Please solve this problem before proceeding.
    • Open the PuTTy window, select Connection type - Serial, Speed - 115200, Serial line - name of the USB Serial port.
    • Push Open, an empty window will appear:
    •  

    • Push the reset button on the SOM-BSB-EXT. If your M2S-SOM is programmed with the U-Boot image, then you should see the U-Boot banner:
    • U-Boot 2010.03-linux-cortexm-1.10.0 (May 15 2013 - 20:57:08)

      CPU : SmartFusion2 SoC (Cortex-M3 Hard IP)
      Freqs: CORTEX-M3=166MHz,PCLK0=83MHz,PCLK1=83MHz
      Board: M2S-SOM Rev 2A, www.emcraft.com
      DRAM: 64 MB
      In: serial
      Out: serial
      Err: serial
      Net: M2S_MAC
      Hit any key to stop autoboot: 0
      M2S-SOM>


      To verify the serial console is working, please stop at the U-Boot prompt by pushing any key. If needed, hit the reset to restart U-Boot.

    If there is no activity on the PuTTY window, or something else is printed out, then you should install the .stp image with U-Boot to the M2S-SOM.

  3. Installing U-Boot to the M2S-SOM.
    • Install the Libero SoC v11.1.
    • Download the .stp image corresponding to the hardware revision of you M2S-SOM.
    • Attach the FlashPro JTAG programmer to the development host and to the SOM-BSB-EXT P5 connector.
    • Start the FlashPro application.
    • From the FlashPro IDE, create a new project with an arbitrary name.
    • From the main FlashPro window, push Configure Device.
    • Push Browse next to load an existing programming file.
    • Browse to the Linux SmartFusion2 project .stp file and choose it.
    • Push Program to start programming the M2S-SOM with the chosen .stp image.
    • Push the reset button and observe the U-Boot banner (see above) in the PuTTY window.
  4. Installing the TFTP server.

    To load uClinux images to M2S-SOM, you will need the capabilities of your local network and the TFTP server.

    • Connect the Ethernet cable to the M2S-SOM and to a network switch or to your PC.
    • Install the TFTP server and start it. Unblock the application if the Windows firewall asks for permission.
    •  

    • Put the uClinux image (networking.uImage) you want to load to the TFTP server stage directory (C:\Program Files\Tftpd32 by default).
  5. Booting the uClinux image.
  6. To boot the image, you first need to set up networking in U-Boot. Generally, you need to set the following U-Boot environment variables as in the example below (the actual addresses must match your local network configuration):

    M2S-SOM> setenv ipaddr 172.17.4.129
    M2S-SOM> setenv serverip 172.17.0.41
    M2S-SOM> saveenv

    Check that the connection to the TFTP server works:

    M2S-SOM> tftp networking.uImage
    Link is UP.
    Using M2S_MAC device
    TFTP from server 172.17.0.41; our IP address is 172.17.4.129
    Filename 'networking.uImage'.
    Load address: 0xa0007fc0
    Loading: #################################################################
    #################################################################
    #################################################################
    ###########################
    done
    Bytes transferred = 3256224 (31afa0 hex)
    M2S-SOM>

    Note:If your are having trouble with TFTP transfer, please check that the networking setup in U-Boot (IP address of the M2S-SOM and the TFTP server, subnet mask) matches your local network settings.
    If this doesn't help, try to enable the PXE Compatibility checkbox in the Tftpd32 Settings menu, TFTP tab.

Now, you are ready for development in the uClinux environment and loading of images to the M2S-SOM.