Using Eclipse with OpenOCD to build and debug ESP32
Using Eclipse with OpenOCD to build and debug ESP32
Hi,
I’m currently struggling to get an efficient and well working development environment for ESP32. Following the docs included in ESP-IDF and watching Kolbans video http://www.esp32.com/viewtopic.php?f=13&t=315 allows me to build/browse/edit my code in the Eclipse environment.
The next logical step is to efficiently get the code down on target and debug using OpenOCD and the JTAG interface. I have had some luck getting GDB<->OpenOCD<->FTDI<->JTAG<->ESP32 to work on the command line. However, such an environment is just too painful and inefficient to work with. I’ve been trying to get this setup in Eclipse using the “Eclipse OpenOCD plugin” but with limited success. I’ve been able to stop on a breakpoint but it is very unstable and shaky.
So now I’m reaching out! Is there anyone that has been able to get this setup working to a satisfactory level?
Also, it would be really nice if we also could download the built binary over the JTAG interface (instead of uart). Anyone that have accomplished this?
Thanks!
I’m currently struggling to get an efficient and well working development environment for ESP32. Following the docs included in ESP-IDF and watching Kolbans video http://www.esp32.com/viewtopic.php?f=13&t=315 allows me to build/browse/edit my code in the Eclipse environment.
The next logical step is to efficiently get the code down on target and debug using OpenOCD and the JTAG interface. I have had some luck getting GDB<->OpenOCD<->FTDI<->JTAG<->ESP32 to work on the command line. However, such an environment is just too painful and inefficient to work with. I’ve been trying to get this setup in Eclipse using the “Eclipse OpenOCD plugin” but with limited success. I’ve been able to stop on a breakpoint but it is very unstable and shaky.
So now I’m reaching out! Is there anyone that has been able to get this setup working to a satisfactory level?
Also, it would be really nice if we also could download the built binary over the JTAG interface (instead of uart). Anyone that have accomplished this?
Thanks!
Re: Using Eclipse with OpenOCD to build and debug ESP32
I'm a complete new joiner to the world of JTAG and OpenOCD. If I understand correctly, you are using some kind of USB dongle that supplied the JTAG interface? Can you share with us what component/part you bought/are using for this task? Ideally if you have an eBay link or other unambiguous description that would be perfect. I think I need to start by ordering one of those.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Using Eclipse with OpenOCD to build and debug ESP32
Well, I'm interested too. Also, I'd like to have advices from Espressif about which JTAG debugger they used and which is adviced to use (and buy) with less possible pain to setup it.
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: Using Eclipse with OpenOCD to build and debug ESP32
In theory, any OpenOCD-compatible JTAG-debugger (that is not hardwired to be chip-specific; eg some of the STM32 ones are) will do. We have great success with FT2232H-based debuggers; we have one of these chips on board the devboard I used for the NES port and we use Tiao USB-JTAG boards for the rest. We also tried OpenJTAG and JLink debuggers, these work fine as well (although slightly slower due to being USB1.1 instead of 2.0).
Re: Using Eclipse with OpenOCD to build and debug ESP32
Thanks for your answer. I suppose that it's JTAG IEEE 1149.1 compatible, can you just confirm me if it's possible to chain and debug multiple devices with ESP32 on chain? (TDI -> TDI, TDO -> TDI, TDO -> TDO chain connection)ESP_Sprite wrote:In theory, any OpenOCD-compatible JTAG-debugger (that is not hardwired to be chip-specific; eg some of the STM32 ones are) will do. We have great success with FT2232H-based debuggers; we have one of these chips on board the devboard I used for the NES port and we use Tiao USB-JTAG boards for the rest. We also tried OpenJTAG and JLink debuggers, these work fine as well (although slightly slower due to being USB1.1 instead of 2.0).
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: Using Eclipse with OpenOCD to build and debug ESP32
Yes, you should be able to chain ESP32s (as well as other JTAG devices) perfectly fine. Actually, internally, the two cores have two separate JTAG interfaces which are daisy-chained in this fashion. Chaining more than one ESP32 is untested, though; if you find any bugs in JTAG behaviour when you do that, feel free to report a bug.
Re: Using Eclipse with OpenOCD to build and debug ESP32
BTW: Does the ESP32 support boundary scan?
-
- Posts: 9772
- Joined: Thu Nov 26, 2015 4:08 am
Re: Using Eclipse with OpenOCD to build and debug ESP32
I don't think so, from what I remember the JTAG connects directly to the CPU core, not to the GPIO logic. If it does boundary scan, it likely maps to internal signals, not to the GPIOs. I'll ask the hardware engineers, just to be sure.
Re: Using Eclipse with OpenOCD to build and debug ESP32
Hello,
I'm working with eclipse and jlink debugger here (OS: Linux)
Did the setup as described, and it works without problems.
The only problem not solved is that the debugger only attaches to one core ... so if you have not bound ur program to that, you likely miss the catch.
Wolpi
I'm working with eclipse and jlink debugger here (OS: Linux)
Did the setup as described, and it works without problems.
The only problem not solved is that the debugger only attaches to one core ... so if you have not bound ur program to that, you likely miss the catch.
Wolpi
Re: Using Eclipse with OpenOCD to build and debug ESP32
I'm using a Shikra and it works wellkolban wrote:I'm a complete new joiner to the world of JTAG and OpenOCD. If I understand correctly, you are using some kind of USB dongle that supplied the JTAG interface? Can you share with us what component/part you bought/are using for this task? Ideally if you have an eBay link or other unambiguous description that would be perfect. I think I need to start by ordering one of those.
http://int3.cc/products/the-shikra
Basically AFAIK you are running JTAG over a serial interface...when you fire up OpenOCD you tell it to use an FT232 interface (and thru config files) it finds the Shikra.
Who is online
Users browsing this forum: Baidu [Spider] and 101 guests