As you can see in my profile, i'm trying to add a debug program in a board with a custom panic handler
Some of this entries make the CPU wait. For example this one
Code: Select all
int read_int(){
unsigned char c;
char buffer[16];
int idx = 0;
while(1){
//while (!uart_rx_one_char(uart_no, &c)) { }
c = uart_rx_one_char_block();
// Check the char added
//Is an space?? Finish it!!
if (c == '\n' || c == '\r') {
buffer[idx] = '\0';
esp_rom_printf("\n"); //echo
break;
}
//It is a number? add it!
if (isdigit(c)) {
if (idx < sizeof(buffer) - 1) {
buffer[idx++] = c;
esp_rom_printf("%c", c);
}
}
//is another char? Ignore it
}
//Transform into number
int value = 0;
for (int i = 0; buffer[i] != '\0'; i++) {
value = value * 10 + (buffer[i] - '0');
}
return value;
}Code: Select all
Open On-Chip Debugger v0.12.0-esp32-20241016 (2024-10-16-14:17)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselecting 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Info : esp_usb_jtag: serial (58:CF:79:16:81:90)
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32c3.tap0 tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : [esp32c3] datacount=2 progbufsize=16
Info : [esp32c3] Examined RISC-V core; found 1 harts
Info : [esp32c3] XLEN=32, misa=0x40101104
Info : [esp32c3] Examination succeed
Info : [esp32c3] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: esp32c3.tap0 tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : [esp32c3] Reset cause (3) - (Software core reset)
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE
Error: libusb_open() failed with LIBUSB_ERROR_NO_DEVICE
Error: esp_usb_jtag: device not found!
Error: esp_usb_jtag: failed to revive USB device!
Error: missing data from bitq interface
Error: dmi_scan failed jtag scan
Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE
Error: esp_usb_jtag: device not found!
Error: esp_usb_jtag: failed to revive USB device!
Error: missing data from bitq interface
Error: failed jtag scan: -104
Error: [esp32c3] Failed DMI read at 0x11; status=2
Error: [esp32c3] polling failed!
Error: libusb_bulk_write error: LIBUSB_ERROR_NO_DEVICE
Info : esp_usb_jtag: serial (58:CF:79:16:81:90)
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Error: missing data from bitq interface
Error: dmi_scan failed jtag scan
Error: [esp32c3] Failed DMI read at 0x11; status=2
Error: [esp32c3] polling failed!
Info : [esp32c3] Hart unexpectedly reset!
Info : [esp32c3] Reset cause (1) - (Chip reset)
Info : accepting 'gdb' connection on tcp/3333
Info : [esp32c3] Target halted, PC=0x4004C500, debug_reason=00000000
Info : [esp32c3] Halt cause (11) - (ECALL from M mode)
Warn : No symbols for FreeRTOS!
Info : [esp32c3] Found 8 triggers
Info : Flash mapping 0: 0x10020 -> 0x3c020020, 38 KB
Info : Flash mapping 1: 0x20020 -> 0x42000020, 90 KB
Info : Auto-detected flash bank 'esp32c3.flash' size 4096 KB
Info : Using flash bank 'esp32c3.flash' size 4096 KB
Info : Flash mapping 0: 0x10020 -> 0x3c020020, 38 KB
Info : Flash mapping 1: 0x20020 -> 0x42000020, 90 KB
Info : Using flash bank 'esp32c3.irom' size 92 KB
Info : Flash mapping 0: 0x10020 -> 0x3c020020, 38 KB
Info : Flash mapping 1: 0x20020 -> 0x42000020, 90 KB
Info : Using flash bank 'esp32c3.drom' size 40 KB
Info : Detected FreeRTOS version: (10.5.1)
Info : JTAG tap: esp32c3.tap0 tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : [esp32c3] Reset cause (3) - (Software core reset)
Info : dropped 'gdb' connection
Info : [esp32c3] Target halted, PC=0x420090CC, debug_reason=00000001Is there something that i could do??
thx