Code Monkey home page Code Monkey logo

lwip-arduino-debug's Introduction

LwIP Arduino Debug

Setup for debugging Arduino and LwIP behaviour under full ESP-IDF build system.

Setup

  1. Init submodules
git submodule update --init --recursive

Due to a Arduino having C++-ish compilation rules a patch in components/AsyncTCP/CMakeLists.txt is required to compile the project.

target_compile_options(${COMPONENT_TARGET} PRIVATE -fno-rtti -Wno-error=address)
  1. Setup the ESP-IDF environment

Install recommended ESP-IDF extension for VSCode. Run >ESP-IDF: Configure ESP-IDF Extension and follow configuration steps.

Personally I have installed the ESP-IDF toolchain files to seperate folders to accomodate multiple versions of the ESP-IDF:

~/esp-idf
    v4/
    tools-v4/
    v5/
    tools-v5/

To do this select Advanced installation and set the ESP-IDF Path and ESP-IDF Tools Path to the appropriate folders.

  1. Setup and build

Open terminal via >ESP-IDF: Open ESP-IDF Terminal task and setup WiFi in Example Connection Configuration menu:

idf.py menuconfig

Exit and save the configuration. Then build the project:

idf.py build
  1. Flash and monitor
idf.py flash monitor
# or use a better serial monitor
idf.py flash && tio /dev/ttyACM0 -b 115200

Built-in monitor can by closed by pressing Ctrl+]. To close tio press Ctrl+t q.

Debugging

Launch Launch configuration in VSCode Run and Debug tab. This will start the GDB server and attach to the target. You can now set breakpoints and inspect the code.

Good luck.

lwip-arduino-debug's People

Contributors

miloszlagan avatar

Watchers

 avatar

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.