Initial Setup Help: Flashing and JTAG

I have a Daisy Patch, but I have removed the Seed from the Patch, so I am just working with the Daisy Seed right now while I get the environment setup. I have two issues/questions right now:

  1. I have successfully built the blink program and flashed it to the Seed. The light blinks. But even though it’s working, I’m seeing an error in Visual Studio after the flash operation. The end of the output is:

Downloading to address = 0x08000000, size = 59692
Download [=========================] 100% 59692 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status
make: *** […/…/libDaisy/core/Makefile:330: program-dfu] Error 74

  • The terminal process “/usr/bin/bash ‘-c’, ‘make clean; make; make program-dfu’” terminated with exit code: 2.

I’m not sure what the issue is. This was done with the “build_and_program_dfu” option.

System Specs:

Visual Studio Code: Version: 1.74.2 / OS: Linux x64 5.10.0-19-amd64
dfu-util --version: dfu-util 0.9
openocd --version: Open On-Chip Debugger 0.11.0-rc2

In c_cpp_properties.json, the compilerPath was changed to: “/my/path/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++”. I have no idea how to tell if Visual Studio is using that gcc or the system default. I have never used Visual Studio before today, I have used CodeLite and that just lets you set the GCC version in the menu.

  1. The other issue is I don’t know how to set up the JTAG debugging device. The one I have is made by OLIMEX, and there are two parts: ARM-USB-OCD-H and ARM-JTAG-20-10. I bought these a long time ago to do stuff with Mutable Instruments, but I could never get the chips I needed (always out of stock). So I just took the debugger out of the box today. I tried using the build_and_program menu option with the JTAG header connected (and the USB also connected) and this is what I get in the output:

arm-none-eabi-objcopy -O ihex build/Blink.elf build/Blink.hex
arm-none-eabi-objcopy -O binary -S build/Blink.elf build/Blink.bin
openocd -s /usr/local/share/openocd/scripts -f interface/stlink.cfg -f target/stm32h7x.cfg
-c “program ./build/Blink.elf verify reset exit”
Open On-Chip Debugger 0.11.0-rc2
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
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
Info : clock speed 1800 kHz
Error: open failed
in procedure ‘program’
** OpenOCD init failed **
shutdown command invoked

make: *** […/…/libDaisy/core/Makefile:318: program] Error 1

  • The terminal process “/usr/bin/bash ‘-c’, ‘make clean; make; make program’” terminated with exit code: 2.

It’s not clear if I should have the USB plugged into the Seed at the same time the JTAG debugger is plugged into a different USB port? But in the video it looks like both are connected at the same time. Does anybody have this OLIMEX tool (it’s the one Emilie from Mutable uses, supposedly) and know if I need to do something special with it?

Thanks,
Nick

“ dfu-util: Error during download get_status”

This is normal, and can be ignored.

I have not used a debugger, so can’t comment on the other issue.