-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Failed to get flash maps (-8)! (OCD-847) #302
Comments
@8300 Do you have problems with debugging or you are just confused with those warn/err messages? |
yes,drop gdb connection. I can't load new firmware |
Could you run openocd with verbose log enabled and attach it here? You need to add the following options |
|
Looks like GDB closes connection due to internal timeout (see below). Could you add And one more question. Why do you use
|
(gdb) set remotetimeout 20 Setting a timeout does not work,same error |
Now negative reply error has gone. But GDB still closes connection.
Could you try with
If you use IDF you can download all binaries (bootloader, partition and app) with single command |
how to run a program, using ricv32-esp-elf-gdb? List of target subcommands: target core -- Use a core file as a target. Type "help target" followed by target subcommand name for full documentation. |
i only used your header files, the c file is my own. so no app_main |
In that case you need to specify the name of the entry point of your app. How do you build your app? Is it supposed to be executed in RAM only or you build an image for flash? If you want to load ELF into RAM and debug it you can use our test app as a reference (https://github.com/espressif/esp-idf/tree/master/tools/test_apps/system/gdb_loadable_elf). But loading and debugging ELF in RAM is not standard scenario for debugging app on our chips. |
See this gdbinit file for loading and debugging ELF in RAM https://github.com/espressif/esp-idf/blob/master/tools/test_apps/system/gdb_loadable_elf/gdbinit_esp32c3 |
@8300 any progress on your side? |
Closed due to inactivity. Feel free to re-open if there is still an issue. |
I encountered a similar issue, but with some interesting observations. The functionality of JTAG operation varies depending on the manufacturer of the flash memory. Specifically, I am working with ESP32-WROOM-32E modules. JTAG debugging functions properly only on modules equipped with flash memory from XMC (manufacturer code 20), while it fails on modules with GigaDevice flash memory (manufacturer code c8). These modules are installed on identical boards, and for debugging purposes, I utilize ESP-PROG. To test my hypothesis, I performed a chip replacement on one of the devices. I replaced the GigaDevice flash memory chip with an XMC chip. Subsequent to this replacement, debugging functionality is restored. For XMC flash, the openocd log output indicates everything is functioning as expected:
However, for GigaDevice flash, the log output is as follows:
|
I managed to find a "strange" solution to launch openocd without errors for the ESP32 module with GigaDevice flash memory. Here are the steps:
And debugging functions perfectly |
Development Kit
openocd
Module or chip used
esp32c3fn4
Debug Adapter
usb-jtag bultin
OpenOCD version
Open On-Chip Debugger v0.12.0-dirty (2023-11-15-16:27)
Operating System
linux
Using an IDE ?
no
OpenOCD command line
openocd -f board/esp32c3-builtin.cfg
JTAG Clock Speed
40000 kHz
ESP-IDF version
v5.2
Problem Description
1.openocd -f board/esp32c3-builtin.cfg
2.riscv32-unknown-linux-gnu-gdb _local/examples/gpio
2.1 target remote localhost:3333
3.openocd error
Debug Logs
Expected behavior
no error
Screenshots
No response
The text was updated successfully, but these errors were encountered: