Closed eisenach closed 2 years ago
Hello,reference , I hope to help you
Hello, Before opening this issue, I had obviously tested all possible ways to apply the Espressif documentation, with no luck. It seems to me that this board has some pin or other hardware issue that doesn't allow JTAG debugging - or I'm just mistaking. Can you please provide a configuration (software versions) that you could successfully test with the debugger on this board?
Thank you, Dom
@LilyGO having the same issue. The default FTDI config clearly isn't the right one, but which one is? Which interface config do we use?
I'm using the vanilla lilygo WROVER.
Try adding the following to your platformio.ini file for your project. Make sure to modify the port and debug tool names as needed:
upload_port = /dev/ttyACM0 debug_tool = esp-prog debug_init_break = tbreak setup debug_port = /dev/ttyUSB1 build_type = debug debug_speed = 5000
This will at least get you as far as I've gotten. (but it still doesn't work, at least not for me, yet.)
I got it working using the configurations @wwestrup mentioned. What could probably going wrong with your peoject is that you're using the LED pin (GPIO 12) on your application code. To get it working you have to give up using the SD slot and the built in LED pins.
For anyone coming to see this. @MateusLourenco97 appears to have found the solution. If you remove LED control from your code on GPIO12 (the blue LED on our board) and start debugger, it works.
Otherwise, if you attempt to use the LED and debugger at the same time, it will fail to initialize.
For ESP-prog, use common GND, 3v3, GPIO12-15.
[env:esp32dev]
platform = espressif32
board = esp-wrover-kit
framework = arduino
debug_tool = esp-prog
debug_init_break = tbreak setup
@LilyGO or @lewisxhe do you know the reason GPIO12 was chosen for LED and JTAG interface? do you know how to make both work together?
I'm also seeing that I can't use JTAG/prog interface during deep sleep. The USB is able to wake out of deep sleep and successfully boot but JTAG fails.
Found a solution to wake from deep sleep when getting this error.
#include "driver/rtc_io.h"
rtc_gpio_pullup_en(GPIO_NUM_12);
rtc_gpio_pulldown_dis(GPIO_NUM_12);
esp_sleep_enable_ext0_wakeup(GPIO_NUM_12, 0);
This causes GPIO to be pulled high in the application setup. The last line sets a wake-up from deep sleep interrupt on GPIO 12. Whenever GPIO12 is pulled low and in deep sleep, the ESP will wake up. Probing, we see that GPIO 12 is pulled high while app is running and in deep sleep. When we pull it down (i.e. when using JTAG, the ESP is woken from deep sleep).
Here's the logic analyzer trace of the JTAG initial handshake. You can see GPIO12 is pulled high before JTAG starts and as soon as it goes low, the ESP comes out of deep sleep.
I also tested with the reverse code (i.e. normally low with a pull-up wakeup trigger) but it did not work. Because esp-prog hold GPIO 12 high, the interupt is triggered as soon as the ESP sleeps so it continuously boots. Don't do it this way.
#include "driver/rtc_io.h"
rtc_gpio_pullup_dis(GPIO_NUM_12);
rtc_gpio_pulldown_en(GPIO_NUM_12);
esp_sleep_enable_ext0_wakeup(GPIO_NUM_12, 1);
Hello, I'm trying to debug my firmware on TTGO-T-SIM7000G through OpenOCD and, regardless of the driver I'm using, and consistently on Windows and Linux, I have the following result
I also tried to run OpenOCD directly (not through PlatformIO), without luck. Could you please advise?
Thank you, Dom