Configuring SF2-DEV-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. 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 Linux SmartFusion2 BSP Guide for the Microsemi SF2-DEV-KIT Board.
  2. Connecting a serial console terminal application to the SF2-DEV-KIT console:
    • Connect and power up the SF2-DEV-KIT.
    • Download and install PuTTY (a free serial and networking terminal application).
    • If you are using USB serial on the host and unable to identify the serial port number, 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 serial port.
    • Push Open, an empty window will appear:
    • Push the reset button on the SF2-DEV-KIT. If your SF2-DEV-KIT 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 17 2013 - 16:09:15)

      CPU : SmartFusion®2 SoC (Cortex-M3 Hard IP)
      Freqs: CORTEX-M3=166MHz,PCLK0=83MHz,PCLK1=83MHz
      Board: SF2-DEV-KIT Rev 1.0, Microsemi
      DRAM: 256 MB
      In: serial
      Out: serial
      Err: serial
      Hit any key to stop autoboot: 0
      SF2-DEV-KIT>

      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 SF2-DEV-KIT.

  3. Installing U-Boot to the SF2-DEV-KIT.
    • Install the Microsemi FlashPro (usually comes bundled with Libero® SoC, also available for standalone download).
    • Download the .stp image.
    • Attach the FlashPro JTAG programmer to the development host and to the SF2-DEV-KIT J59 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 SF2-DEV-KIT 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 SF2-DEV-KIT, you will need the capabilities of your local network and the TFTP server.

    • Connect the Ethernet cable to the SF2-DEV-KIT 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):

    SF2-DEV-KIT> setenv ipaddr 172.17.4.129
    SF2-DEV-KIT> setenv serverip 172.17.0.41
    SF2-DEV-KIT> saveenv

    Check that the connection to the TFTP server works:

    SF2-DEV-KIT> 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)
    SF2-DEV-KIT>

    Note: If your are having trouble with TFTP transfer, please check that the networking setup in U-Boot (IP address of the SF2-DEV-KIT 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 SF2-DEV-KIT.