Skip to content

M302: Size of Register must be 8, 16 or 32 Bits #237

@kossnikita

Description

@kossnikita

From CMSIS SVDConv docs

Message Number Type Message Text
M302 ERROR Size of Register 'NAME':'NUM' must be 8, 16 or 32 Bits

This limitation is not obvious to me. For example, it is easier to create a 12-bit register for a 12-bit ADC than a 32-bit register with only one field.
svd2rust handles this by creating an unsafe method for working with such registers. But CMSIS prohibits such svd files. Should utilities handle this error?

Metadata

Metadata

Assignees

No one assigned

    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