Skip to content
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

Halting both cores makes espflash fail to reset the board with the USB-Serial-JTAG #1844

Closed
ProfFan opened this issue Jul 22, 2024 · 7 comments
Labels
package:esp-backtrace Issues related to the esp-backtrace package

Comments

@ProfFan
Copy link
Contributor

ProfFan commented Jul 22, 2024

Not very sure if this belongs here or espflash. The issue is simple. espflash can use the DTR signals to reset the board to flash mode before flashing. However in esp-backtrace we halt both cores on panic. After this flashing will fail until reset by the RESET pin. If I only halt CPU1 and make CPU0 do waiti 0 flashing works.

Wonder if this is expected?

@bjoernQ bjoernQ added the package:esp-backtrace Issues related to the esp-backtrace package label Jul 23, 2024
@bjoernQ
Copy link
Contributor

bjoernQ commented Jul 23, 2024

It's at least not very unexpected. Users currently could use the custom-halt feature to implement their own halt functionality. I could also imagine this to be a common enough case to have a ready to use feature in esp-backtrace

@bjoernQ
Copy link
Contributor

bjoernQ commented Jul 24, 2024

I can reproduce it and the problem is halting core 0 (pro-cpu)
I currently don't see a way to stop core 0 from continuing when an exception/panic occurs on core 1 other than halting it

@MabezDev MabezDev added this to the 0.20.0 milestone Jul 26, 2024
@MabezDev
Copy link
Member

Btw @ProfFan, I'm guessing this only occurs with USB SERIAL JTAG? I imagine flashing via uart works as the reset is a physical toggle of the reset pin.

@MabezDev MabezDev self-assigned this Aug 19, 2024
@ProfFan
Copy link
Contributor Author

ProfFan commented Aug 19, 2024

That's right @MabezDev, but somehow the official esptools.py can reset the board in some way while the espflash tool can't (need verification from @bjoernQ ).

I think this problem probably should not be part of the 0.20.0 milestone though.

@bjoernQ
Copy link
Contributor

bjoernQ commented Aug 20, 2024

For me (on Windows, esptool 4.7) it cannot reset the board in that situation

@MabezDev
Copy link
Member

I spent some time looking at this, it's not that trivial to solve. I'm not quite sure I see the value of halting the cores in the real world, it seems like most users would want to reset (with the option of breaking out to a debugger if it's connected), I think I'd rather prioritise time to that instead. I'll remove this from the milestone for now.

@MabezDev MabezDev removed this from the 0.20.0 milestone Aug 21, 2024
@MabezDev MabezDev removed their assignment Aug 21, 2024
@MabezDev
Copy link
Member

I don't see the value at all actually, I'll close this for now

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:esp-backtrace Issues related to the esp-backtrace package
Projects
Archived in project
Development

No branches or pull requests

3 participants