Dev environment stopped working as expected

Hello there,
i got myself a Olimex ARM-USB-OCD-H half a year ago, to install Bees In The Trees on my Braids.
I worked fine using Oliviers Dev Environment.
Now i tried to reinstall the original firmware the same way but it does not work anymore.
I thought: Maybe the Braids Module got weird form the custom fw, so i tried reinstalling the original fw to my Clouds, same problem, i even get the same error message when i dont have anything connected to the jtag Adaptor. I completely removed the dev envirnoment and virtual machine, reinstalled everything, same same.

Here is what i get:

vagrant@vagrant-ubuntu-trusty-64:/vagrant/eurorack-modules$ make -f clouds/makefile upload
cat build/clouds/clouds.d build/clouds/cv_scaler.d build/clouds/resources.d build/clouds/settings.d build/clouds/ui.d build/clouds/adc.d build/clouds/codec.d build/clouds/debug_port.d build/clouds/gate_input.d build/clouds/leds.d build/clouds/switches.d build/clouds/system.d build/clouds/correlator.d build/clouds/granular_processor.d build/clouds/mu_law.d build/clouds/frame_transformation.d build/clouds/phase_vocoder.d build/clouds/stft.d build/clouds/atan.d build/clouds/units.d build/clouds/random.d build/clouds/bootloader_utils.d build/clouds/system_clock.d build/clouds/arm_common_tables.d build/clouds/arm_const_structs.d build/clouds/arm_bitreversal.d build/clouds/arm_cfft_f32.d build/clouds/arm_cfft_q15.d build/clouds/arm_cfft_q31.d build/clouds/arm_cfft_radix2_f32.d build/clouds/arm_cfft_radix2_init_f32.d build/clouds/arm_cfft_radix2_init_q15.d build/clouds/arm_cfft_radix2_init_q31.d build/clouds/arm_cfft_radix2_q15.d build/clouds/arm_cfft_radix2_q31.d build/clouds/arm_cfft_radix4_f32.d build/clouds/arm_cfft_radix4_init_f32.d build/clouds/arm_cfft_radix4_init_q15.d build/clouds/arm_cfft_radix4_init_q31.d build/clouds/arm_cfft_radix4_q15.d build/clouds/arm_cfft_radix4_q31.d build/clouds/arm_cfft_radix8_f32.d build/clouds/arm_dct4_f32.d build/clouds/arm_dct4_init_f32.d build/clouds/arm_dct4_init_q15.d build/clouds/arm_dct4_init_q31.d build/clouds/arm_dct4_q15.d build/clouds/arm_dct4_q31.d build/clouds/arm_rfft_f32.d build/clouds/arm_rfft_fast_f32.d build/clouds/arm_rfft_fast_init_f32.d build/clouds/arm_rfft_init_f32.d build/clouds/arm_rfft_init_q15.d build/clouds/arm_rfft_init_q31.d build/clouds/arm_rfft_q15.d build/clouds/arm_rfft_q31.d build/clouds/core_cm3.d build/clouds/system_stm32f4xx.d build/clouds/misc.d build/clouds/stm32f4xx_adc.d build/clouds/stm32f4xx_can.d build/clouds/stm32f4xx_cec.d build/clouds/stm32f4xx_crc.d build/clouds/stm32f4xx_cryp_aes.d build/clouds/stm32f4xx_cryp.d build/clouds/stm32f4xx_cryp_des.d build/clouds/stm32f4xx_cryp_tdes.d build/clouds/stm32f4xx_dac.d build/clouds/stm32f4xx_dbgmcu.d build/clouds/stm32f4xx_dcmi.d build/clouds/stm32f4xx_dma2d.d build/clouds/stm32f4xx_dma.d build/clouds/stm32f4xx_dsi.d build/clouds/stm32f4xx_exti.d build/clouds/stm32f4xx_flash.d build/clouds/stm32f4xx_flash_ramfunc.d build/clouds/stm32f4xx_fmc.d build/clouds/stm32f4xx_fmpi2c.d build/clouds/stm32f4xx_fsmc.d build/clouds/stm32f4xx_gpio.d build/clouds/stm32f4xx_hash.d build/clouds/stm32f4xx_hash_md5.d build/clouds/stm32f4xx_hash_sha1.d build/clouds/stm32f4xx_i2c.d build/clouds/stm32f4xx_iwdg.d build/clouds/stm32f4xx_lptim.d build/clouds/stm32f4xx_ltdc.d build/clouds/stm32f4xx_pwr.d build/clouds/stm32f4xx_qspi.d build/clouds/stm32f4xx_rcc.d build/clouds/stm32f4xx_rng.d build/clouds/stm32f4xx_rtc.d build/clouds/stm32f4xx_sai.d build/clouds/stm32f4xx_sdio.d build/clouds/stm32f4xx_spdifrx.d build/clouds/stm32f4xx_spi.d build/clouds/stm32f4xx_syscfg.d build/clouds/stm32f4xx_tim.d build/clouds/stm32f4xx_usart.d build/clouds/stm32f4xx_wwdg.d build/clouds/arm_bitreversal2.d build/clouds/startup_stm32f4xx.d > build/clouds/depends.mk
openocd -f stmlib/programming/jtag/interface_arm-usb-ocd-h.cfg -f stmlib/programming/jtag/stm32f4xx_jtag.cfg -f stmlib/programming/jtag/prelude_f4xx.cfg -c “flash erase_address 0x08000000 32768” -c “reset” -c “flash write_image erase build/clouds/clouds_bootloader_combo.bin 0x08000000” -c “verify_image build/clouds/clouds_bootloader_combo.bin” -f stmlib/programming/jtag/postlude.cfg || openocd -f stmlib/programming/jtag/interface_arm-usb-ocd-h.cfg -f stmlib/programming/jtag/stm32f4xx_jtag.cfg -f stmlib/programming/jtag/prelude_f4xx.cfg -c “flash erase_address 0x08000000 32768” -c “reset” -c “flash write_image erase build/clouds/clouds_bootloader_combo.bin 0x08000000” -c “verify_image build/clouds/clouds_bootloader_combo.bin” -f stmlib/programming/jtag/postlude.cfg
Open On-Chip Debugger 0.9.0 (2018-06-25-15:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Error: The specified debug interface was not found (ft2232)
The following debug interfaces are available:
1: ftdi
2: usb_blaster
3: usbprog
4: jlink
5: vsllink
6: rlink
7: ulink
8: arm-jtag-ew
9: hla
10: osbdm
11: opendous
12: aice
Open On-Chip Debugger 0.9.0 (2018-06-25-15:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Error: The specified debug interface was not found (ft2232)
The following debug interfaces are available:
1: ftdi
2: usb_blaster
3: usbprog
4: jlink
5: vsllink
6: rlink
7: ulink
8: arm-jtag-ew
9: hla
10: osbdm
11: opendous
12: aice
make: *** [upload_combo_jtag_erase_first] Error 1

I think it must be some problem with the connection to th olimex, i checked the stmlib/makefile, but could not see any wrong setting:

------------------------------------------------------------------------------

Files and directories

------------------------------------------------------------------------------

TOOLCHAIN_PATH ?= /usr/local/arm/

Supported: arm-usb-ocd, arm-usb-ocd-h, arm-usb-tiny-h, stlink-v2

PGM_INTERFACE ?= arm-usb-ocd-h

hla for stlink-v2 ; jtag otherwise

PGM_INTERFACE_TYPE ?= jtag

PGM_SERIAL_PORT ?= /dev/ftdi-usbserial
PGM_SERIAL_BAUD_RATE ?= 115200
PGM_SERIAL_VERIFY ?= -v

Anybody got an idea how to fix this?
Kind regards,
BinaryPhase

You seem to be using an old version of stmlib/makefile.inc ; which does not make use of the latest target scripts from OpenOCD . Is that the version that came out with BiTT?

My suggestion: try building and programming the normal firmware.
Then use the .wav update procedure to upgrade to BiTT.

I am trying to get back to the original fw with my braids right now, currently i am on BiTT :wink:
I also tried to reprogramm the original fw to my clouds (is at stock fw atm) to check wether it’s a problem with Braids or with the DevEnv or my Olimex programmer.

How can i get the new version of that makefile, i just cloned the latest version of the dev env, should be in there no?

I don’t think this worked well. Have you also ran git submodule update?

Thanks for your help pichenettes :slight_smile:.

If i run git submodule update i cant see anything happening in the shell, neither any of the files changed.
I checked out https://github.com/pichenettes/stmlib/ manually and cp it into the eurorack-modules-folder.
That way the error changed :stuck_out_tongue:
Now it says:

vagrant@vagrant-ubuntu-trusty-64:/vagrant/eurorack-modules$ make -f clouds/makefile upload
openocd -f interface/stlink-v2.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/clouds/clouds_bootloader_combo.bin 0x08000000”
-c “verify_image build/clouds/clouds_bootloader_combo.bin”
-c “sleep 200” -c “reset run” -c “shutdown”
Open On-Chip Debugger 0.9.0 (2018-06-25-20:01)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport “hla_swd”. To override use 'transport select '.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Error: open failed
in procedure ‘init’
in procedure ‘ocd_bouncer’

You have to modify the beginning of stmlib/makefile.inc to use the JTAG adapter instead of SWD (I’m now using SWD for everything, so that’s the default I have set in the makefile).

2 Likes

This solved it, thanks a lot pichenettes :slight_smile: