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

[WIP] ELDB: Debugger for EdgeTX Lua software #3411

Draft
wants to merge 54 commits into
base: main
Choose a base branch
from
Draft

Conversation

ggoraa
Copy link

@ggoraa ggoraa commented Mar 27, 2023

This PR introduces support for debugging Lua software on EdgeTX radios.

Terminology:

  • ELDP: (E)dgeTX (L)ua (D)ebugger (P)rotocol
  • ELDB: (E)dgeTX (Lua) (D)e(b)ugger
  • etxdb: ELDB client
  • Client: Basically etxdb
  • Host: radio or simulator - the one where the debugger is running

The whole debug process is fairly simple, you connect your radio, select USB Data (formerly USB Serial) in the USB mode selector, and then use etxdb to switch it to ELDB mode (used for actually exchanging data between debugger client and host)

This PR can be marked as the first step to modern EdgeTX Lua development.

Tasks:

  • ELDP USB Data mode
  • ELDP .proto definition
  • ELDB Debugging session
  • ELDB Communication
  • etxdb CLI
  • etxdb Communication
  • USB Serial rename to USB Data

Notes:

  1. ELDB support for the Simulator will come in a different PR
  2. File upload support using the debugger is also for a different PR
  3. Lua allocation tracer will be integrated into ELDB, again, in a future PR

@ggoraa ggoraa marked this pull request as draft March 27, 2023 21:52
@ggoraa ggoraa changed the title [WIP] ELDP: Debugger for EdgeTX Lua software [WIP] ELDB: Debugger for EdgeTX Lua software Mar 27, 2023
ggoraa added 22 commits April 7, 2023 23:17
it's probably time for debugger itself
i need to figure out how can I pause and resume execution of Lua, but I already have an idea, so all good
i should also somehow add a check on if the loaded file has debug info or not
- finished impl of setBreakpoint handler
- replaced a simple C array for eldbScriptToRun with std::string

i need to use more of modern C++ features
@pfeerick pfeerick added this to the 2.11 milestone Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants