Skip to content

Commit

Permalink
[dfg] Fix CM4 core type for STM32H7 dual-core devices
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-durand committed Apr 9, 2022
1 parent a4e2829 commit 0a9ac35
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion devices/stm32/stm32h7-45_55.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<valid-device>stm32h755zit7@m4</valid-device>
<valid-device>stm32h755zit7@m7</valid-device>
<driver name="core">
<attribute-type device-core="m4" value="cortex-m4fd"/>
<attribute-type device-core="m4" value="cortex-m4f"/>
<attribute-type device-core="m7" value="cortex-m7fd"/>
<memory device-core="m7" name="itcm" access="rwx" start="0x00" size="65536"/>
<memory device-size="g" name="flash" access="rx" start="0x8000000" size="1048576"/>
Expand Down
2 changes: 1 addition & 1 deletion devices/stm32/stm32h7-47_57.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<valid-device>stm32h757ziy6@m4</valid-device>
<valid-device>stm32h757ziy6@m7</valid-device>
<driver name="core">
<attribute-type device-core="m4" value="cortex-m4fd"/>
<attribute-type device-core="m4" value="cortex-m4f"/>
<attribute-type device-core="m7" value="cortex-m7fd"/>
<memory device-core="m7" name="itcm" access="rwx" start="0x00" size="65536"/>
<memory device-size="g" name="flash" access="rx" start="0x8000000" size="1048576"/>
Expand Down
2 changes: 1 addition & 1 deletion tools/generator/dfg/stm32/stm_device_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _properties_from_partname(partname):
def _properties_from_id(comboDeviceName, device_file, did, core):
if core.endswith("m4") or core.endswith("m7") or core.endswith("m33"):
core += "f"
if did.family in ["h7"] or (did.family in ["f7"] and did.name not in ["45", "46", "56"]):
if (did.family in ["h7"] and "m7" in core) or (did.family in ["f7"] and did.name not in ["45", "46", "56"]):
core += "d"
if "@" in did.naming_schema:
did.set("core", core[7:9])
Expand Down

0 comments on commit 0a9ac35

Please sign in to comment.