-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(esp32c5): fix boot failure after USB-Serial-JTAG download (ESPTOOL-1230) #1140
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
Conversation
👋 Hello leeebo, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. Click to see more instructions ...
Review and merge process you can expect ...
|
esptool/targets/esp32c5.py
Outdated
| PCR_SYSCLK_XTAL_FREQ_V = 0x7F << 24 | ||
| PCR_SYSCLK_XTAL_FREQ_S = 24 | ||
|
|
||
| UARTDEV_BUF_NO = 0x4085F51C # Variable in ROM .bss which indicates the port in use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realy not sure if the address of UARTDEV_BUF_NO is correct
|
Hello @leeebo, I only have ECO2 with functional USB-Serial/JTAG mode. Testing with that, changing the |
|
Hi @radimkarnis , Could you please help us verify the UARTDEV_BUF_NO address of By the way, regarding the BSS address — will it remain unchanged after a ROM ECO? If not, do we need to locate the address based on the specific ECO version of the chip? |
Please try and verify
No, as you can see, we cannot guarantee the address won't change with new ECO versions. If you verify the C61, I can do a quick fix and release a dev version that would propagate into IDF. |
This commit resolves an issue where ESP32-C5 would fail to boot properly after firmware download via USB-Serial-JTAG interface, resulting in error
rst:0x7 (TG0_WDT_HPSYS),boot:0x18 (SPI_FAST_FLASH_BOOT).This change fixes the following bug(s):
Using IDF command
idf.py flash monitordownload then restartesp32-c5through USB-Serial-JTAG, sometimes, the chip reboot in loop with"rst:0x7 (TG0_WDT_HPSYS),boot:0x18 (SPI_FAST_FLASH_BOOT)"The commit 1059ec7 try to fix this issue, But this fix did not fully work as intended.
I test with ESP32C5 ECO2 and ECO3, The
self.uses_usb_jtag_serial()always return176when donwload through USB-Serial-JTAG, return36when using UART. which means theself.uses_usb_jtag_serial()is alwaysFalseand the patch not work as normalI have tested this change with the following hardware & software combinations:
I believe this fix needs to be backported to other branches that support esp32-c5.
I have run the esptool automated integration tests with this change and the above hardware: