I am having a difficult time getting debug working on my Arduino Giga R1.
This is my sketch using MBED OS in Arduino IDE:
#include "mbed.h"
#include "USBSerial.h"
using namespace mbed;
using namespace rtos;
USBSerial serial;
DigitalOut led(LED1);
int main(void) {
while(1) {
printf("changing led");
led = !led;
thread_sleep_for(1500);
}
}
When I select the correct port, and hit board info I get:
I downloaded STM32 Cube Programmer, and upgraded the firmware.
11:40:40 : ST-LINK SN : 002600453033510635393935
11:40:40 : ST-LINK FW : V3J13M4
11:40:40 : Board : STLINK-V3MINIE
11:40:40 : Voltage : 3.24V
When I attempt to debug, I get:
Waiting for gdb server to start...[2024-04-23T15:35:24.565Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:\\Users\\Ian Redden\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\openocd\\0.11.0-arduino2/bin/openocd" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "c:\\Users\\Ian Redden\\Documents\\ArduinoTesting\\serial-test" -f "C:/Users/Ian Redden/AppData/Local/Programs/Arduino IDE/resources/app/plugins/cortex-debug/extension/support/openocd-helpers.tcl" -f interface/stlink.cfg -f "C:\\Users\\Ian Redden\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed_giga\\4.1.1/debugger/select_hla.cfg" -f target/stm32h7x_dual_bank.cfg
Open On-Chip Debugger 0.11.0+dev-gab95bac57-dirty (2021-05-11-10:45)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
Info : clock speed 1800 kHz
Error: open failed
[2024-04-23T15:35:24.617Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
I have the jtag connected as follows:
I followed the following guide to connect the JTAG (page 11):
STLINK-V3MINIE debugger/programmer tiny probe for STM32 microcontrollers - User manual
It indicates that even though the cable is 14 pin for the STLINK v3 MINIE, for 10 pin connections, you leave 2 pins on either side hanging off the plug. PIN #3 on the ST LINK v3 MINIE is PIN #1 on the Arduino Giga JTAG. The Giga datasheet ( ABX00063-datasheet.pdf (arduino.cc)) seems to indicate that connector J8 on the board has its pin #1 indicated by the *.
Any ideas why this is not working is greatly appreciated!
EDIT: Forgot to mention I am using IDE:
1 post - 1 participant