SILIKON-LOGO

Perisian SILICON LABS Simplicity Studio 6

SILICON-LABS-Simplicity-Studio-6-Software-PRODUCT

Building and Flashing

These pages describe:

  • How to compile or build software into a binary image
  • How to configure additional build steps using the Post-Build Editor to make customized binary images
  • How to load or flash that application image onto a connected device
  • The Software Bill of Materials (SBOM) generation tool

bangunan
Simplicity Studio® 5 (SSv5) offers two convenient ways to compile or ‘build’ projects:

  • Simple build
  • Debug build and flash

Projects are built with the toolchain defined when the project was created, and using the active configuration. Project files must be generated before you can build the project.

  • For 32-bit device development using AppBuilder, click Generate in the Simplicity IDE.
  • Files are automatically generated if the project uses Project Configurator.

Progress is shown in the lower right of the Simplicity IDE perspective.SILICON-LABS-Simplicity-Studio-6-Software- (1)

Speed varies depending on your system, number of projects, and other factors. Be sure that generation and indexing complete before building the application image.
The result of the build is a compiled application known as a firmware image or binary. The binaries are physically located in a directory named for the compiler used to generate them, and are also shown as a ‘binaries’ group in project explorer. Right-click a binary for a context menu from which you can debug, flash, and perform other functions.

The binaries generated depend on both the SDK and the target device. For example, the Keil® 8051 compiler for an 8-bit device generates:

  • *.hex (application image)
  • *.omf (contains additional debug information)

The GNU ARM® compiler for a 32-bit device using the Zigbee EmberZNet SDK generates:

  • *.axf (image that can be read on a Microsoft Windows device)
  • *.bin (binary image file, can be flashed to any address)
  • *.gbl (Gecko Bootloader file, specialized firmware file for use with the Gecko bootloader)
  • *.hex (application image file)
  • *.s37 (similar to a binary file but contains the target memory location to flash to – an application image or a bootloader image, but not both)

Note that if you need a .gbl file but do not see one in the binary directory, you can use Simplicity Commander to create one. Commands invoked from Simplicity Commander’s CLI can be used to:

  • Hasilkan kunci files for signing and encryption
  • Sign application images for Secure Boot
  • Create GBL images (encrypted or unencrypted, signed or unsigned)
  • Parse GBL images
  • For details about using Simplicity Commander see UG162: Simplicity Commander Reference Guide.
  • For details about using the Gecko Bootloader, including its enhanced security features, see UG266: Silicon Labs Gecko Bootloader User’s Guide.
  • See your SDK’s quick-start guide for more stack-specific information about building and flashing.

About Toolchains

SSv5 provides a GNU ARM® toolchain to build projects for 32-bit devices and a 30-day evaluation license to the Keil® 8051 toolchain to build projects for 8-bit devices. You can apply for a free full license when you build an 8-bit project.

SILICON-LABS-Simplicity-Studio-6-Software- (2)

You can also add your own toolchain, for example IAR-EWARM. IAR is required for some projects, such as the Zigbee Dynamic Multiprotocol and Micrium OS examples. However, you must use the version specified in the SDK release notes front page under compatible tools. See your SDK’s quick-start guide for information on how to load a compatible version and obtain a free evaluation license. SSv5 provides an integration package for IAR, so that you can use that tool within SSv5.

SILICON-LABS-Simplicity-Studio-6-Software- (3)

Projects use the toolchain selected at the time of project creation. The selection is available on the first of the three New Project Wizard dialogs.

SILICON-LABS-Simplicity-Studio-6-Software- (4)

The toolchain and build configuration are displayed in Project Explorer view with the project directory. The build configuration determines whether the image is built for debugging or release. Default is typically equivalent to a debug build. SILICON-LABS-Simplicity-Studio-6-Software- (5)

If more than one toolchain is available, you can configure which are presented as options when creating a new project. In the Preferences filter field type toolchain . Uncheck the ones you do not wish to display. You can also completely remove toolchains, or add new toolchains through this dialog.

SILICON-LABS-Simplicity-Studio-6-Software- (6)

Binaan Mudah

Right-click the project directory and in the context menu select Build, or click the Build (hammer) button on the Simplicity IDE perspective toolbar to build a project with its toolchain and the active build configuration.SILICON-LABS-Simplicity-Studio-6-Software- (7)While the Build menu selection always uses the active configuration, the Build button’s drop-down menu allows you to select a different configuration. This also changes the active configuration for the project to the one selected. If the Build button is not enabled, make sure you have a project directory or file in the directory selected.

Debug Build and Flash
Click the Debug (bug) button in either the Simplicity IDE or Debug perspective to build an application image, flash it to the device, and open the Debug perspective (if it is not already open).

The Debug button’s drop-down menu allows you to select the project in your workspace you want to debug.SILICON-LABS-Simplicity-Studio-6-Software- (8)

If you have a lot of projects use Organize Favorites to select favorites and organize them. These projects then appear at the top of the selection list with other projects below a demarcation line.

SILICON-LABS-Simplicity-Studio-6-Software- (9)

If you have a lot of projects use Organize Favorites to select favorites and organize them. These projects then appear at the top of the selection list with other projects below a demarcation line.

SILICON-LABS-Simplicity-Studio-6-Software- (10)

Select Debug Configurations to open a tabbed set of configuration option dialogs. If you click Debug, the build and flash process will proceed with the options you selected. See Using the Debugger for more information.

SILICON-LABS-Simplicity-Studio-6-Software- (11)

Post-Build Editor (PBE)
The Post-Build Editor (PBE) is provided to make it easy for the user to specify actions required on the project output binary to create various types of image files. The tool provides the following capabilities:

  • Adding signatures or checksums to application or bootloader binaries
  • Merging applications and other data into production images
  • Packaging applications and other data into upgrade files, including GBL and Zigbee OTA.

Aliran kerja
The PBE-defined post-build steps are stored in a post-build YAML file with an ‘. slpb’ extension that can be used either from within Simplicity Studio 5 (SSv5) or by running Simplicity Commander on the command line. Simplicity Studio IDE projects and SLC exported projects will execute the post-build steps automatically using the post-build command step to call the command line version of Simplicity Commander. Also, the various project configurator generators (GCC Makefile, Visual Studio Code Compatible (beta), and IAR Embedded Workbench) will include the necessary Simplicity Commander call to automatically perform the post  build steps when the project is built in those environments.

Beberapa bekasample .slpb files are included in the Gecko SDK Suite (GSDK) starting with version 4.2.0.0. For examples of projects that use the .slpb feature, see the TrustZone examples. Refer to UG162: Simplicity Commander User’s Guide for details on the signing and secure boot information in the following tasks.

  • Tugasan
    The PBE supports four different tasks: copy, convert, create_gbl, and create_ota.
  • salin
    The copy task is used to copy a file from one folder to another and it is also the starting point for specifying the post-build sequence.SILICON-LABS-Simplicity-Studio-6-Software- (12)
  • Required Arguments:
    • Input name: The project relative path and filename to copy.
    • Output name: The destination project relative path and filename. Folders will be created as needed.
  • Optional Arguments:
    • Export output as: The parameter name to assign to the output file.

Tukar
The convert task performs various actions on the binary to convert it to another form, such as adding a CRC or a signature. See the Simplicity Commander User’s Guide ‘Convert and Modify File Commands’ section for details.SILICON-LABS-Simplicity-Studio-6-Software- (13)

  • Required Arguments:
    • Input name: The project relative path and filename to convert.
    • Output name: The destination project relative path and filename. Folders will be created as needed.
  • Optional Arguments:
    • Export output as: The parameter name to assign to the output file.
    • Add CRC checkbox: To calculate and store the CRC32 on the bootloader image. The Gecko Bootloader can use the CRC to ensure image integrity when Secure Boot is not used.
    • Secure boot: Private Key and Intermediary Certificate to use to sign the secure boot image.
    • Tandatangan file to sign the image
    • Include-section: <ELF section to include in image>
    • Exclude-section: <ELF section to exclude from image>
    • Verify: Key file

The Include-section and Exclude-section optional arguments can be used if the input file is an Executable and Linkable Format (ELF) file. If neither the Include-section nor the Exclude-section arguments are used, all .text sections will be extracted, as well as sections of type progbits with address not equal to 0x0.

Create_gbl
The create_gbl task creates a Gecko Bootloader file (GBL) from an application and/or bootloader image that optionally includes a Secure Element (SE) upgrade image. See the Simplicity Commander User’s Guide “GBL Commands” section for details.

SILICON-LABS-Simplicity-Studio-6-Software- (14)

  • Required Arguments:
    • Output name: The destination project relative path and filename. Folders will be created as needed.
  • Optional Arguments:
    • Export output as: The parameter name to assign to the output file.
    • Application Image: Application image file.
    • Bootloader: Bootloader image file.
    • SE upgrade: Secure Element upgrade image file.
    • Metadata: Metadata bin file to include in the image.
    • Compression: Compression method for output (none, lzma, lz4).
    • Sign using HWM checkbox: Check if the signature will be created using Hardware Security Module.
    • Signing key
    • Signing certificate
    • Encrypt: Encryption key used to encrypt image.
    • Include-section: <ELF section to include in image>.
    • Exclude-section: <ELF section to exclude from image>.

Create_ota
The create_ota task creates a Zigbee Over-the-air (OTA) bootloader file from one or more GBL files. See the Simplicity Commander User’s Guide “OTA Commands” section for details.
NOTE: The “Input name” field should be ignored; it will be removed in a future release. The “Input name” is a duplicate of the “Upgrade Image”. Using both will add two copies of the file to the output.SILICON-LABS-Simplicity-Studio-6-Software- (15)

  • Required Arguments:
    • Upgrade Image: The project relative path of the gbl file.
    • Output name: The destination project relative path and filename. Folders will be created as needed. Manufacturer ID
    • Jenis gambar
    • Header string
  • Versi Firmware
  • Optional Arguments:
    • Export output as: The parameter name to assign to the output file Pengeluar tag: Tag ID.
    • Versi susun
    • Tauliah
    • Target device EUI64
    • Minimum HW version
    • Maximum HW version

Example

Series 1 Combined Bootloader
Seorang bekasample of the PBE can be seen by creating a Series 1 bootloader for an EFR32MG12 target part. The PBE file copies the output .s37 of the main bootloader and adds a CRC to it. Then it copies the pre-built first stage bootloader image into a combined bootloader file that can be programmed to the device. To create this example:

  1. Add BRD4161A to the Launcher Perspective [My Products] window and select it.
  2. Make sure GSDK 4.2.0 or later is the Preferred SDK.
  3. Klik Example Projects and Demos tab and click the Bootloaders filter checkbox
  4.  Click [Create] for “Bootloader – SoC Internal Storage (single image on 1MB device)
  5.  Build the project. In the build console output will be a call to commander.exe with the postbuild argument and the .slpb file:

“C:\SiliconLabs\SimplicityStudio\v5\developer\adapter_packs\commander\commander.exe” postbuild
“C:\Users\USERNAME\SimplicityStudio\v5_workspace\bootloader-storage-internal-single/bootloader-storage-internal-single.slpb” –parameter build_dir:”C:\Users\USERNAME\SimplicityStudio\v5_workspace\bootloader-storage-internal-single\GNU ARM v10.3.1 – Default”
Menghuraikan file C:\Users\japitt\SimplicityStudio\v5.rel.Staging_1865\bootloader-storage-internal-single/bootloader-storage-internal-single.slpb…
Running task copy…
Running task convert…
Running task convert…
SELESAI

The ‘artifact’ folder is created with three files in it:

SILICON-LABS-Simplicity-Studio-6-Software- (16)

Opening the .slpb file shows three operations with the last one being a convert that takes the 8autogen/first_stage.s379 file and adds it to the main bootloader image in a new file called 8bootloader-storage-internal-single-combined.s37. SILICON-LABS-Simplicity-Studio-6-Software- (17)

Series 2 OTA Image Creation
Ex berikutample was created using an EFR32MG24B210F1536IM48 target on a BRD4186C radio board. It includes all four tasks and can be created with the following steps:

  1. Create and build a “Bootloader – SoC Internal Storage single image with LZMA compression, 1MB Flash” (bootloader-storage-internal-single-lzma) project.
  2. Create and build a “Zigbee SoC ZigbeeMinimal” (ZigbeeMinimal) project.
  3. Open the bootloader .slpb file in the PBE. It will have copy and convert tasks already defined: SILICON-LABS-Simplicity-Studio-6-Software- (18)

Add a Create_gbl Task

  1.  Select the Convert task and then click the “+” icon and select “create_gbl”.
  2. Next to ‘Application Image’, click BROWSE and select the ZigbeeMinimal.s37 file. Multiple application images could be entered in this field if needed.
  3.  Next to ‘Bootloader’, click BROWSE and select the bootloader .s37 file.
  4. Next to ‘SE Upgrade’, click BROWSE and browse to the Secure Element upgrade image file “s2c4_se_fw_upgrade_2v2p1.seu”.
  5. Click the ‘Compression’ dropdown and select “lzma”.
  6. Click the ‘Output name’ field and enter “artifact/CompressedZigbeeMinimal.gbl”.
  7. Click SAVE. The GBL task should look like this: SILICON-LABS-Simplicity-Studio-6-Software- (19)

Add a Create_ota Task

  1. Click the “+” icon and select “create_ota”.
  2.  Click the ‘Output name’ field and enter “artifact/CompressedZigbeeMinimal.ota”.
  3.  Click the ‘Manufacturer ID’ field and enter your manufacturer ID. A dummy value of 0x1002 is used in this example.
  4. Click the ‘Image type’ field and enter a hex number for the image type. A dummy value of 0x5678 is used in this example.
  5. Click the ‘Header string’ field and enter “Example ”.
  6. Click the ‘Upgrade Image’ field and enter the path and .gbl filename from the create_gbl task – artifact/CompressedZigbeeMinimal.gbl. Note multiple .gbl files could be entered in this field if needed.
  7. Click the ‘Firmware Version’ field and enter an unsigned integer value for the version. A dummy value of 0x1002 is used in this example.
  8. Click SAVE. The OTA task should look like this: SILICON-LABS-Simplicity-Studio-6-Software- (20)

Test the Post-Build File
Build the project and at the end of the build commander will be called with the .slpb file and each of the tasks will be run:

“C:\SiliconLabs\SimplicityStudio\v5\developer\adapter_packs\commander\commander.exe” postbuild
“C:\SiliconLabs\workspaces\v5_workspace\bootloader-storage-internal-single-lzma/bootloader-storage-internal-single-lzma.slpb” –parameter build_dir:”C:\SiliconLabs\workspaces\v5_workspace\bootloader-storage-internal-single-lzma\GNU ARM v10.3.1 – Default”
Menghuraikan file C:\SiliconLabs\workspaces\v5_workspace\bootloader-storage-internal-single-lzma/bootloader-storage-internal-single-lzma.slpb…
Running task copy…
Running task convert…
Running task GBL create…
Running task OTA create…
SELESAI

Berkelip
Simplicity Studio® 5 (SSv5) offers several ways to load (flash) a firmware image to your device.

  • With the Debug button (see Debug build and flash)
  • Through the debug adapter’s context menu, Upload Application… selection
  • Using the Flash Programmer tool

See your SDK’s quick start guide for more stack-specific information about building and flashing.

Upload Application

  • This option is useful if you want to load a bootloader image and an application image in a single step. To use this option, you will need to know the radio board part number (shown in the Debug Adapters view), and the location and name of the binary image you wish to load.
  • The default workspace locations are:
  • Windows 10 workspace: C:\Users\<user>\SimplicityStudio Mac workspace: /Users/<user>/SimplicityStudio
  • In the Debug Adapters view, right-click the adapter (top line) and select Upload Application… from the debug adapter context menu.SILICON-LABS-Simplicity-Studio-6-Software- (21)
  • The Application Image Upload dialog is displayed. SILICON-LABS-Simplicity-Studio-6-Software- (22)
  • Browse to the project directory, go to the directory corresponding to the compiler toolchain, and select an image file. bekas iniample uses the .GBL file, as it assumes you are also loading a Gecko Bootloader image. (Start with UG103.6: Bootloader Fundamentals if you are not familiar with bootloaders.) Click Open. SILICON-LABS-Simplicity-Studio-6-Software- (23)
  • Check Bootloader image, then browse to the folder containing a prebuilt bootloader image. Images are located in the Simplicity Studio platform bootloader folder under sample apps. In this case open the SPI Flash Single folder, for example: C:\SiliconLabs\SimplicityStudio\<version>\developer\sdks\gecko_sdk_suite\<version>\platform\bootloader\sample- apps\bootloader-storage-spiflash-single
  • Open the folder that corresponds to your board and part number and select the .s37 file, untuk example: efr32mg12p332f1024gl125-brd4162a\bootloader-storage-spiflash-single-combined.s37 Click Open.

SILICON-LABS-Simplicity-Studio-6-Software- (24)

Now that both the application image and the bootloader are selected, check Erase Chip, to make sure that the main flash block is erased before your new image is uploaded. New users will typically always check this.

  • The After uploading options are Run (begin executing the code immediately) and Halt (wait for an event, such as a debugger to connect or manual initiation of a boot sequence). During initial development you will typically leave this set to Run.
  • The Flash options determine the storage location, and are Internal and External SPI. Leave the option set to Internal.

The completed dialog should resemble the following:SILICON-LABS-Simplicity-Studio-6-Software- (25)Klik OK.

Pengaturcara Flash

The Flash Programmer is a tool that provides a number of options for use when flashing images to a device. Select the Flash Programmer from the Tools button on the toolbar. Some perspectives have a button specifically for the Flash Programmer.

SILICON-LABS-Simplicity-Studio-6-Software- (26)

The Flash Programmer provides basic flash and erase functionality, but also allows you to lock parts of memory and enable or disable debug access.

SILICON-LABS-Simplicity-Studio-6-Software- (1)Flash Part
The Flash Programmer is configured to facilitate flashing .hex or .bin files.

SILICON-LABS-Simplicity-Studio-6-Software- (2)

To flash an image, browse to the image location. Note that the images you see are filtered by the extension drop-down to the right of the file name field.

SILICON-LABS-Simplicity-Studio-6-Software- (3)

  • Click Open and then click Program to flash the image.
  • By default, the Erase function erases the main page. Click Advanced Settings to change what is erased. Finally, if you have more than one device connected, click Change Device to select the target.
  • Flash Erase/Write Protection
  • Use these functions to protect or remove protection from a custom range, or default pages. SILICON-LABS-Simplicity-Studio-6-Software- (4)
  • Debug Lock Tools
  • Use these functions to unlock or lock debug access.

SBOM Generation

The Software Bill of Materials (SBOM) generation tool is integrated into Simplicity Studio and can parse SLC projects to generate a project report that lists all components and their relationships for Simplicity SDK 2024.12.0 or newer. An SBOM helps developers understand the software’s composition, ensuring that all components are accounted for and properly managed. SBOM generation is automatic and created in standard formats like CycloneDX and SPDX under each project build, e.g., ..\v5_workspace\bt_soc_thermometer\autogen\sbom.

Soalan Lazim

How do I generate a .gbl file if it's not available in the binary directory?

You can use Simplicity Commander to create a .gbl file. Commands from Simplicity Commander's CLI allow you to generate key files, sign application images for Secure Boot, and create GBL images.

Dokumen / Sumber

Perisian SILICON LABS Simplicity Studio 6 [pdf] Panduan Pengguna
Perisian Simplicity Studio 6, Perisian
Perisian SILICON LABS Simplicity Studio 6 [pdf] Panduan Pengguna
EFM32, SiWx91x, Simplicity Studio 6 Software, Software

Rujukan

Tinggalkan komen

Alamat e-mel anda tidak akan diterbitkan. Medan yang diperlukan ditanda *