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.
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-allandextract-peripheralwork slightly different, resulting in inconsistent output.For example, the
generatecommand usessvd2ir::convert_svdwhilstextract_allandextract_peripheralusesvd2ir::convert_peripheral. In order to generate correct code,svd2ir::convert_svdadds 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.