Configuring Starter Kit for uClinux Development |
|
Before you can work with uClinux on the M2S-FG484 SOM Starter Kit, 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:
- Powering up and connecting the serial console device:
Refer to section "Hardware Setup" in the Emcraft Systems M2S-FG484 SOM Starter Kit Guide.
- Connecting a serial console terminal application to the M2S-FG484 SOM Starter Kit console:
- Connect and power up the M2S-FG484 SOM Starter 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 M2S-FG484 SOM Starter Kit. If your Starter Kit is programmed with the U-Boot image, then you should see the U-Boot banner:
U-Boot 2010.03-cortexm-1.14.3 (Nov 04 2015 - 13:06:17) CPU : SmartFusion®2 SoC (Cortex-M3 Hard IP) Freqs: CORTEX-M3=142MHz,PCLK0=71MHz,PCLK1=71MHz Board: M2S-FG484-SOM Rev 1A, www.emcraft.com DRAM: 64 MB In: serial Out: serial Err: serial Net: M2S_MAC Hit any key to stop autoboot: 0 M2S-FG484-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-FG484 SOM Starter Kit.
- Installing U-Boot to the M2S-FG484 SOM Starter 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 M2S-FG484 SOM Starter Kit 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-FG484 SOM Starter Kit with the chosen .stp image.
- Push the reset button and observe the U-Boot banner (see above) in the PuTTY window.
- Installing the TFTP server.
To load uClinux images to M2S-FG484 SOM Starter Kit, you will need the capabilities of your local network and the TFTP server.
- Connect the Ethernet cable to the M2S-FG484 SOM Starter 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).
- Booting the uClinux image.
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-FG484-SOM> setenv ipaddr 172.17.4.129 M2S-FG484-SOM> setenv serverip 172.17.0.41 M2S-FG484-SOM> saveenv
Check that the connection to the TFTP server works:
M2S-FG484-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-FG484-SOM>
Note: If your are having trouble with TFTP transfer, please check that the networking setup in U-Boot (IP address of the M2S-FG484 SOM Starter 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 M2S-FG484 SOM Starter Kit.
|