Vagrant MI dev enviro not communicating to STLink V2 on Big Sur

Getting an error when installing the MI Vagrant dev environment when compiling any hex file for a boot loader of any module.

default: 2021-07-29 10:46:46 URL: [60309466/60309466] -> "gcc-arm-none-eabi-4_8-2013q4-20131204-linux.tar.bz2" [1]

vagrant@vagrant-ubuntu-trusty-64:/vagrant/eurorack-modules/rings/bootloader$ make -f makefile hex makefile:47: stmlib/ No such file or directory make: *** No rule to make target stmlib/’. Stop.`

Can’t seem to get past this on Mac, Big Sur 11.2.1 and 11.5.1. There must be a problem with the GCM toolchain – the STMlink works fine within a Windows7 virtual box for Westlicht Performer, but will not work under Vagrant. I had it successfully working a year or so ago on a older machine, but something’s not jiving with what I have now.


Is this file there? Is the whole stmlib directory there?

I had luck finally with VirtualBox 6.2.26 and using the following:
git clone --recurse-submodules

Had a few lines of Red text in vagrant VM build:

default: dpkg-preconfigure: unable to re-open stdin: No such file or directory

default: intel-microcode: microcode will be updated at next boot
   default: /etc/kernel/postinst.d/initramfs-tools:
    default: update-initramfs: Generating /boot/initrd.img-3.13.0-170-generic
    default: /etc/kernel/postinst.d/zz-update-grub:
    default: Generating grub configuration file ...
    default: Found linux image: /boot/vmlinuz-3.13.0-170-generic
    default: Found initrd image: /boot/initrd.img-3.13.0-170-generic
    default: done

After I vagrant SSH’ed in, looks like I had a successful build, now to flash my Rings module. I hope this solves it.

Thank you!

This is really strange, because the git repo for the vagrant environment itself does not make use of submodules.

The eurorack modules’ repo does, but then, the script that clones it invokes git submodule init and git submodule update.

I believe my problem was cd rings, then trying makefile /bootloader/makefile hex without being in the parent directory, which meant it wasn’t looking at the submodules for building. :man_facepalming:

Whoops. Thank you for your swift response!

So I spoke too soon, I’m stuck again.

vagrant@vagrant-ubuntu-trusty-64:/vagrant/eurorack-modules$ make -f rings/makefile upload openocd -s /opt/local/share/openocd/scripts/ -f interface/stlink.cfg -f target/stm32f4x.cfg -c "init" -c "halt" -c "sleep 200" \ -c "flash erase_address 0x08000000 32768" \ -c "reset halt" \ -c "flash write_image erase build/rings/rings_bootloader_combo.bin 0x08000000" \ -c "verify_image build/rings/rings_bootloader_combo.bin 0x08000000" \ -c "sleep 200" -c "reset run" -c "shutdown" Open On-Chip Debugger 0.11.0 Licensed under GNU GPL v2 For bug reports, read Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'. Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD Info : clock speed 2000 kHz Info : STLINK V2J37S7 (API v2) VID:PID 0483:3748 Info : Target voltage: 3.218898 Error: init mode failed (unable to connect to the target)

Reading this

and this

and this

and this

I tried to set the USB speed for both USB 2.1 and USB 3.0 in VirtualBox prior to Vagrant up and Vagrant SSH. When doing this I get the same loop over and over. I cannot connect to it via the ST-Link Win Utility in a very crippled Win7 Virtualization I have installed.

There is no connection problem with the programmer.

This message means that the programmer cannot get a proper response from the microcontroller itself.

What are you trying to program exactly? Is it a working module?