diff --git a/devices/stm32/stm32f0-30.xml b/devices/stm32/stm32f0-30.xml index 6b5fda3d..f008ac2a 100644 --- a/devices/stm32/stm32f0-30.xml +++ b/devices/stm32/stm32f0-30.xml @@ -417,210 +417,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/devices/stm32/stm32f0-70.xml b/devices/stm32/stm32f0-70.xml index 2e7a8b7c..911065b3 100644 --- a/devices/stm32/stm32f0-70.xml +++ b/devices/stm32/stm32f0-70.xml @@ -200,7 +200,6 @@ - @@ -212,63 +211,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/devices/stm32/stm32f0-71.xml b/devices/stm32/stm32f0-71.xml index 530a4040..3cee67f8 100644 --- a/devices/stm32/stm32f0-71.xml +++ b/devices/stm32/stm32f0-71.xml @@ -237,7 +237,6 @@ - diff --git a/devices/stm32/stm32f0-72.xml b/devices/stm32/stm32f0-72.xml index 31d3615a..d9dc1fb3 100644 --- a/devices/stm32/stm32f0-72.xml +++ b/devices/stm32/stm32f0-72.xml @@ -248,7 +248,6 @@ - diff --git a/devices/stm32/stm32f0-78.xml b/devices/stm32/stm32f0-78.xml index 4b83954a..a0fd5778 100644 --- a/devices/stm32/stm32f0-78.xml +++ b/devices/stm32/stm32f0-78.xml @@ -231,7 +231,6 @@ - diff --git a/devices/stm32/stm32f1-00-4_6.xml b/devices/stm32/stm32f1-00-4_6.xml index 51f44558..ae6e5f7f 100644 --- a/devices/stm32/stm32f1-00-4_6.xml +++ b/devices/stm32/stm32f1-00-4_6.xml @@ -144,7 +144,6 @@ - diff --git a/devices/stm32/stm32f1-00-8_b.xml b/devices/stm32/stm32f1-00-8_b.xml index 2d3328a0..01715e37 100644 --- a/devices/stm32/stm32f1-00-8_b.xml +++ b/devices/stm32/stm32f1-00-8_b.xml @@ -159,7 +159,6 @@ - diff --git a/devices/stm32/stm32f1-00-c_d_e.xml b/devices/stm32/stm32f1-00-c_d_e.xml index 9ff54915..812490ea 100644 --- a/devices/stm32/stm32f1-00-c_d_e.xml +++ b/devices/stm32/stm32f1-00-c_d_e.xml @@ -179,7 +179,6 @@ - diff --git a/devices/stm32/stm32f3-73_78.xml b/devices/stm32/stm32f3-73_78.xml index b23f8e97..bffac061 100644 --- a/devices/stm32/stm32f3-73_78.xml +++ b/devices/stm32/stm32f3-73_78.xml @@ -277,12 +277,6 @@ - - - - - - diff --git a/tools/generator/dfg/stm32/stm_device_tree.py b/tools/generator/dfg/stm32/stm_device_tree.py index 379b28c2..c2095fec 100644 --- a/tools/generator/dfg/stm32/stm_device_tree.py +++ b/tools/generator/dfg/stm32/stm_device_tree.py @@ -324,6 +324,26 @@ def rv(param, default=[]): # print(instance, stream, channel) # print(signal) + # Manually handle condition expressions from XML for + # (STM32F030CCTx|STM32F030RCTx) and (STM32F070CBTx|STM32F070RBTx) + if did.family in ['f0']: + if (did.name == '30' and did.size == 'c'): + dma_streams['1'].pop('6') + dma_streams['1'].pop('7') + dma_streams.pop('2') + if (did.name == '70' and did.size == 'b'): + dma_streams['1'].pop('6') + dma_streams['1'].pop('7') + + # De-duplicate DMA signal entries + def deduplicate_list(l): + return [i for n, i in enumerate(l) if i not in l[n + 1:]] + for stream in dma_streams: + for channel in dma_streams[stream]: + for signal in dma_streams[stream][channel]: + dma_streams[stream][channel][signal] = deduplicate_list( + dma_streams[stream][channel][signal]) + # if p["dma_naming"][1] == "request": # print(did, dmaFile.filename) p["dma"] = dma_streams