Skip to content

Clarification on TLV type data size #2438

@loopj

Description

@loopj

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions