Skip to content

Conversation

@orsolic
Copy link

@orsolic orsolic commented Jan 28, 2025

Continuation of mistakenly closed #2063

Here is commit with start of support for ESP32-P4.

I have started working on flashing support but I need to shelve that plan for the time being.
I am pushing the things which seems to work - patch is rough, but more will hopefully come later.

Tested with BMA and ESP-prog (FT2232H) on FreeBSD with Waveshare ESP32-P4 board with flashed IDF example.

Works:

  • JTAG scan
  • attach to target
  • run program
  • reset
  • hardware breakpoint
  • continue
  • printing of var in SRAM
>>> p var
$4 = 123
>>> p &var
$5 = (uint32_t *) 0x4ff26334
>>> x /d 0x4ff26334
0x4ff26334:     123
  • changing value of var:
>>> set var var = 100
>>> p var
$8 = 100
>>> x /d 0x4ff26334
0x4ff26334:     100

What doesn't work:

  • software breakpoint (needs flash support)
  • stepping
  • single instruction stepping

Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking much better 🙂. We've left a review reply on #2063 for one of the notes but have otherwise done a fresh review here. We are satisfied with the items you've addressed and mostly the items here are for subtle bugs we spotted.

We look forward to this being sorted so we can schedule its merge into v2.1 when the merge window opens for that.

@dragonmux dragonmux added this to the v2.1 release milestone Jan 29, 2025
@dragonmux dragonmux added the New Target New debug target label Jan 29, 2025
Tested on BMA, after jtag_scan:
ID code 0x00012c25: ESP32-P4
ID code 0x00012c25: ESP32-P4
RISC-V debug v0.13/v1.0 DMI
RISC-V debug v0.13 DM
Skipping hart 0 -> Unavailable
RISC-V debug v0.13/v1.0 DMI
According to the RISC-V debug specification, DM must be turned on before
accessing DM registers (like reading version of DM).
This fixes attaching to the target.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Target New debug target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants