After building the MMDVM shield by Toufik F0DEI I tried to flash the MMDVM firmware using the MMDVM Makefile and executed “make deploy”. That command failed and the output said something about that it could not open the port. After looking through the openocd config files I discovered that it looks for a device with 0x0483/0x3748 as VID/PID.
But in my case the board showed up with 0x0483 0x374b. After changing this in /usr/share/openocd/scripts/interface/stlink-v2.cfg the deploy command worked like a charm and transferred the firmware successfully. By the way: This was done on an Ubuntu 16.04 with openocd v0.9.0 installed from the official repositories.
Update
Now that we can deploy the MMDVM firmware from a Linux host I also tried it on my Raspberry Pi with Raspbian that runs the MMDVMHost software. The openocd version from the official Raspbian repos is too old as of now (v0.8.0). As [1] states the support for STM32F446RE Nucelo boards was only added as of v0.9.0 which I already tried from the Ubuntu box successfully. So I uninstalled v0.8.0 and compiled v0.9.0 from source. Again it needed the change in the stlink-v2.cfg file which was now lying under /usr/local/share/openocd/scripts/interface/.
Also the board was only writable after changing its access rights. I solved this with an udev rule:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
MODE:="0666", \
SYMLINK+="stlinkv2-1_%n"
After that flashing via “make deploy” also worked on the Raspberry Pi.
References
[1] https://vjordan.info/log/fpga/openocd-and-stm32f446.html