4.4.1 Data Storage in eNVM Using the Libero eNVM Client

The Libero eNVM client creates the eNVM data that the FlashPro software uses to initialize the eNVM during programming. The programmed eNVM can be accessed by the Cortex-M3 processor, High Performance Direct Memory Access (HPDMA), Peripheral Direct Memory Access (PDMA), or the FPGA fabric master connected to the AHB bus matrix.

The following figure shows the initial System Builder window where the required device features can be selected. For more information on how to launch the System Builder and how to use it, see SmartFusion2 System Builder User Guide.

Figure 4-23. System Builder Window

The following steps describe how to generate a programming file with the eNVM client in an application using System Builder.

  1. Check the MSS On-chip Flash Memory (eNVM) check box under the Device Features tab and leave the other check boxes unchecked. The following figure shows the System Builder > Device Features tab.
  2. Figure 4-24. System Builder - Device Features Tab
  3. Click Next to navigate to the Memories tab. The following figure shows the System Builder > Memories tab.
  4. Figure 4-25. System Builder - Memories Tab
  5. Select Data Storage under Available Client Types and click Add to System.

    The following figure shows the Add Data Storage Client dialog box. It supports the following file formats:

    • Intel-Hex
    • Motorola-S
    • Microsemi-Hex
    • Microsemi-Binary
      1. Create the memory file in any one of the above formats with the executable code or data. Memory file can be created for the code using the SoftConsole v3.4 or later with the linker script production-execute-in-place.ld. For more information on using the SoftConsole, see SoftConsole Documentation.
      2. Enter the Client name, navigate to the Memory file location, and select it. Give the rest of the parameters according to the requirements and click OK to add the eNVM client. For more information on Use absolute addressing, Use as ROM, and other options, click Help.

    The following figure shows the Add Data Storage Client Dialog box.

    Figure 4-26. Add Data Storage Client Dialog

    The eNVM client data is populated in the System Builder > Memories tab. The following figure shows the System Builder > Memories tab with two eNVM clients.

    Figure 4-27. System Builder - Memories Tab with Two eNVM Clients
  6. Navigate to the Microcontroller tab in the System Builder and select AHB Bus Matrix to confirm the remapping of eNVM to the Cortex-M3 code space. eNVM is remapped to the Cortex-M3 code space, by default. For more information on eNVM Remap Region Size and Base Address, click Help and select AHB Bus Matrix to access the help document, as shown in the following figure. See AC390: SmartFusion2 SoC FPGA – Remapping eNVM, eSRAM, and DDR/SDR SDRAM Memories Application Note.
    Figure 4-28. System Builder - Microcontroller Tab
    Important:
    • The code executing from eNVM can program the other regions of eNVM memory. Ensure that the code executing region is not overwritten.
    • Configure “eNVM Remap Region Size” and “eNVM Remap Base Address (Cortex-M3)” such that the end address of the eNVM remap region is less than 0x00040000. The end address is obtained by adding the eNVM Remap Region Size to the eNVM Remap Base Address. This is applicable to SmartFusion 2 M2S090 and M2S150 devices only.
    • If the user design is using the FPGA fabric based master, the Cortex-M3 processor requires a valid program in eNVM (from eNVM start address 0x60000000) to execute at power-up or Power-on Reset. The valid program can be a simple user boot code or a simple loop program. You can select a .hex file of a valid program for eNVM data client using the System Builder.

      The read and write permission options for different masters are available for data and design security enabled devices like M2S050TS only.

      For more information on configuring the security options, see SmartFusion2 MSS Security Configuration User Guide.

  7. Navigate to the Security tab to select the read and write access permissions of eNVM including protected regions for different masters, as shown in the following figure.
    Figure 4-29. System Builder - Security Tab
  8. Navigate to the Memory Map tab giving the required data in the rest of the System Builder tabs and click Finish to proceed with creating the MSS Subsystem.
  9. Do required Pin connections and Save the project. Generate the SmartDesign in Libero by clicking Generate Component.
  10. Double click Run PROGRAM Action in the Libero Design Flow window to program the SmartFusion 2 device to initialize the eNVM with the memory file.
Important: