SPRADS1 June 2025 F29H850TU
The flash-based SBL and FOTA_Example_Application can be combined to reduce the steps required to program these two projects into flash. This section details the source code and post build steps required to accomplish this.
First, the flash-based SBL project creates an output section that contains the FOTA_Example_Application data. In ex4_uart_sbl.c, the following code is used to create this empty section.
Figure 3-8 Output Section Creation in SBL
ProjectThe size of this output section can be modified based on the size of the application.
In the flash-based SBL linker file, several modifications to the available memory sections. The CPU1_FOTA, CPU3_FOTA, and so forth, memory sections correspond to the output sections created in the ex4_uart_sbl.c file. For example, the source code in Figure 3-9 is creating an output section for the CPU1 FOTA function.
Figure 3-9 Creating CPU1 FOTA Output
SectionThe CPU1_FOTA memory section is being populated with the CPU1_FOTA_ENTRY output section that was created in Figure 3-10.
Figure 3-10 Linker CMD File in SBLAdditionally, the CPU1_FLASH_RP0 section has been modified such that this does not overlap with any of the other sections. The CPU1_APP section is used to store the firmware section created in the flash-based SBL source code.
To populate the firmware section with the FOTA_Example_Application, refer to the post-build steps of both projects (right click the project -> Properties -> Build -> Steps). The post-build steps of the FOTA_Example_Application uses the C29 OBJCOPY tool to convert the compiled .out file into a .bin file.
Figure 3-11 FOTA_Example_Application
Post-Build StepOnce that is complete, the flash-based UART SBL project can be built. The post-build steps in the flash-based UART SBL project are as shown:
Figure 3-12 SBL Post-Build StepNow, flash_based_uart_sbl_with_fota.bin and flash_based_uart_sbl_with_fota.out contain both a valid X.509 certificate and the data from FOTA_Example_Application. The .out file can be loaded to the device via CCS and the .bin file can be loaded to the device via the UART flash kernel.