mcuboot icon indicating copy to clipboard operation
mcuboot copied to clipboard

Clarification on TLV type data size

Open loopj opened this issue 3 months ago • 0 comments

Hey folks!

In the design document the image_tlv.it_type is uint8_t:

/** Image trailer TLV format. All fields in little endian. */
struct image_tlv {
    uint8_t  it_type;   /* IMAGE_TLV_[...]. */
    uint8_t  _pad;
    uint16_t it_len;    /* Data length (not including TLV header). */
};

But imgtool seems to explicitly allow creation/parsing of uint16_t TLV IDs, such as 0xABCD.

Is this discrepancy intentional? I'm curious if it is safe to use 16-bit TLD IDs for my custom TLVs?

loopj avatar Aug 28 '25 16:08 loopj