The footprint worked out okay using the Array function to create the 2 sets of twin parallel headers, 44 pin each.
I couldn't get KiCad to prefix them A and B so I ended up with 2 of each pin.
I rummaged in the tool box and came back with some bash and perl:
cat MCUDev_STM32H7.kicad_mod | perl -e '$suf="B"; while(<STDIN>){ s/\(pad \"([0-9]+)\"/(pad \"${suf}${1}\"/g; print; if( $suf eq "A" ){ $suf = "B" }else{ $suf="A";} }' > MCUDev_STM32H7_2.kicad_mod
This gave me two banks of 44 pins A1, A2, A3... B1, B2, B3. The 2.54mm spacing is easy. It looks like they have snapped the header to the edge cut, so, as long as my 2 banks are spaced correctly and the board is the right size it should
fit.
Then for the symbol. I added a few pins manually, thought, "sod that". Asked ChatGPT to do it for me and got bored watching it try in the old Kicad syntax and decided I could probably do it faster myself.
I found the pin headers in text format, here:
https://stm32-base.org/boards/STM32H743VIT6-STM32H7XX-MSo another rummage in the tool box and came back with PyCharm and Python.
import re
template = """
(
pin unspecified line (at -2.54 {0!s} 0)(length 2.54)
(name "{1!s}" (effects (font (size 1.27 1.27))))
(number "A{2!s}" (effects (font (size 1.27 1.27))))
)
"""
bank_a_string_lines = """1 3V3 - +3.3V rail
2 3V3 - +3.3V rail
3 GND - Ground plane
4 GND - Ground plane
5 VDDA - VDDA
6 VREF+ - VREF+
7 PB15 - PB15
.... SNIP.....
44 PE2 - PE2
"""
bank_b_string_lines = """1 5V - +5V rail
2 5V - +5V rail
3 3V3 - +3.3V rail
4 3V3 - +3.3V rail
5 GND - Ground plane
6 GND - Ground plane
7 PD9 - PD9
...SNIP...
44 PE0 - PE0
"""
ypos = -2.54
for line in bank_a_string_lines.splitlines():
parts = re.split(r'[\t ]+', line)
print(template.format(ypos, parts[1], parts[0]))
ypos = round(ypos-2.54,2)
template = """(
pin unspecified line (at 10.0 {0!s} 180)(length 2.54)
(name "{1!s}" (effects (font (size 1.27 1.27))))
(number "B{2!s}" (effects (font (size 1.27 1.27))))
)"""
ypos = -2.54
for line in bank_b_string_lines.splitlines():
parts = re.split(r'[\t ]+', line)
print(template.format(ypos, parts[1], parts[0]))
ypos = round(ypos-2.54,2)
[/size]
That should get me started. The next thing I might need to script is adding the 90% of "Not connected" flags in the schematic.
I still think it's easier than first finding an STM32H7 of the right flavour and creating the full schematic for it, and solder it etc. I already have a pretty compact set of modules that don't take up much more room than a bespoke layout, especially when I butcher it with 0805s and 10mm xtals.
Just thought I'd share. I'm sure others come up with the sheer labour of making footprints and symbols for a large number of pins.