Can't reflash ST-Link dongle

Matias N. matias at imap.cc
Mon Mar 25 23:47:57 CET 2019


Actually, I found the image I originally flashed the first time I used gnuk (version 1.2.8) and it worked perfectly. It seems that I cannot build a valid .bin image. I'm on Ubuntu 18.04, btw. Anyone else had any problems creating a good binary for the st-link dongle?

On Mon, Mar 25, 2019, at 18:29, Matias N. wrote:
> Hi,
> I was using gnuk on my st-link dongle for some time. I tried to update using gnuk scripts and my board stopped responding. Since I figured I messed up doing this I went ahead and recompiled gnuk and flashed using another st-link dongle. Flashing works however onces re-plugged the device cannot reenumerate. I get:
> 
> [531046.370438] usb usb3-port4: unable to enumerate USB device
> [531051.092809] usb 3-3: USB disconnect, device number 14
> [531058.670516] usb 3-4: new full-speed USB device number 39 using xhci_hcd
> [531058.798583] usb 3-4: device descriptor read/64, error -71
> [531059.034586] usb 3-4: device descriptor read/64, error -71
> [531059.270525] usb 3-4: new full-speed USB device number 40 using xhci_hcd
> [531059.398550] usb 3-4: device descriptor read/64, error -71
> [531059.638560] usb 3-4: device descriptor read/64, error -71
> [531059.746567] usb usb3-port4: attempt power cycle
> [531060.398516] usb 3-4: new full-speed USB device number 41 using xhci_hcd
> [531060.398622] usb 3-4: Device not responding to setup address.
> 
> Since I figured maybe I failed programming, I downloaded a DFU binary configured for the led on PA9 (as is the case for this dongle) and this works perfectly (right after flashing, the LED starts to blink). So, I'm thinking this could be a problem then with the gnuk binary I'm obtaining. I tried with lastest release and also with the version I had, 1.2.8.
> 
> I'm doing (for 1.2.8):
> ./configure --vidpid=234b:0000 --target=ST_DONGLE
> make build/gnuk-vidpid.bin
> openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "flash write_image erase build/gnuk-vidpid.bin 0x08000000" -c "verify_image build/gnuk-vidpid.bin" -c "reset run" -c "shutdown"
> 
> I'm not sure if this is due to the board not being in reset or something (since the dongle does not have the reset pin mapped). However, if that's the case, I don't understand why flashing the DFU binary works.
> 
> Maybe I could ask if someone can send me a precompiled (working) binary for the ST-link dongle so I can try and flash that.
> 
> Thanks,
> Matias
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnuk-users/attachments/20190325/fa164e95/attachment.html>


More information about the Gnuk-users mailing list