{% for line in ir.license_text | prepend_lines(prefix="# ") -%} {{line}} {% endfor -%} # Generated from SVD {{ir.version}}, with svd2pac {{svd2pac_version}} on {{now}} [package] name = "{{package_name}}" version = "0.0.1" authors = ["Infineon developers"] edition = "2021" rust-version = "1.64" description = "{{description}}" keywords = ["no_std", "infineon"{%- if target=="Aurix" -%}, "aurix"{%- endif -%}] categories = ["embedded","hardware-support","no-std","no-std::no-alloc"] license-file = "LICENSE.txt" [lib] test = false bench = false {% if tracing or target=="CortexM"%} [dependencies] {%- endif %} {%- if tracing %} phf = { version = "0.11", features = ["macros"], optional = true } {%- endif %} {%- if target=="CortexM" %} cortex-m-rt= { version = "0.7", optional = true } cortex-m = "0.7.6" {%- endif %} [features] {%- set_global all_peripheral_features = [] -%} {# array of all features #} {%- for peri_mod_name, peri in ir.device.peripheral_mod %} {%- set feature_name = peri.name | lower -%} {% set_global all_peripheral_features = all_peripheral_features | concat(with=feature_name) %} {{feature_name}} = [{%- if peri.derived_from is string %} "{{peri.derived_from | lower}}" {% endif %}] {%- endfor %} {% if ir_csfr %} {%- for peri_mod_name, peri in ir_csfr.device.peripheral_mod %} {%- set feature_name = peri.name | lower %} {{feature_name}} = [] {%- endfor %} {%- endif %} {# collect all module id and remove duplicated#} {%- set_global all_peripheral_features = all_peripheral_features | unique -%} all = ["{{all_peripheral_features | join(sep='" ,"')}}"] {%- if tracing %} tracing = ["dep:phf"] tracing_dummy = [] {%- endif %} {%- if target=="CortexM" %} rt = ["cortex-m-rt/device"] {%- endif %} [package.metadata.docs.rs] features = ["all"{% if target=="CortexM" %},"rt"{%endif%}]