Hi, openocd is not able to connect to target, and there are many possible reasons for that. Usually it’s not either finding the USB device, openocd is not compiled with the support for the adapter, or permissions when trying to access it.
You can extract the openocd command from the BSP debug script, and try running it with more debug output. This sometimes gives more data about the cause of the failure. openocd -f board/stm32f3discovery.cfg -c init -d 3 If ST-Link is not supported, the output should tell you that. Check that you OS can see the debug port: —8<---- [marko@ubuntu:~]$ lsusb | grep ST Bus 002 Device 009: ID 0483:3748 STMicroelectronics ST-LINK/V2 —8<—— If it does, then try running openocd as root; if this succeeds then it’s an issue with device permissions. Hope this helps, M > On Aug 17, 2016, at 8:23 AM, Pradeep Sanjeewa <[email protected]> wrote: > > Hi, > > I'm trying to run blinky on stm32f303 discovery board. > But I get the the following error, when I try to upload the bootloader to > board. > > Can someone tell me what is the reason for that? > > sanjeewa@SanjeewaPC:~/dev/withoutAnyChange/stm32f3$ newt -v load stmf3_boot > Loading image > Load command: > /home/sanjeewa/dev/withoutAnyChange/stm32f3/repos/mynewt_stm32f3/hw/bsp/stm32f3discovery/stm32f3discovery_download.sh > /home/sanjeewa/dev/withoutAnyChange/stm32f3/repos/mynewt_stm32f3/hw/bsp/stm32f3discovery/ > /home/sanjeewa/dev/withoutAnyChange/stm32f3/bin/stmf3_boot/apps/boot/boot > BASELIBC FS LIBC NFFS bootloader > Downloading > /home/sanjeewa/dev/withoutAnyChange/stm32f3/bin/stmf3_boot/apps/boot/boot.elf.bin > to 0x08000000 > Open On-Chip Debugger 0.9.0 (2015-09-02-10:42) > Licensed under GNU GPL v2 > For bug reports, read > http://openocd.org/doc/doxygen/bugs.html > adapter speed: 1000 kHz > adapter_nsrst_delay: 100 > Info : The selected transport took over low-level target control. The > results might differ compared to plain JTAG/SWD > none separate > srst_only separate srst_nogate srst_open_drain connect_deassert_srst > Info : Unable to match requested speed 1000 kHz, using 950 kHz > Info : Unable to match requested speed 1000 kHz, using 950 kHz > Info : clock speed 950 kHz > Error: open failed > in procedure 'init' > in procedure 'ocd_bouncer' > > Error: Downloading > /home/sanjeewa/dev/withoutAnyChange/stm32f3/bin/stmf3_boot/apps/boot/boot.elf.bin > to 0x08000000 > Open On-Chip Debugger 0.9.0 (2015-09-02-10:42) > Licensed under GNU GPL v2 > For bug reports, read > http://openocd.org/doc/doxygen/bugs.html > adapter speed: 1000 kHz > adapter_nsrst_delay: 100 > Info : The selected transport took over low-level target control. The > results might differ compared to plain JTAG/SWD > none separate > srst_only separate srst_nogate srst_open_drain connect_deassert_srst > Info : Unable to match requested speed 1000 kHz, using 950 kHz > Info : Unable to match requested speed 1000 kHz, using 950 kHz > Info : clock speed 950 kHz > Error: open failed > in procedure 'init' > in procedure 'ocd_bouncer' > > > > load - Load app image to target for <target-name>. > > Usage: > newt load <target-name> [flags] > > Global Flags: > -l, --loglevel string Log level (default "WARN") > -o, --outfile string Filename to tee output to > -q, --quiet Be quiet; only display error output > -s, --silent Be silent; don't output anything > -v, --verbose Enable verbose output when executing commands > > > Regards, > Sanjeewa
