Skip to content

Incompatible differences in commands #99

@Wassasin

Description

@Wassasin

For nxp-pac we are slowly migrating to a more stm32-metapac style of generating the code from extracted data, instead of directly generating the code from the SVD. During migration I had the following issue:

The commands generate, extract-all and extract-peripheral work slightly different, resulting in inconsistent output.

For example, the generate command uses svd2ir::convert_svd whilst extract_all and extract_peripheral use svd2ir::convert_peripheral. In order to generate correct code, svd2ir::convert_svd adds extra module namespaces in the form of 'regs' and 'vals' to names.

You can clearly note the PAC's generated directly and PAC's that use extraction and then manually generating code by the presence of these names in the namespaces. As an additional consequence, files with transforms for generation may not be directly usable when extracting.

Making it more consistent may require the commands to optionally fall back to their older behaviour.

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