Replies: 1 comment
-
Hi, I was trying the direct boot method with esp32c3 and couldn't figure out how to use openocd and gdb to debug it ( probably because code is stored in flash memory). Does MDK support debugging for esp32c3 ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I do a lot of bare metal ARM Cortex-M development. I always use some external debugger hardware with code-stepping and variable inspection capability. For the flashless devices I use the self-flashing method: uploading the code into the RAM and as it starts write itself to the SPI flash (with proper headers for the ROM bootloaders). This way you don't need any external loader or special debugger support which can write the SPI flash directly.
I tried to achieve the same with the ESP32. The JTAG HW is simple, you can take any FT232H based debugger or even just a breakout board. During loading the application over JTAG you usually issue an MCU reset. But now I realized that this Xtensa MCU needs very special initialization which I'm not aware of. I've looked through the esp-idf, there are some rather big Assembly files but I think the after-reset initialization is not there. And you need a window overflow exception handler too: https://sachin0x18.github.io/posts/demystifying-xtensa-isa/
I think if you are into in the ESP32 bare metal programming sooner or later you have to deal with the low-level ESP32 initialization.
Do you have some experience with this?
br.
nvitya
Beta Was this translation helpful? Give feedback.
All reactions