Supporting STM32F407G-DISC1 - how to contribute?

I have a Discovery board, model STM32F407G-DISC1. This is a newer version of the STM32F4DISCOVERY which PlatformIO already supports; it has an identical processor and peripherals but a newer onboard STLink. The ST web site calls it “ST-LINK/V2-A” but it appears to be a variant of STLINK/V2-1. I can build and upload to the device just fine using the STM32F4DISCOVERY board definition in PlatformIO but I can’t debug the device because PlatformIO thinks it’s an STLINK/V2 (not 2-1) and can’t connect.

I looked at what it would take to add complete support for this board to PlatformIO and I found the existing board file which I can just copy, modify, and submit a pull request for. But in that file I need to specify a new board script (that points to the stlink-v2-1 interface) for OpenOCD in this line: "arguments": ["-f", "scripts/board/stm32f4discovery.cfg"] and I’m not sure which source repo that belongs in.

I verified that these two changes allow me to successfully debug the board on my machine. Now I’d like to contribute it back to the project.

So, two questions:

  1. What name would be appropriate for the new PlatformIO board file? The old one is disco_f407vg.json, so the new one should be disco_f407vg_1.json, maybe?
  2. Where would I go to submit a pull request for a new OpenOCP board file (named stm32f407g-disc1.cfg, presumably)?
1 Like

I am wondering that , thanks for asking

Newer versions of OpenOCD have unified the stlink.cfg file to unify all STLinks. Does this currently not work? What error are you getting?