Firmware Marking

There are four editable fields – secure_version, project_version, project_name, and App version, and two non-editable fields – idf_ver and Compile time and date.

  • secure_version: used to set the secure version of the chip. The secure version number is stored in eFuse and can mark up to 16 versions. The way to enable it is as follows:

    (Top) → Bootloader config
    ...
    ...
    [*] Enable app rollback support
    [*]     Enable app anti-rollback support
    (0)         eFuse secure version of app (NEW)
    (16)        Size of the eFuse secure version field (NEW)
    ...
    ...
    
  • project_version: used to set the project version. The way to enable it is as follows:

    (Top) → Application manager
    ...
    ...
    [*] Get the project version from Kconfig
    (1)     Project version
    ...
    ...
    
  • project_name: the project name is set in the CMakeLists.txt file under the project directoey. Take the advanced_https_ota project as an example, the way to enable the field is as follows:

    ...
    ...
    include($ENV{IDF_PATH}/tools/cmake/project.cmake)
    project(advanced_https_ota)
    ...
    ...
    

    project(X) is the name of the marked project.

  • Compile time and date and idf_ver (ESP-IDF Version) will be assigned automatically during compilation with the following log printed:

    ...
    ...
    I (304) cpu_start: Compile time:     Mar  14   2022   18 : 44 : 58
    I (316) cpu_start: ESP-IDF:           v4.3.2
    ...
    ...
    

Both the secure version number and project version number can be used to mark firmware version information but with different focuses and realizations. The secure version number is written in the chip's eFuse. It cannot be changed once written and only higher versions of firmware are allowed to be written to the chip afterward, making it possible to manage the major updates safely and effectively. As major updates are generally related to security, such version numbers are called secure version numbers. The project version number is stored in flash along with the firmware and can be changed at will during each compilation. The device does not actively check this information during updates, and its usage is entirely determined by the developer. In practical development applications, due to the usage limit of the secure version number, an update of the secure version number is generally defined as containing major functional updates and fixing security bugs, while the update of the project version number is used as a business-level functional update.