Making Zephyr work on STMF32F discovery

Edit:

The problem was apparently that the virtual machine I was using could not find the board. I am not used to VM so I assumed the board should be detectable by default (like the internet).

If someone is having this problem, you need to go to Virtual Machine -> USB & Bluetooth and connect the board before flashing it.

Merry Xmas :))

Hi,

I am not sure I am on the right channel to ask this question. I am trying Zephyr

docs.zephyrproject.org/.../index.html

The problem:

west build -b stm32f3_disco samples/hello_world

or

west build -p auto -b stm32f3_disco samples/basic/blinky

do work, but I get then an error when I west flash.

The error seems to come from openocd.

```

Open On-Chip Debugger 0.10.0+dev-01341-g580d06d9d-dirty (2020-06-25-12:07)
Licensed under GNU GPL v2
For bug reports, read
    openocd.org/.../bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Error: open failed
```

```

FATAL ERROR: command exited with status 1: /home/ai/zephyr-sdk-0.11.4/sysroots/x86_64-pokysdk-linux/usr/bin/openocd -s /home/ai/zephyrproject/zephyr/boards/arm/stm32f3_disco/support -s /home/ai/zephyr-sdk-0.11.4/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts -f /home/ai/zephyrproject/zephyr/boards/arm/stm32f3_disco/support/openocd.cfg -c init -c targets -c 'reset halt' -c 'flash write_image erase /home/ai/zephyrproject/zephyr/build/zephyr/zephyr.hex' -c 'reset halt' -c 'verify_image /home/ai/zephyrproject/zephyr/build/zephyr/zephyr.hex' -c 'reset run' -c shutdown

```

So I figured it might be openocd? I installed it and tried `openocd -f "board/stm32f3discovery.cfg"`

But then I get:

```

Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    openocd.org/.../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'

```

I hope I am asking in the right forum, my googling is not taking me farther. What causes the error in west flash and what can I do?