From 186a4e1ec3e8062ac6a7f083ff78d360d5de3ffe Mon Sep 17 00:00:00 2001 From: Niklas Hauser Date: Sat, 10 Jan 2026 00:55:41 +0100 Subject: [PATCH 1/2] [dfg] Remove resolved fixed of DFP data --- tools/generator/dfg/stm32/stm.py | 14 +------------- tools/generator/dfg/stm32/stm_device_tree.py | 2 -- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/tools/generator/dfg/stm32/stm.py b/tools/generator/dfg/stm32/stm.py index f4c4a809..a486de44 100644 --- a/tools/generator/dfg/stm32/stm.py +++ b/tools/generator/dfg/stm32/stm.py @@ -489,11 +489,7 @@ def fixMemoryForDevice(did, memories: dict[str, dict], header) -> list[dict]: mems[name] = data # Correct memories for specific devices - if did.string.startswith("stm32l083"): - # https://github.com/Open-CMSIS-Pack/STM32L0xx_DFP/pull/2 - mems["sram"]["size"] = 0x00005000 - - elif did.family == "f2": + if did.family == "f2": # Split SRAM1 into SRAM1/2 mems["sram1"] = mems.pop("sram") add_ram(mems, "sram2", 16*1024, target="sram1") @@ -527,10 +523,6 @@ def fixMemoryForDevice(did, memories: dict[str, dict], header) -> list[dict]: # Fix missing alias, ITCM_FLASH is faster mems["flash"]["alias"] = "itcm_flash" - elif did.string.startswith("stm32g0b0vet"): - # https://github.com/Open-CMSIS-Pack/STM32G0xx_DFP/pull/3 - mems["sram"]["size"] = 0x00024000 - elif did.family == "g4": # Fix missing CCM and SRAM2 sizes = header.get_memory_sizes() @@ -559,10 +551,6 @@ def fixMemoryForDevice(did, memories: dict[str, dict], header) -> list[dict]: d2_sram2, d2_sram3 = 128, 32 # CM4 also missing d3_SRAM mems["d3_sram"] = {"start": 0x38000000, "size": 64*1024, "access": "rwx"} - # STM32H755/57 has the wrong size d2_sram1 - if did.name in ["55", "57"] and did.get("core") == "m4": - # https://github.com/Open-CMSIS-Pack/STM32H7xx_DFP/pull/7 - mems["d2_sram1"]["size"] = 0x40000 if d2_sram3: add_ram(mems, "d2_sram3", d2_sram3*1024, target="d2_sram1") if d2_sram2: add_ram(mems, "d2_sram2", d2_sram2*1024, target="d2_sram1") diff --git a/tools/generator/dfg/stm32/stm_device_tree.py b/tools/generator/dfg/stm32/stm_device_tree.py index 782f69e0..2bfd524f 100644 --- a/tools/generator/dfg/stm32/stm_device_tree.py +++ b/tools/generator/dfg/stm32/stm_device_tree.py @@ -119,8 +119,6 @@ def dfp_findall(key, attribs=None): # Find the correct CMSIS header dfp_compile = dfp_findall("compile")[0].get("define") p["cmsis_header"] = cmsis_header = dfp_folder[:-4].lower() - # https://github.com/Open-CMSIS-Pack/STM32H7xx_DFP/pull/7 - if did.string == "stm32h730ibt6q": dfp_compile = "STM32H730xxQ" stm_header = STMHeader(did, cmsis_header, dfp_compile) if not stm_header.is_valid: LOGGER.error("CMSIS Header invalid for %s", did.string) From 66ad1e82ad4d1030813dee0f5b117b805598e2d1 Mon Sep 17 00:00:00 2001 From: Niklas Hauser Date: Sat, 10 Jan 2026 00:51:05 +0100 Subject: [PATCH 2/2] [dfg] Fix STM32H5 peripherals --- devices/stm32/stm32h5-03.xml | 13 +++++++----- devices/stm32/stm32h5-23_33.xml | 16 ++++++++------ devices/stm32/stm32h5-62_63_73.xml | 16 ++++++++------ devices/stm32/stm32u5-35_45.xml | 2 +- devices/stm32/stm32u5-75_85.xml | 2 +- devices/stm32/stm32u5-95_99_a5-.xml | 2 +- devices/stm32/stm32u5-95_99_a5_a9-q.xml | 2 +- devices/stm32/stm32u5-f7_f9_g7_g9-q.xml | 2 +- devices/stm32/stm32u5-f7_g7-.xml | 2 +- tools/generator/dfg/stm32/stm_peripherals.py | 22 ++++++++++++++------ 10 files changed, 50 insertions(+), 29 deletions(-) diff --git a/devices/stm32/stm32h5-03.xml b/devices/stm32/stm32h5-03.xml index f4a7efda..345d9f2e 100644 --- a/devices/stm32/stm32h5-03.xml +++ b/devices/stm32/stm32h5-03.xml @@ -94,7 +94,7 @@ - + @@ -150,7 +150,9 @@ - + + + @@ -178,13 +180,13 @@ - + - + @@ -204,7 +206,8 @@ - + + diff --git a/devices/stm32/stm32h5-23_33.xml b/devices/stm32/stm32h5-23_33.xml index d5f596af..fa24bf1a 100644 --- a/devices/stm32/stm32h5-23_33.xml +++ b/devices/stm32/stm32h5-23_33.xml @@ -146,7 +146,7 @@ - + @@ -213,7 +213,9 @@ - + + + @@ -247,7 +249,7 @@ - + @@ -257,7 +259,7 @@ - + @@ -284,14 +286,16 @@ - + + - + + diff --git a/devices/stm32/stm32h5-62_63_73.xml b/devices/stm32/stm32h5-62_63_73.xml index 149982c1..a4f8990c 100644 --- a/devices/stm32/stm32h5-62_63_73.xml +++ b/devices/stm32/stm32h5-62_63_73.xml @@ -198,7 +198,7 @@ - + @@ -269,7 +269,9 @@ - + + + @@ -307,7 +309,7 @@ - + @@ -322,7 +324,7 @@ - + @@ -355,7 +357,8 @@ - + + @@ -366,7 +369,8 @@ - + + diff --git a/devices/stm32/stm32u5-35_45.xml b/devices/stm32/stm32u5-35_45.xml index 927aa549..aedea294 100644 --- a/devices/stm32/stm32u5-35_45.xml +++ b/devices/stm32/stm32u5-35_45.xml @@ -185,7 +185,7 @@ - + diff --git a/devices/stm32/stm32u5-75_85.xml b/devices/stm32/stm32u5-75_85.xml index 62ee1b1b..063a718f 100644 --- a/devices/stm32/stm32u5-75_85.xml +++ b/devices/stm32/stm32u5-75_85.xml @@ -209,7 +209,7 @@ - + diff --git a/devices/stm32/stm32u5-95_99_a5-.xml b/devices/stm32/stm32u5-95_99_a5-.xml index 91f634f3..91d4584f 100644 --- a/devices/stm32/stm32u5-95_99_a5-.xml +++ b/devices/stm32/stm32u5-95_99_a5-.xml @@ -182,7 +182,7 @@ - + diff --git a/devices/stm32/stm32u5-95_99_a5_a9-q.xml b/devices/stm32/stm32u5-95_99_a5_a9-q.xml index 014cd07f..98a21334 100644 --- a/devices/stm32/stm32u5-95_99_a5_a9-q.xml +++ b/devices/stm32/stm32u5-95_99_a5_a9-q.xml @@ -199,7 +199,7 @@ - + diff --git a/devices/stm32/stm32u5-f7_f9_g7_g9-q.xml b/devices/stm32/stm32u5-f7_f9_g7_g9-q.xml index 6a584d04..4db8cc95 100644 --- a/devices/stm32/stm32u5-f7_f9_g7_g9-q.xml +++ b/devices/stm32/stm32u5-f7_f9_g7_g9-q.xml @@ -187,7 +187,7 @@ - + diff --git a/devices/stm32/stm32u5-f7_g7-.xml b/devices/stm32/stm32u5-f7_g7-.xml index e5d631bd..ba8250f1 100644 --- a/devices/stm32/stm32u5-f7_g7-.xml +++ b/devices/stm32/stm32u5-f7_g7-.xml @@ -169,7 +169,7 @@ - + diff --git a/tools/generator/dfg/stm32/stm_peripherals.py b/tools/generator/dfg/stm32/stm_peripherals.py index dc011046..1490cd17 100644 --- a/tools/generator/dfg/stm32/stm_peripherals.py +++ b/tools/generator/dfg/stm32/stm_peripherals.py @@ -45,6 +45,11 @@ 'features': [], 'protocols': ['analog-in'], 'devices': [{'family': ['h7']}] + },{ + 'hardware': 'stm32-h5', + 'features': [], + 'protocols': ['analog-in'], + 'devices': [{'family': ['h5', 'u5']}] },{ 'hardware': 'stm32', 'features': [], @@ -135,7 +140,7 @@ 'hardware': 'stm32-mux-stream', 'features': [], 'protocols': ['mem2mem', 'mem2per', 'per2per'], - 'devices': [{'family': ['h7']}] + 'devices': [{'family': ['h5', 'h7']}] }, { 'hardware': 'stm32-stream-channel', @@ -164,7 +169,7 @@ 'hardware': 'stm32h7', 'features': [], 'protocols': ['mem2mem', 'mem2per', 'per2per'], - 'devices': [{'family': ['h7']}] + 'devices': [{'family': ['h5', 'h7']}] } ] @@ -197,7 +202,7 @@ 'hardware': 'stm32-extended', 'features': [], 'protocols': [], - 'devices': [{'family': ['h7', 'u5']}] + 'devices': [{'family': ['h5', 'h7', 'u5']}] },{ 'hardware': 'stm32', 'features': [], @@ -405,7 +410,7 @@ 'hardware': 'stm32-extended', 'features': ['dnf', 'fmp'], 'protocols': ['i2c-v3.0', 'smb-v2.0', 'pmb-v1.1'], - 'devices': [{'family': ['c0', 'f3', 'f7', 'l4', 'l5', 'h7', 'g4', 'u5', 'wb']}] + 'devices': [{'family': ['c0', 'f3', 'f7', 'l4', 'l5', 'h5', 'h7', 'g4', 'u5', 'wb']}] } ] },{ @@ -417,7 +422,7 @@ 'hardware': 'stm32-extended', 'features': ['dnf', 'fmp'], 'protocols': ['i2c-v3.0', 'smb-v2.0', 'pmb-v1.1'], - 'devices': [{'family': ['c0', 'f0', 'g0', 'f3', 'f7', 'l0', 'l4', 'l5', 'h7', 'g4', 'u0', 'u5', 'wb']}] + 'devices': [{'family': ['c0', 'f0', 'g0', 'f3', 'f7', 'l0', 'l4', 'l5', 'h5', 'h7', 'g4', 'u0', 'u5', 'wb']}] } ] } @@ -440,6 +445,11 @@ 'features': [], 'protocols': ['uart'], 'devices': [{'family': ['f7', 'l4']}] + },{ + 'hardware': 'stm32-extended', + 'features': ['over8'], + 'protocols': ['uart', 'spi'], + 'devices': [{'family': ['l0', 'h5']}] },{ 'hardware': 'stm32', 'features': ['over8'], @@ -475,7 +485,7 @@ 'hardware': 'stm32-extended', 'features': ['over8'], 'protocols': ['uart', 'spi'], - 'devices': [{'family': ['l0']}] + 'devices': [{'family': ['l0', 'h5']}] },{ 'hardware': 'stm32', 'features': ['over8'],