Skip to content

imgtool: erased values should be omitted in trailer #1288

@wcappelle

Description

@wcappelle

When generating an image with trailer (--pad or --confirm), the imgtool also adds the erased values into that area:

19841 :020000040807EB
19842 :10FFE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF21
19843 :10FFF00077C295F360D2EF7F3552500F2CB67980DF
19844 :00000001FF

This is not wanted because on MCU's which use ECC into their flash, will write the erased values, and compute an ECC on these values. The flash driver even does this on 0XFF (erased) values. Since the ECC of the 0XFF... value is not 0XFF, this will be written to the ECC location in flash, which will prevent the next write to fail since ECC cannot be overwritten.

This leads to various problems in mcuboot/mcuboot lib which uses the image trailer, like the writing of the image_ok or any other flag in the trailer fails because the values can not be (re-)written.

The STM32L5 MCU is affected by this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions