SPRU514Z July 2001 – October 2023 SM320F28335-EP
High-availability systems may need to be designed so that the firmware can be upgraded without taking the system offline. Examples include systems for data centers, hospitals, and military applications. The ability to update system firmware and start using the new firmware while a system is running is called Live Firmware Update (LFU), which is also called a "warm" start. For information about creating and calling a custom entry point to perform the warm start, see Live Firmware Update Reference Design with C2000 MCUs (TIDUEY4).
The C28x and CLA compilers provide LFU support for ELF-based firmware images, which use EABI. This support allows you to switch over to a new LFU image while choosing whether to preserve, update (re-initialize), or add individual global and static symbols read in from a reference ELF binary.
To support LFU, code generation tools need to ensure that no system reset occurs during an update, no real-time interrupts are missed, and the system state (global and static variables) can be maintained. Both program and data memory of the firmware image may need to be updated. Global and static variables may be handled in the following ways during a warm start:
.TI.bound
section. If the .TI.bound sections
are contiguous in memory, the linker can coalesce them into a single output
section, which reduces the number of CINIT records required to initialize them.
(This is the default if neither --lfu_default nor an attribute is used to
specify otherwise. However, this default does not apply to constant data, which
requires an explicit use of the preserve attribute.).TI.update
output section. This section defaults to copy compression (that is, no
decompression is required during a warm start), which reduces the LFU image
switchover time.--lfu_default=none
option is used and a global or static
variable has neither the "preserve" nor "update" attribute.The following limitations apply to using LFU support:
Features provided to support LFU functionality include:
--lfu_reference_elf
compiler option, which points to the
previous ELF executable binary to use as a reference to obtain a list of the
memory addresses of global and static symbols. See Section 2.3.--lfu_default
compiler option, which may be used to set the
default for how global and static symbols are handled during a warm start. See
Section 2.3.preserve
attribute, which can be used in C code to specify that the address of an
individual symbol should be preserved. See Section 6.15.4. update
attribute, which can be used in C code to specify that an individual symbol
should be re-initialized during a warm start. See Section 6.15.4.