ARMmbed / DAPLink

https://daplink.io
Apache License 2.0
2.32k stars 977 forks source link

program a DAPlink with a DAPlink via drag&drop #934

Closed nikiwaibel closed 2 years ago

nikiwaibel commented 2 years ago

is it possible to program a DAPlink with another DAPlink via drag&drop?

i've just seen in the code that _bl and _if images are detected and flashed to the device itself.

i wonder if there is a way to use a DAPlink to flash the _bl and _if images to another DAPlink when using the drag&drop method.

(i am using the develop branch, as i use GCC)

elfmimi commented 2 years ago

Technically yes. Practically, it is mostly no. It is possible only when the operating DAPLink and the target DAPLink are equipped with certain combination of MCUs.

stm32f103xb programming stm32f103xb is one example that is possible.

nikiwaibel commented 2 years ago

really? i've tried this with stm32f103xb_bl and stm32f103xb_stm32f103rb_if (develop branch builds) without success, when using the drag&drop-usb interface. it tried to update itself, but not the connected other daplink hardware.

the only way it worked (to program the connected other daplink) was to use the daplink-usb interface with openocd and

source [find interface/cmsis-dap.cfg]
transport select swd
source [find target/stm32f1x.cfg]
reset_config srst_only

custom script …

elfmimi commented 2 years ago

Right! Now that you mentioned it, I know I told you a lie. Unless some modification are introduced, the operating DAPLink and the target DAPLink must be from different family. (could be still inaccurate here.)

mathias-arm commented 2 years ago

@elfmimi is correct, if you drag-n-drop a DAPLink bootloader for the same chip, it will try to update the probe's bootloader not flash the target. The two options to work-around that have been mentioned: