Creating a Libero Project for Firmware Catalog Sample Project Su pe rs ed ed Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 Creating a Libero Project for Firmware Catalog Sample Project Table of Contents Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Tutorial Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Associated Project Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Target Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 ed ed Design Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step 1: Downloading SoftConsole Project from Firmware Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Step 2: Creating a Libero SoC Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Launching Libero SoC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Instantiating Clock Conditioning Circuitry (CCC) and Chip Oscillators in Sysservices SmartDesign . . . . . . . . . . . . . . . . . . 14 Connecting Components in Sysservices SmartDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Configuring and Generating Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 rs Step 3: Generating the Program File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 4: Programming the SmartFusion2 Board Using FlashPro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 5: Building the Software Application using SoftConsole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix 1: Jumper Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix 2: Board Setup for Running the Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix 3: Readme File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix 4: main.c File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 23 24 34 35 36 37 38 Product Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 pe Customer Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Customer Technical Support Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Contacting the Customer Technical Support Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 43 43 43 43 Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 My Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Outside the U.S. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Su ITAR Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Revision 1 2 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 Introduction ed ed Libero® System-on-Chip (SoC) Firmware catalog shows a list of available firmware cores. Sample projects for each firmware core can be generated from Firmware catalog. A sample project is an example of how the firmware core can be integrated in a project. This sample project contains firmware project using SoftConsole, IAR workbench, and Keil tools. But a sample project does not have a Libero project for that generated firmware project. Each sample project folder contains a Readme text file which gives an overview of the design and hardware requirements. Using this information, the Libero SoC project can be generated. This tutorial describes downloading the SoftConsole sample project from Firmware catalog and creating a Libero SoC hardware design for the downloaded sample project. This tutorial provides an example design for System Services. Upon completion of this tutorial, you will be familiar with the following: Downloading SoftConsole sample project from Firmware catalog • Creating a Libero SoC project • Generating the programming file • Opening the project in SoftConsole • Creating and launching a debug session • Running the System Services application Su pe rs • Revision 1 3 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 Tutorial Requirements Table 1 • Reference Design Requirements and Details Reference Design Requirements and Details Description Hardware Requirements Rev C or later SmartFusion2 Development Kit • FlashPro4 programmer • USB A to Mini-B cable • 12 V Adapter Any Windows 64-Bit Operating System Software Requirements Libero SoC ed ed Host PC or Laptop 11.3 • SoftConsole v3.4 • FlashPro programming software v11.3 Host PC Drivers USB to UART drivers - Any one of the following serial terminal emulation programs: HyperTerminal • TeraTerm • PuTTY rs • Associated Project Files The design files for this tutorial can be downloaded from the Microsemi® website: http://soc.microsemi.com/download/rsc/?f=SF2_SYS_SERVICES_Tutorial_DF pe The design files include: • Libero project • Programming files • Readme file Refer to the Readme.txt file provided in the design files for the complete directory structure. Su Target Board SmartFusion2 Development Kit Board (SF2_DEV_KIT) Rev C or later. Design Overview This tutorial demonstrates the following Device and Design Information services: • Serial Number Service: Fetches the 128-bit device serial number (DSN) and is set during manufacturing. • USERCODE Service: Fetches the programmed 32-bit JTAG USERCODE. • User Design Version Service: Fetches the 16-bit user design version. • NVM Data Integrity Check Service: Recalculates and compares cryptographic digests of the selected NVM component(s)—fabric, eNVM0, and eNVM1—to those previously computed and saved in NVM. Note: In this tutorial only fabric digest check is demonstrated. System Services Information is displayed on HyperTerminal using MMUART_0 interface. 4 R e vi s i o n 1 Creating a Libero Project for Firmware Catalog Sample Project For more information on System Services, refer to SmartFusion2 System Controller User Guide. Step 1: Downloading SoftConsole Project from Firmware Catalog Figure 1 • pe rs ed ed 1. Click Start > Programs > Microsemi SoC Libero SoC 11.3 > Firmware Catalog v11.3 > Firmware Catalog. Right-click on SmartFusion2 MSS System Services Driver and select Generate Sample Project > Cortex-M3 > SoftConsole > Read Version Information as shown in Figure 1. Downloading Sample Project from Firmware Catalog Note: Select latest version of SmartFusion2 MSS System Services driver. Su Generate Sample Options window is displayed as shown in Figure 2. Figure 2 • Generate Sample Options Window 2. Browse to a location to save System Services Read Version Information SoftConsole Project. Revision 1 5 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 3. Open Readme file provided in the SF2_GNU_SysSer_read_version project folder. Readme file gives target hardware information. Refer to "Appendix 3: Readme File" on page 37 for the Readme file. Step 2: Creating a Libero SoC Project This step helps you create a SmartFusion2 System Services design using the Libero tool. Launching Libero SoC 1. Click Start > Programs > Microsemi Libero SoC v11.3 > Libero SoC v11.3, or click the shortcut on desktop to open the Libero 11.3 Project Manager. ed ed 2. Create a new project using one of the following options: Select New on the Start Page tab as shown in Figure 3. Click Project > New Project from the Libero SoC menu. Figure 3 • pe rs – – Libero SoC Project Manager Su 3. Enter the required information for the project and the device in the New Project dialog box, as shown in Figure 4 on page 7: 6 – Project Name: Sysservices – Project Location: Select an appropriate location (for example, D:/SF2_Sysservices) – Preferred HDL Type: Verilog – Family: SmartFusion2 – Die: M2S050T – Package: 896 FBGA – Speed: STD – Die Voltage: 1.2 – Operating Conditions: COM R e vi s i o n 1 Creating a Libero Project for Firmware Catalog Sample Project Su pe rs ed ed 4. Select Use Design Tool and SmartFusion2 Microcontroller Subsystem (MSS) in the Design Templates and Creators section of the New Project window as shown in Figure 4. Figure 4 • Libero New Project Dialog Box 5. Click Edit Tool Profiles to display the Tool Profiles window as shown in Figure 5 on page 8. 6. In the Tool Profiles window, verify the following tool settings and click OK: – Software IDE: SoftConsole – Synthesis: Synplify Pro ME I-2013.09M-SP1 – Simulation: ModelSim ME 10.2c Revision 1 7 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 Figure 5 • Programming: FlashPro 11.3 Tool Profiles Window ed ed – 7. Click OK on the New Project window. Su pe rs SmartDesign window with Sysservices_MSS_0 component is displayed as shown in Figure 6. Figure 6 • 8 SmartDesign Window with Sysservices_MSS_0 Component R e vi s i o n 1 Creating a Libero Project for Firmware Catalog Sample Project Figure 7 • pe rs ed ed 8. Double-click Sysservices_MSS_0 to configure the MSS. The MSS is displayed in the SmartDesign canvas in a new tab, as shown in Figure 7. MSS in the SmartDesign Canvas Su The enabled MSS blocks are highlighted in blue. The disabled peripherals are shown in gray. Revision 1 9 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 Figure 8 • Disabling a Peripheral Block ed ed 9. To disable a peripheral that is not required, right-click the peripheral block and clear the Disable check box, as shown in Figure 8, or clear the check box in the lower right corner of the peripheral box. The box turns gray to indicate that the peripheral has been disabled. Su pe rs 10. Disabled peripherals can be enabled by either selecting the check box in the lower right corner of the peripheral box or by right-clicking the peripheral block or selecting the Enable check box. An enabled peripheral is shown in Figure 9. Figure 9 • Enabling the Peripheral 11. Disable the following peripherals on the MSS canvas: 10 – MMUART_1 – SPI_0 and SPI_1 – I2C_0 and I2C_1 – PDMA – WATCHDOG – FIC_0 and FIC_1 – USB – Ethernet – RTC R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project – MDDR PADS – CAN – GPIO pe rs ed ed After disabling the above components, the MSS configuration window is displayed similar to Figure 10. Su Figure 10 • Enabled and Disabled MSS Components Revision 1 11 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 12. Double-click MMUART_0 and configure it as shown in Figure 11. Select Main Connection as Fabric for TXD and RXD Full Duplex MSIOs Click OK on MMUART_0 Configurator to complete the configuration rs ed ed – – Figure 11 • MMUART_0 Configurator Window 13. Double-click MSS_CCC block to configure as shown in Figure 12 on page 13: The clock input is by default selected as CLK_BASE, select CLK_BASE frequency as 50 MHz – Select the check box for Monitor FPGA Fabric PLL Lock (CLK_BASE_PLL_LOCK) – Select M3_CLK as 50 MHz pe – Select APB_0_CLK and APB_1_CLK frequency as M3_CLK/1 Leave the rest as default Su – – – Click OK on MSS Clock Configurator to complete the clock configuration The above selection configures the MSS CCC to receive the input clock from the fabric CCC. The lock input of the MSS CCC is configured to be received from the fabric CCC block. 12 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project ed ed This completes the configuration of the MSS. rs Figure 12 • MSS Clock Conditioning Circuitry Configurator Su pe 14. Select File > Save to save Sysservices_MSS. Select the Sysservices tab on the Smart Design canvas, right-click Sysservices_MSS_0, and select Update Instance(s) with Latest Component, as shown in Figure 13. Figure 13 • Updating the Sysservices_MSS_0 Revision 1 13 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 After successfully updating, the Sysservices_MSS_0 instance displays similar to Figure 14. Figure 14 • Updated Sysservices_MSS_0 ed ed Instantiating Clock Conditioning Circuitry (CCC) and Chip Oscillators in Sysservices SmartDesign The Libero SoC catalog provides IP cores that can be easily dragged and dropped into the SmartCanvas workspace. Many of these IPs are free to use while several require a license agreement. pe rs 1. Click on the Catalog tab and drag and drop the Clock Conditioning Circuitry (CCC) and Chip Oscillators block from the Clock and Management sub-section of the IP Catalog into Sysservices SmartDesign window as shown in Figure 15. Figure 15 • Catalog Window Su 2. Double click FCCC_0 to configure it. Figure 16 on page 15 shows the FAB CCC Configurator window. 14 – Select Reference Clock as 50 MHz and 25/50 MHz Oscillator from the drop-down list. – Select GL0 Frequency as 50 MHz. – Click OK to complete the configuration. R e visio n 1 pe rs ed ed Creating a Libero Project for Firmware Catalog Sample Project Su Figure 16 • FAB CCC Configurator 3. Double-click the OSC_0 instance to open its Configuration window. Make the following selections, as shown in Figure 17 on page 16: – Select the check box for On Chip 25/50 MHz RC Oscillator – Select the check box for Drives Fabric CCC(s) – Leave the rest as default – Click OK to complete the configuration Revision 1 15 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 rs Figure 17 • Chip Oscillator Configurator ed ed On-chip 50 MHz RC oscillator drives the input of the fabric CCC block instantiated earlier. Connecting Components in Sysservices SmartDesign There are three methods for connecting components in Sysservices SmartDesign: The first method is by using the Connection Mode option. To use this method, change the SmartDesign to connection mode by clicking the Connection Mode button on the SmartDesign window, as shown in Figure 18 on page 17. The cursor changes from the normal arrow shape to the connection mode icon shape. To make a connection in this mode, click on the first pin and drag-drop to the second pin that you want to connect. • The second method is by selecting the pins to be connected together and selecting Connect from the context menu. To select multiple pins to be connected together, hold the CTRL key while selecting the pins. Right-click the input source signal and select Connect to connect all the signals together. In the same way, select the input source signal, right-click it, and select Disconnect to disconnect the signals that are already connected. Su pe • • 16 The third method is by using the Quick Connect option. To use this method, change the SmartDesign to quick connect mode by clicking on Quick Connect mode on the SmartDesign window, as shown in Figure 18 on page 17. Quick connect window will be opened. Find the Instance Pin you want to connect and click to select it. In Pins to Connect, find the pin you wish to connect, right-click and choose Connect as shown in Figure 19 on page 18. R e visio n 1 rs ed ed Creating a Libero Project for Firmware Catalog Sample Project Su pe Figure 18 • Sysservices SmartDesign Revision 1 17 Su pe rs Figure 19 • Quick Connect Window ed ed Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 18 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project Use one of the three options described above and make the following connections: 1. Connect ROSC_25_50MHZ_CCC_OUT of OSC_0 to ROSC_25_50MHZ_CCC_IN of FCCC_0. 2. Connect GL0 of FCCC_0 to MCCC_CLK_BASE of Sysservices_MSS_0. 3. Connect LOCK of FCCC_0 to MCCC_CLK_BASE_PLL_LOCK input of Sysservices_MSS_0. 4. Right-click the MMUART_0_FABRIC of Sysservices_MSS_0 and select Promote to Top Level. Figure 20 • Sysservices SmartDesign ed ed 5. Click Auto Arrange Instances to arrange the instances and click File > Save. Libero top-level design is displayed as shown in Figure 20. Configuring and Generating Firmware pe rs 1. Click Design > Configure Firmware in Libero SoC to open the DESIGN_FIRMWARE window, as shown in Figure 21. Su Figure 21 • Opening DESGIN_FIRMWARE Window Revision 1 19 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 2. Clear all drivers except CMSIS, MMUART_0 and System Services as shown in Figure 22. Figure 22 • DESIGN_FIRMWARE Window ed ed Note: SoftConsole sample project for System Services driver can also be downloaded from DESIGN_FIRMWARE window. Right-click SmartFusion2_MSS_System_Services_Driver_0. Select Read Version Information. Su pe rs 3. Select Sysservices tab on the SmartDesign canvas and click Generate Component as shown in Figure 23. Figure 23 • Generate Component After successful generation of all the components, the following message is displayed on the log window, as shown in Figure 24 on page 21. Info: 'Sysservices' was generated. Libero also generates the SoftConsole software project. 20 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project Figure 24 • Log Window ed ed Step 3: Generating the Program File Su pe rs 1. Double-click I/O Constraints in the Design Flow window as shown in Figure 25. The I/O Editor window is displayed after completing Synthesize and Compile. Figure 25 • Design Flow Window Revision 1 21 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 2. Make the pin assignments shown in Table 2. After the pins have been assigned, the I/O Editor is displayed as shown in Figure 26. Table 2 • Port-to-Pin Mapping Port Name Pin Number R29 MMUART0_0_TXD_M2F R24 Figure 26 • l/O Editor ed ed MMUART0_0_RXD_F2M 3. After updating I/O editor, click Commit and Check. 4. Close the I/O editor. pe rs 5. Click Generate Programming Data as shown in Figure 27 to complete place and route, and generate the programming file. Su Figure 27 • Generate Programming Data 22 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project Step 4: Programming the SmartFusion2 Board Using FlashPro 1. Connect the FlashPro4 programmer to the J59 connector of SmartFusion2 SoC FPGA Development Kit. 2. Connect the jumpers on the SmartFusion2 Development Kit board, as described in Table 3. For more information on jumper locations, refer to "Appendix 1: Jumper Locations" on page 35. Caution: While making the jumper connections, the power supply SW7 switch on the board should be in OFF position. Table 3 • SmartFusion2 SoC FPGA Development Kit Jumper Settings J70, J93, J94, J117, J123, J142, J157, J160, J167, J225, J226, J227 J2 Settings Notes 1-2 closed These are the default jumper settings of the Development Kit. Make sure that these jumpers are set properly. ed ed Jumper Number 1-3 closed J23 2-3 closed 3. Connect the power supply to the J18 connector. 4. Switch the power supply switch SW7 to ON position. Refer to "Appendix 2: Board Setup for Running the Tutorial" on page 36 for information on the board setup for running the tutorial. Su pe rs 5. To program the SmarFusion2 device, double-click Run Programming Action in the Design Flow window as shown in Figure 28. Figure 28 • Run Programming Action Revision 1 23 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 Step 5: Building the Software Application using SoftConsole pe rs ed ed 1. After successful programming, open the SoftConsole project by double-clicking Write Application Code under Develop Firmware in Design Flow window as shown in Figure 29. Su Figure 29 • Invoking SoftConsole from the Libero SoC 24 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project rs ed ed The SoftConsole perspective is displayed as shown in Figure 30. pe Figure 30 • SoftConsole Workspace Su 2. Go to the location where the SoftConsole sample Firmware catalog project is saved, as shown in Figure 31. Figure 31 • Sample Project main. c File Revision 1 25 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 rs ed ed 3. Copy the main.c file and replace it with the existing main.c file under Sysservices_MSS_CM3_app project in the SoftConsole workspace. The SoftConsole window looks as shown in Figure 32. Figure 32 • SoftConsole Workspace - main.c File Device certificate service is not demonstrated in this tutorial. It will be available in future releases. Comment the lines in main.c file which execute the Device Certificate service pe – Modified main.c is available in "Appendix 4: main.c File" on page 38. Su Figure 33 on page 27 shows the SoftConsole workspace with modified main.c file 26 R e visio n 1 ed ed Creating a Libero Project for Firmware Catalog Sample Project Su pe rs Figure 33 • SoftConsole Workspace - Modified main.c File Revision 1 27 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 Su pe rs ed ed 4. Right-click Sysservices_MSS_CM3_app in Project Explorer window of SoftConsole project and select Properties as shown in Figure 34. Figure 34 • Project Explorer Window of SoftConsole Project 28 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project rs ed ed 5. In the Properties window, go to Settings under C/C ++ Build and select GNU C linker as debug-in-microsemi-smartfusion2-esarm.ld as shown in Figure 35. Click Apply and OK. Su pe Figure 35 • Sysservices_MSS_CM3_app Properties Window Revision 1 29 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 rs ed ed 6. Perform a clean build by selecting Project > Clean. Accept the default settings in the Clean dialog box and click OK, as shown in Figure 36. SoftConsole project must not have any errors. Figure 36 • Settings for a Clean Build pe 7. Install the USB driver. For serial terminal communication through the FTDI mini-USB cable, install the FTDI D2XX driver. Download the drivers and the installation guide from www.microsemi.com/soc/documents/CDM_2.08.24_WHQL_Certified.zip Su 8. Connect the host PC to the J24 connector using the USB min-B cable. The USB to UART bridge drivers are automatically detected. Verify if the detection is made in the device manager, as shown in Figure 37 on page 31. 30 R e visio n 1 pe rs ed ed Creating a Libero Project for Firmware Catalog Sample Project Figure 37 • Device Manager Window 9. Start the PuTTY session. If the PuTTY program is not available in the computer system, any free serial terminal emulation program such as HyperTerminal or TeraTerm can be used. Refer to the Configuring Serial Terminal Emulation Programs Tutorial for configuring the HyperTerminal, TeraTerm, or PuTTY. Su The PuTTY settings are as follows: – 57,600 baud rate – 8 data bits – 1 stop bit – No parity – No flow control Revision 1 31 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 rs ed ed 10. Select Debug Configurations from the Run menu of the SoftConsole. The Debug dialog box is displayed. Double-clicking the Microsemi Cortex-M3 Target displays a window similar to Figure 38. Figure 38 • Debug Configurations Window 11. Confirm that the following details appear on the Main tab in the Debug window and click Debug: Name: Sysservices_MSS_ CM3_app Debug – Project: Sysservices_MSS_ CM3_app – C/C++ Application: Debug\Sysservices_MSS_MSS_CM3_app pe – Su 12. Click Yes when prompted for the Confirm Perspective Switch, as shown in Figure 39. This displays the debug view mode. Figure 39 • Confirm Perspective Switch 32 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project rs ed ed The SoftConsole Debugger Perspective window is opened, as shown in Figure 40. Su pe Figure 40 • SoftConsole Debugger Perspective Revision 1 33 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 ed ed 13. Run the application by clicking Run > Resume. Information on the SmartFusion2 device and the design, along with a greeting message is displayed on the PuTTY, as shown in Figure 41. Figure 41 • PuTTY Window 14. Terminate execution of the code by choosing Run > Terminate. rs 15. Close Debug Perspective by selecting Close Perspective from the Window menu. 16. Close SoftConsole using File > Exit. 17. Close the PuTTY. Click Yes when prompted for closing. pe Conclusion Su This tutorial describes how to download the SoftConsole Sample project from the Firmware catalog and how to create a Libero SoC project. It explains the procedure to generate the programming file and to run the SoftConsole project on the SmartFusion2 Development Kit. A sample project for implementing System Services features is created to display the SmartFusion2 device and design information. 34 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project Appendix 1: Jumper Locations B11 B14 J1 J10 R26 C7 R24 R23 R21 R22 C42 6 AT FLAG DS10 R55 R36 R56 DS11 PGOOD R52 R35 OFF D5 D6 3 1 ON C44 SC1 U15 R104 L5 C58 C61 SC2 C68 SC3 SC4 R123 R130 C71 R131 R132 U20 J44 R150 R151 R152 R157R153 R154 C78 C79 R158R155 Q15 D11 R100 R111 R112 4 HPOUTCLK5 R80 R113 R81 R114 DS16 P1LED3 J31 DS17 P1LED2 R82 DS18 P1LED1 DS19 P1LED0 R83 DS12 P0LED3 DS13 P0LED2 DS14 P0LED1 DS15 P0LED0 J29 J67 R137 C74 R143 J80 1P0V_PHY C67 R102 R103 J16 R30 J15 R32 C32 C33 R50 R46 R93 R94 C76 C75 C73 C72 C69 C62 C60 C59 SW8 J82 R27 R25 CONN1 C6 J11 TP10 J14 C28 C29 R45 C49R87 J33 C50R88 R89 R90 R106 R107 R108 R109 R110 R95 C52 R91 C53 R92 1 2 4 1 J103 DS22 C84 GND T2 R170 J112 1 U36 J116 1 R185 J132 R182 R183 789 Q18 R178 R179 R184 U33 DS25 R189 C105 U37 GND C111 L10 123 A B C D E F G H J 1 TXN0 RXP0 RXN0 TXP2 TXN2 TXP1 TXN1 RXN1 RXP1 TXP3 TXN3 C119 C120 C121 TXP0 C134 J150 J171 J149 J148 J170 R244 1P0V_PHY RXN2 RXP2 RXN3 RXP3 D14 J190 J189 TP14 J211 J192 TP25 TS_MDIO J185 R238 R239 R240 R241 J186 J182 R256 TS_MDC J169 R219 J156 J166 R243 R242 1 R247 J168 U45 R220 R221 1 C152 C153 R278 R279 J147 J151 C128 C129 C130 C131 L13 J160 RS6 1 1 R670 R230 J177 J191 R149 R159 R160 R662 C94 C95 1 J142 R203 R204 R206 R207 R205 R212 R217 J167 C148 C149 C150 C151 R276 R277 R274 R275 C70 T1 GND 1 Q23 Q24 Q25 Q26 R383 R382 R380 R378 Q22 1 Q27 DDR3_1P5V TP21 R354 R355 D18 R365 C204 R366 D20 TP20 J207 U61 D17 D15 C200 C202 DVDD12 R375 R350 TP24 C198 D16 R339 R346 TP12 U59 R338 C186 R353 J220 J229 1 GND R325 U60 2P5V_LDO R326 C191 R356 C189 LED8 LED7 R374 R364 LED5 R372 R362 LED6 R373 R363 LED4 R371 R361 LED3 R370 R360 LED2 R369 R359 J219 J228 Q21 J206 J205 SERDES1 REFCLK0_N J208 GND SF2 DEV KIT Q20 POE CONN J6 SW2 R47 R48 R49 1 C66 1 3 R146 U23 4 C146 R2 C147 66 R2 86 R282 R283 U56 C173 C159 R312 1 3P3V_LDO J230 C63 D10 Q14 ON DVP-102-000400-001 REFCLK0_P RevC U55 1 J152 DDR3_VTT R377 R385 R384 B1 1 R280 C164 TP22 LED1 R368 R358 C197 C203 C167 789 R367 R357 C184 R281 R226 R229 R231 R232 R234 R235 R236 R237 R267 R269 R268 TP29 GND_0 C54 TP13 1 R218 U51 R376 U54 R311 C172 3 R270 R97 C51 J153 C162 A B C D E F G H KJ L M N PLLXVDDA 2 123 789 A B DC E F G H J K L M N 1 L12 R213 R215 A1 VPP 3 J233 123 789 J226 1 123 A B DC E F G H J K L M N PLLMDDRVDDA 1 ON U40 U42 J225 R319 R320 R317 R318 C183 3 J128 J125 SW10 RS5 C37 R74 C48 C77 R671 R181 R186 R188 J126 J127 J124 RS3 RS4 R78 C46 GND R166 R167 R168 Y3 R180 J123 C114 A30 J224 R351 R344 R345 C195 C199 1 J234 J215 R290 R291 C187 J217 R295 J130 R187 R332 R296 R333R334 1 R299 R302 R303 R304 TP7 R305 R306 R307 R308 R309 GND R340 C192 J223 R341 R342 1 2 1 J216 J81 AK1 C38 C40 C43 R86 7 1 R335 R336 C190 R337 U58 C193C194 J222 R343 C196 R348 R349 R352 C201 J203 R329 C188 C177 C178 C182 C185 R327 C180 C176 R328 R331 R330 J172 K23 J175 L26 J179 H26 J184 J29 J188 H30 J195 H28 J197 G29 J200 F30 J202 K25 J210 L23 J214 N23 R310 C160 R288 R289 U53 J212 R322R314 R323 C181 R321 J204 1 20 GND U57 J218 1 Y2 R172 R173 C91 C92 AK30 3 3 Su 19 DB9-RS232 1 ANALOG INPUT C175 R315 R313 R316 C179 R324 1 3 1 PCIEXVDD R381 1 R177 L8 PLLFDDRVDDA R674 R673 R672 R676 GND_C 1 U62 L15 C171 1 C174 2 1 50 MHZ C85 C86 C87 C88 C89 C90 C97 C101 C102 L7 R379 R192 3 J193 C165 U52 R293 R300R294 C169C166 U50 U48 J54 R148 LED9 RST LED J70 2 rs U27 SW9 JTAG SEL RS2 C98 C100 C96 C103 C104 C93 C99 1 Y1 3 R175 R176 J139 P24 J141 N26 J144 M27 J146 L29 J155 L28 J159 K30 J162 J27 1 1 1 V2J21 M2 J20 M2J20 H2 J19G3 J196 H2J19 J2 J18 J3 J18 J2 J17 K2 J174 9 4 8 7 0 3 6 8 4 63 4 9 5 1 7 9 0 C158 R287 R248 R255 C144 R264 C161 C163 C143 5 R284 3 3 Q19 J173 J180 1 C141 R251 TP26 VDDIO R292 C168 R298 R297 C170 R301 1 1 C125 R202 J157 R271 C155 R272 R249 R273 C142 TP27 C145 R259 R260R250 R227 R258 R233 R99 J19 J26 GND J37 J59 U25 U31 TP3 pe 1 R200 R197 C117 C118 R199 C123 C124 R208 R209 R210 R211 U47 C137 1 L14 1 R60 R61 U8 U12 1 J38 J43 R163 U29 J115 AA29 J119 Y30 J122 M23 J131 T27 J134 T26 J135 V23 J232 U24 3 1 J105 85 R2 2 HDR-RS485 R347 J104 65 R2 J221 8 3 J111 V24 W28 R29 R24 J138 P23 J140 N25 J143 N24 J145 M26 J154 L30 J158 K29 C133 J161 K28 1 J165 J137 R246 C140 HVDD R252 R253 R254 R257 J181 C156 C157 1 J176 4 3 U49 TP28 C126 C127 R222 2 J164 U46 J198 U41 1 1 J163 C113 D13 R216 HVSS R223 R225 C132 R224 U44 R228 1 R214 R196 R198 R261 C139 R262 R245 C154 R263 TP5 C138 7 J55 1 1 U26 1J106 J227 D12 3 R680 R681 R678 R679 R677 R675 R190 6 C110 C108 R193 DS27 C112 HVDD J13 HVSS U39 U38 J113 R201 TP4 U43 R195 R161 R162 REFCLK0_P REFCLK0_N SERDES0 4 J107 J108 C83 DS26 J121 5 USB MICRO AB OTG Support C122 C136 1 C81 C82 U28 C80 D7 U10 R69 R70 R73 J49 A14 P14 R28 4 C115 C116 1 1 J94 1 U19 P1 C39 Q13 P3LED2 TC2 P3LED3 TC1 TC4 P3LED1 J32 P3LED0 TC3 TC6 P2LED3 P2LED2 TC5 TC7 P2LED0 R121 A1 3 C106 R194 1 J93 GND R59 TP30 2 L11 RESET 20 10 - - C107 U22 R85 J30 1 1 R117 R118 R119 R122 R125 R126 R127 R129 R133 R135 R136 R138 R139 R141 R144 R145 A12 1 C109 R191 ZL RST 12 6 U34 L9 R147 1 V22 J110 AA28 J114 W27 J118 TP8 R174 U30 J91 J99 J102 J101 J100 R664 J88 R171 FP4 HEADER J79 U32 J83 J92 R165 GND J98 J66 J60 1 R169 1 1 U35 REMOTE PWR ENB DS23 9 R663 J78 J84 J89 J90 J231 1 U69 1 M12 R76 SW6 R58 L4 R64 R66 R68 GND R134 10 1 J77 J87 J120 5 J48 J41 J39 L6 J63 J75 J42 J74 DS24 CR4 J28 J27 C55 U17 C64 C65 1 J72 J61 J95 6 J4 1 J69 J64 R164 2 SFP CONN A1 R62 R65 TP11 17 5 J62 J68 R156 J73 Q17 1 19 R128 GND J34 J86 J97 J85 J40 J53 1 GND 10 J58 R142 J96 J71 J109 9 J65 J76 DB9-CAN2 R140 U24 2 J117 R105 J51 J57 J56 J45 20 U21 X1 2 19 5 3 1 1 U18 J13 J12 SW1 R53 R54 R39 SW4 C35 D8 R98 U11 D9 C56 DB9-CAN1 1 R120 J47 J50 P1 20 R115 R51 U9 R67 R71 R72 R75 R77 R79 R84 REFP6 ETM HEADER RS1 J35 1 DS21 2 R116 GND J46 1 C135 1.2V VDD_REG J36 R124 REFP5 1 5 DS20 J20 3 J21 3 J22 3 J25 3 RVI HEADER U14 TP15 R101 TP19 C57 J52 CR3 Q12 U13 1 C47 C45 3P3V_LDO U16 R63 J18 1 CR2 FTDI INTERFACE R96 J24 C34 R44 5 1.0V J23 TP2 J17 M1 R41 C30 R42 C31 R43 3 Q10 C21 R38 U7 7 20 J5 POE PWR ENB U4 R34 R33 C25 C26 C27 12 1 1 SW7 1 6 17 J7 1 ON 1 7 C694 C20 C18 U5 C23 C24 4 1 C41 1 SW3 C17 10 1 CR1 TP1 R14 R29 C13 C19 L3 Q11 SW5 R13 D1 C16 2P5V C10 R57 USB MINI B J9 1 GND R37 6 HPDIFFN4 HPDIFFP4 FMC HEADER C14 C15 C22 3 Q8 J8 1 R31 C1 R10 R9 D3 3P3V J3 C3 C4 U6 R40 Q7 1 C693 R17 R18 R19 R20 C12 1P8V ed ed DS7 DS8 DS9 3P3V 5P0V U1 R15 D2 D4 C682 R16 L2 TP23 OFF FMC HEADER L1 TP17 TP18 DC JACK12V/6A A1 A40 7 1 7 C11 C9 1 K1 12P0V DS4 DS5 DS6 VDD_REG R4 2P5V_LDO R5 2P5V R6 Q5 Q6 Q4 DS3 R3 3P3V_LDO Q3 R1 1P8V R2 DDR3-1P5V DS2 Q1 Q2 U3 C8 R12 Q9 R669 R11 C2 R8 R7 GND C36 12V 12V_POE 12V_PCIE R668 5P0V TP16 TP9 U2 12_DCJACK C683 R660 K40 1 J2 1 DS1 Figure 42 shows the jumper locations in SmartFusion2 Development Kit Board. D19 C205 B49 Figure 42 • Jumper Locations Note: • Jumpers highlighted in red are set by default. • The location of the jumpers in Figure 42 are searchable. Revision 1 35 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 Appendix 2: Board Setup for Running the Tutorial rs ed ed Figure 43 shows the board setup for running the tutorial on the SmartFusion2 Development Kit Board. Su pe Figure 43 • SmartFusion2 Development Kit 36 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project Appendix 3: Readme File ================================================================================ SmartFusion2 System Services Read Version example ================================================================================ This example project demonstrates the use of the SmartFusion2 System Services functions: - MSS_SYS_get_serial_number() - MSS_SYS_get_user_code() - MSS_SYS_get_design_version() - MSS_SYS_get_device_certificate() - MSS_SYS_check_digest() ed ed -------------------------------------------------------------------------------How to use this example -------------------------------------------------------------------------------This example project requires MMUART0 to be connected to a host PC. The host PC must connect to the serial port using a terminal emulator such as HyperTerminal or PuTTY configured as follows: - 57600 baud - 8 data bits - 1 stop bit - no parity - no flow control rs The example project will display the following information about the SmartFusion2 device on which it is executed: - device serial number - user code - design version - device certificate - digest status NOTE: In Release mode(i.e. when the code is executed from eNVM0), Digest Check service will not work for eNVM0 option. Su pe -------------------------------------------------------------------------------Target hardware -------------------------------------------------------------------------------This example project is targeted at a SmartFusion2 design which has MMUART0 enabled and connected to a host PC. The example project is built for a design using a SmartFusion2 MSS APB clock frequency of 83MHz. Trying to execute this example project on a different design will result in incorrect baud rate being used by MMUART0 or no output if MMUART0 is not enabled and connected. This example project can be used with another design using a different clock configuration. This can be achieved by overwriting the content of this example project's "drivers_config/sys_config" folder with the one generated by Libero as part of your design's creation. -------------------------------------------------------------------------------Redirecting MMUART0 to RS232 connector on SmartFusion2 Development Kit -------------------------------------------------------------------------------Please note that it is possible to redirect MMUART0 to the J198 RS232 connector on the SmartFusion2 Development Kit despite J198 being connected to the MMUART1 SmartFusion2 pads. This can be done in your hardware design by selecting to direct the MMUART0 TXD and RXD signals to the FPGA fabric and then connecting these signals to top level ports assigned to pin H30 for TXD and pin G29 for RXD. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Silicon revision dependencies !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! This example is built to execute on an M2S050T_ES die (M2S050T revision B). You will need to overwrite this example project's "drivers_config/sys_config" and "CMSIS" folders with the one generated by Libero for your hardware design if using a newer silicon revision. Revision 1 37 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 The "drivers_config/sys_config" folder contains information about your hardware design. This information is used by the CMSIS to initialize clock frequencies global variables which are used by the SmartFusion2 drivers to derive baud rates. The CMSIS boot code may also complete the device's clock configuration depending on silicon version. The "CMSIS" and "drivers_config/sys_config" for your design can be found in the "firmware" folder of your Libero design. Appendix 4: main.c File ed ed /******************************************************************************* * (c) Copyright 2012-2013 Microsemi SoC Products Group. All rights reserved. * * Retrieve device and design information using System Services. * * Please refer to file README.TXT for further details about this example. * * SVN $Revision: 5933 $ * SVN $Date: 2013-11-04 15:00:37 +0530 (Mon, 04 Nov 2013) $ */ #include <stdio.h> #include "drivers/mss_sys_services/mss_sys_services.h" #include "drivers/mss_uart/mss_uart.h" pe rs /*============================================================================== Messages displayed over the UART. */ const uint8_t g_greeting_msg[] = "\r\n\r\n\ **********************************************************************\r\n\ ********* SmartFusion2 System Services Read Version Example **********\r\n\ **********************************************************************\r\n\ This example project displays information about the device/design\r\n\ retrieved using the SmartFusion2 System Services.\r\n\ It uses the following System Services driver functions:\r\n\ - MSS_SYS_get_serial_number()\r\n\ - MSS_SYS_get_user_code()\r\n\ - MSS_SYS_get_design_version()\r\n\ - MSS_SYS_check_digest()\r\n\ ----------------------------------------------------------------------\r\n"; const uint8_t g_separator[] = "\r\n----------------------------------------------------------------------\r\n"; Su /*============================================================================== Private functions. */ static void display_greeting(void); static void display_hex_values ( const uint8_t * in_buffer, uint32_t byte_length ); /*============================================================================== UART selection. Replace the line below with this one if you want to use UART1 instead of UART0: mss_uart_instance_t * const gp_my_uart = &g_mss_uart1; */ mss_uart_instance_t * const gp_my_uart = &g_mss_uart0; /*============================================================================== Main function. */ 38 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project int main() { uint8_t serial_number[16]; uint8_t user_code[4]; uint8_t design_version[2]; uint8_t device_certificate[512]; uint8_t status; int8_t tx_complete; MSS_SYS_init(MSS_SYS_NO_EVENT_HANDLER); MSS_UART_init(gp_my_uart, MSS_UART_57600_BAUD, MSS_UART_DATA_8_BITS | MSS_UART_NO_PARITY | MSS_UART_ONE_STOP_BIT); ed ed /* Display greeting message. */ display_greeting(); /*-------------------------------------------------------------------------* Device Serial Number (DSN). */ status = MSS_SYS_get_serial_number(serial_number); rs if(MSS_SYS_SUCCESS == status) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Device serial number: "); display_hex_values(serial_number, sizeof(serial_number)); } else { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Service read device serial number failed.\r\n"); pe if(MSS_SYS_MEM_ACCESS_ERROR == status) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Error - MSS memory access error."); } } MSS_UART_polled_tx_string(gp_my_uart, g_separator); Su /*-------------------------------------------------------------------------* User code. */ status = MSS_SYS_get_user_code(user_code); if(MSS_SYS_SUCCESS == status) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"User code: "); display_hex_values(user_code, sizeof(user_code)); } else { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Service read user code failed.\r\n"); if(MSS_SYS_MEM_ACCESS_ERROR == status) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Error - MSS memory access error."); } } Revision 1 39 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 MSS_UART_polled_tx_string(gp_my_uart, g_separator); ed ed /*-------------------------------------------------------------------------* Design version. */ status = MSS_SYS_get_design_version(design_version); if(MSS_SYS_SUCCESS == status) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Design version: "); display_hex_values(design_version, sizeof(design_version)); } else { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Service get design version failed.\r\n"); if(MSS_SYS_MEM_ACCESS_ERROR == status) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Error - MSS memory access error."); } } MSS_UART_polled_tx_string(gp_my_uart, g_separator); pe rs /*-------------------------------------------------------------------------* Device certificate. */ /*status = MSS_SYS_get_device_certificate(device_certificate); if(MSS_SYS_SUCCESS == status) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Device certificate: "); display_hex_values(device_certificate, sizeof(device_certificate)); } else { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Service get device certificate failed.\r\n"); Su if(MSS_SYS_MEM_ACCESS_ERROR == status) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Error - MSS memory access error."); } } MSS_UART_polled_tx_string(gp_my_uart, g_separator); do { tx_complete = MSS_UART_tx_complete(gp_my_uart); } while(0 == tx_complete); */ /*-------------------------------------------------------------------------* Check digest. */ status = MSS_SYS_check_digest(MSS_SYS_DIGEST_CHECK_FABRIC); if(MSS_SYS_SUCCESS == status) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"Digest check success."); } else { uint8_t fabric_digest_check_failure; uint8_t envm0_digest_check_failure; 40 R e visio n 1 Creating a Libero Project for Firmware Catalog Sample Project uint8_t envm1_digest_check_failure; fabric_digest_check_failure = status & MSS_SYS_DIGEST_CHECK_FABRIC; envm0_digest_check_failure = status & MSS_SYS_DIGEST_CHECK_ENVM0; envm1_digest_check_failure = status & MSS_SYS_DIGEST_CHECK_ENVM1; ed ed MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"\r\nDigest check failure:"); if(fabric_digest_check_failure) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"\r\nFabric digest check failed."); } if(envm0_digest_check_failure) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"\r\neNVM0 digest check failed."); } if(envm1_digest_check_failure) { MSS_UART_polled_tx_string(gp_my_uart, (const uint8_t*)"\r\neNVM1 digest check failed."); } } MSS_UART_polled_tx_string(gp_my_uart, g_separator); for(;;) { ; } rs } pe /*============================================================================== Display greeting message when application is started. */ static void display_greeting(void) { MSS_UART_polled_tx_string(gp_my_uart, g_greeting_msg); } Su /*============================================================================== Display content of buffer passed as parameter as hex values */ static void display_hex_values ( const uint8_t * in_buffer, uint32_t byte_length ) { uint8_t display_buffer[128]; uint32_t inc; if(byte_length > 16u) { MSS_UART_polled_tx_string( gp_my_uart,(const uint8_t*)"\r\n" ); } for(inc = 0; inc < byte_length; ++inc) { if((inc > 1u) &&(0u == (inc % 16u))) { MSS_UART_polled_tx_string( gp_my_uart,(const uint8_t*)"\r\n" ); } Revision 1 41 Creating a Libero Project for Firmware Catalog Sample Project - Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 Su pe rs ed ed snprintf((char *)display_buffer, sizeof(display_buffer), "%02x ", in_buffer[inc]); MSS_UART_polled_tx_string(gp_my_uart, display_buffer); } } 42 R e visio n 1 Product Support Microsemi SoC Products Group backs its products with various support services, including Customer Service, Customer Technical Support Center, a website, electronic mail, and worldwide sales offices. This appendix contains information about contacting Microsemi SoC Products Group and using these support services. Customer Service ed ed Contact Customer Service for non-technical product support, such as product pricing, product upgrades, update information, order status, and authorization. From North America, call 800.262.1060 From the rest of the world, call 650.318.4460 Fax, from anywhere in the world, 408.643.6913 Customer Technical Support Center rs Microsemi SoC Products Group staffs its Customer Technical Support Center with highly skilled engineers who can help answer your hardware, software, and design questions about Microsemi SoC Products. The Customer Technical Support Center spends a great deal of time creating application notes, answers to common design cycle questions, documentation of known issues, and various FAQs. So, before you contact us, please visit our online resources. It is very likely we have already answered your questions. Technical Support pe Visit the Customer Support website (www.microsemi.com/soc/support/search/default.aspx) for more information and support. Many answers available on the searchable web resource include diagrams, illustrations, and links to other resources on the website. Website Su You can browse a variety of technical and non-technical information on the SoC home page, at www.microsemi.com/soc. Contacting the Customer Technical Support Center Highly skilled engineers staff the Technical Support Center. The Technical Support Center can be contacted by email or through the Microsemi SoC Products Group website. Email You can communicate your technical questions to our email address and receive answers back by email, fax, or phone. Also, if you have design problems, you can email your design files to receive assistance. We constantly monitor the email account throughout the day. When sending your request to us, please be sure to include your full name, company name, and your contact information for efficient processing of your request. The technical support email address is [email protected]. Revision 1 43 Product Support My Cases Microsemi SoC Products Group customers may submit and track technical cases online by going to My Cases. Outside the U.S. Customers needing assistance outside the US time zones can either contact technical support via email ([email protected]) or contact a local sales office. Sales office listings can be found at www.microsemi.com/soc/company/contact/default.aspx. ITAR Technical Support Su pe rs ed ed For technical support on RH and RT FPGAs that are regulated by International Traffic in Arms Regulations (ITAR), contact us via [email protected]. Alternatively, within My Cases, select Yes in the ITAR drop-down list. For a complete list of ITAR-regulated Microsemi FPGAs, visit the ITAR web page. 44 R e visio n 1 ed ed rs pe Su Microsemi Corporate Headquarters One Enterprise, Aliso Viejo CA 92656 USA Within the USA: +1 (800) 713-4113 Outside the USA: +1 (949) 380-6100 Sales: +1 (949) 380-6136 Fax: +1 (949) 215-4996 E-mail: [email protected] Microsemi Corporation (Nasdaq: MSCC) offers a comprehensive portfolio of semiconductor and system solutions for communications, defense and security, aerospace, and industrial markets. Products include high-performance and radiation-hardened analog mixed-signal integrated circuits, FPGAs, SoCs, and ASICs; power management products; timing and synchronization devices and precise time solutions, setting the world's standard for time; voice processing devices; RF solutions; discrete components; security technologies and scalable anti-tamper products; Power-over-Ethernet ICs and midspans; as well as custom design capabilities and services. Microsemi is headquartered in Aliso Viejo, Calif. and has approximately 3,400 employees globally. Learn more at www.microsemi.com. © 2014 Microsemi Corporation. All rights reserved. Microsemi and the Microsemi logo are trademarks of Microsemi Corporation. All other trademarks and service marks are the property of their respective owners. 50200487-1/04.14