Login

Why register?

  • Download software and technical materials
  • Purchase products at our on-line shop
  • Receive design news to stay up-to-date with Emcraft's new solutions

 

 

Running a SoftConsole "Hello, World!" Project on the M2S-FG484 Starter Kit Print

 

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


Hardware Platform

The hardware platform is Emcraft Systems' M2S-FG484 system-on-module (SOM) plugged into the SOM-BSB-EXT baseboard.

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-EXT 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-EXT 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. Install the Emcraft project at C:\Actleprj\.
  2. Download and install Libero SoC v11.6 here. Select the following components during installation:
    • Synplify Pro
    • ModelSim AE with SmartFusion and SmartFusion2
  3. Download and install SoftConsole 4.x from the above location.
  4. Download the .zip version of the M2S-FG484 SOM Libero project and open the M2S-FG484 SOM project in Libero, update IP cores if asked.
  5. Download the prebuilt M2S-FG484 SOM firmware design .stp file.
  6. Program the .stp design into M2S-FG484 SOM using the FlashPro, which 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 .stp file and choose it.
    6. Power reset the board after the successful programming.

Running and Debugging the Project

  1. Start SoftConsole 4.x and select the SoftConsole folder inside the Emcraft Libero project as the SoftConsole workspace:
  2. Clean up the project by running Project -> Clean.
  3. Rebuild the project by running Project -> Build all.
  4. Start debugging the application. Select Run -> Debug Configurations. Open the Debugger tab to the right and check that your M2S-FG484 SOM model matches the --command argument, change to the correct value is necessary.
  5. Click Debug, confirm Open Debug perspective dialogue:
  6. The program will be loaded to the target eNVM and stopped on the first breakpoint at main(). Single-step over the program, observe the variables changes.
  7. 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 SmartFusion2_MSS_NVM_Driver_0.
  3. Run Export Firmware. Do not put checkbox on Create project for selected Software Tool Chain:

    Confirm overwriting the firmware directory.
  4. Now, in the Windows Explorer, update all files in the SoftConsole\g4m_system_MSS_CM3_hw_platform\ directory with the files from the firmware directory:
  5. Edit SoftConsole\g4m_system_MSS_CM3_hw_platform\drivers_config\sys_config\sys_config.h and make sure that MSS_SYS_MDDR_CONFIG_BY_CORTEX is defined as 0.
    This is needed because Libero re-generated firmware files and unconditionally enabled initialization of the LPDDR memory by the DDR module firmware.
    This initialization is incompatible with the memory used on the M2S-FG484 SOM (the demo application uses the correct LPDDR initialization code in config_mddr_lpddr()).
  6. Clean and rebuild the project in SoftConsole.
  7. Re-run the debug session of the project.