Coder Social home page Coder Social logo

esp32-c3_pio_builtin_jtag_debugging's Introduction

Platformio Ai-thinker esp32-c3 project template with ability to debug using builtin USB JTAG.

  1. To be able to view periph regs while debugging, you need to copy esp32c3.svd to PLATFORM_ROOT/misc/svd directory

  2. Platformio's openocd-esp32 compiled without builtin JTAG support. You need to get openocd-esp32 there and unpack it to the project folder root https://github.com/espressif/openocd-esp32/releases

  3. If you are getting x509_crt_bundle error during compilation, edit ~/.platformio/packages/framework-espidf/components/mbedtls/esp_crt_bundle/cacrt_all.pem and remove the EC-ACC certificate or apply any other fix from espressif/esp-idf#5322

  4. To run ESP-IDF's menuconfig type this in platformio terminal: pio run -t menuconfig

  5. If ESP-IDF's menuconfig is not working on linux: sudo apt install libncurses5-dev flex bison

  6. Disable memory protection in menuconfig: toggle Component config → ESP System Settings → Memory protection → Enable memory protection (also you can compile latest openocd-esp32 that works with memory protection set)

  7. Enable ocd stubs in menuconfig: toggle Component config → ESP32C3-Specific → OpenOCD debugStubs

  8. If platformio debugger is not working on linux: sudo apt install libpython2.7

  9. IMPORTANT: Do not forget to use good quiality USB cable without hub or use external power supply, because it may trigger BROWNOUT(and some others) event on startup and you'll spend a lot of time finding the reason.

  10. On linux you need to install udev rules from openocd-esp32 folder: sudo cp openocd-esp32/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d/60-openocd.rules

  11. Pinout for builtin USB JTAG/serial: io18 - D-, io19 - D+, link to board description: https://docs.ai-thinker.com/en/esp32c3

esp32-c3_pio_builtin_jtag_debugging's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

asrsim13

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.