DAPLink icon indicating copy to clipboard operation
DAPLink copied to clipboard

Gang-programming support?

Open raveslave opened this issue 3 years ago • 3 comments

For larger panels in production, but also useful for in-system-programming >1 mcu via SWD (when you don't trust your boot-loaders), it would be useful if we could get gang-programming support in DAPLink.

there is a cool project called http://cortexprog.com that can do this amongst many other things

raveslave avatar Jan 11 '21 01:01 raveslave

From a JTAG standpoint this would be daisy chaining? @flit how does daplink currently handle this for a target like psoc6 with two cores?

40Grit avatar Jan 11 '21 02:01 40Grit

cortexprog's gang programming is referring to the ability to use multiple debug probes. I know pyocd will let you choose between multiple CMSIS-DAP probes based on the USB serial descriptor string reported by the probe. Although many MCUs have some form of a UUID, it's not part of the Cortex-M spec AFAIK, so it would be dependant on the specific MCU that DAPLink is running on.

nerdralph avatar Jan 21 '21 21:01 nerdralph

You might be able to use JTAG daisy chaining for gang programming, but it would be better to have a multiplexer or multiple IOs. Otherwise the operator wouldn't be able to hot swap boards as they complete programming, since the JTAG chain couldn't be broken.

For multicore devices, except some outliers like the LPC43xx and Raspberry Pi Pico, there is a single DP with multiple APs. In other words, a single SWD or JTAG connection (a DP equates to a TAP when using JTAG).

It's not entirely clear to me whether a gang programmer would best be a separate project, or if it could be integrated into DAPLink. Currently I'm leaning towards a separate project. In fact, you could do it all from the host with multiple probes connected to a USB hub, controlled by a gang-programmer application.

flit avatar Jan 28 '21 22:01 flit