Running a SoftConsole "Hello, World!" Project on the SmartFusion Starter Kit Print


This application note explains how to use the Libero SoC and SoftConsole software to develop a simple application on the SmartFusion Starter Kit. The application is a "Hello, world" demo that uses GPIO to blink the on-board LEDs.

Hardware Platform

The hardware platform is Emcraft Systems' SmartFusion system-on-module (SOM) plugged into the SOM-BSB baseboard (SmartFusion Starter Kit).

The demo described in this application note assumes that the mini-USB cable is plugged into the P1 mini-USB connector on the SOM-BSB board (to provide power and serial console) and the FlashPro4 (or FlashPro3) JTAG programmer is connected to the development host and to the P5 connector on the SOM-BSB board.

The serial connection may require the FT232R USB drivers to be installed to the development host.

Also, please open the serial console window on the USB-Serial console port using any terminal application (HyperTerm, PuTTY, etc.) with the 115200,8N1 parameters.

Installing the Software on the Development Host

For this application note we use SoftConsole and Libero software running on a Windows development host.

  1. Download and install the following components:
    • Libero SoC v10.1 SP2
    • SoftConsole 3.3
    • Firmware catalog
  2. Download the .zip version of the A2F-SOM Libero project and open the A2S-SOM project in Libero, update IP cores if asked.
  3. To be able to develop your firmware using SoftConsole, you need a special version of the A2F-SOM firmware programmed to the A2F-SOM.
  4. Note: To run uClinux on A2F-SOM, you'll need to re-program it with the release version of the design <.pdb> file.

  5. Program the .pdb design into A2F-SOM using the FlashPro v10.1 (FlashPro is a part of the Libero installation):
    1. Start FlashPro on a Windows host.
    2. From the FlashPro IDE, create a new project with an arbitrary name.
    3. From the main FlashPro window, push Configure Device.
    4. Push Browse next to load existing programming file.
    5. Browse to the Linux SmartFusion2 project .pdb file and choose it.
    6. Power reset the board after the successful programming.

Running and Debugging the Project

  1. Being connected to the A2F-SOM serial console with a terminal application, stop at U-Boot prompt by pushing the Reset button on the SOM-BSB baseboard, then hit any key in the console window:

    U-Boot 2010.03-linux-cortexm-1.9.0 (Dec 06 2012 - 16:15:01)

    CPU : SmartFusion FPGA (Cortex-M3 Hard IP)
    Freqs: FCLK=80MHz,PCLK0=20MHz,PCLK1=20MHz,ACE=40MHz,FPGA=40MHz
    Board: A2F-SOM Rev 1.A,
    DRAM: 16 MB
    Flash: 16 MB
    In: serial
    Out: serial
    Err: serial
    Net: Core10/100
    Hit any key to stop autoboot: 0

  2. In the Libero Design Flow view, launch the Write Application Code action. SoftConsole will start with the sample project workspace with two projects opened.

  3. Start debugging the prebuilt application. Open the Debug Configurations menu and select MSS_CORE_MSS_CM3_0_app Debug. Confirm the Perspective Launch dialog.
  4. The program will be loaded to the target SRAM and stopped on the first breakpoint at main(). Step over (F6) and into the functions (F5), examine variables (just point the mouse over the variable), and so on.
  5. Resume the program run with F8 ("green triangle" in the Debug window). Observe the Hello, SmartFusion2 on the console and two LEDs blinking.

Modifying the Libero and SoftConsole Projects

To modify the Libero project, rebuild and rerun the application in SoftConsole:

  1. Terminate the program with Ctrl-F2 ("red square") and switch back to the C/C++ Editor perspective. Don't leave SoftConsole.
  2. In Libero, open the Design -> Configure Firmware tab. Let's add a new software driver to our SoftConsole project. Add a checkbox to the MSS_NVM_Driver_0. Re-generate SoftConsole workspace (yellow barrel with gear in the middle of the Libero window).

  3. Now switch to SoftConsole and observe that the mss_nvm firmware appears in the tree of the MSS_CORE_MSS_CM3_0_hw_platform project (in the drivers/ directory).
  4. Rebuild the project: Project -> Clean, select Clean all projects and Start the build immediately.
  5. Re-run the debug session of the project.