InfiniTimeOrg / InfiniTimeOrg/InfiniTime

Debugging w/ DevContainer

Open
#573 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question/discussion
Dominant language
C
Stars
3.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

TLDR: My questions are:

  • Am I correct in my assumption that I can push new software to the watch and debug it from within the VS Code dev container?
  • Are there any additional steps (such as manually starting the OpenOCD server on my host machine?) that need to be taken to facilitate this.

Background:

With the recent addition of the VSCode dev container, I've finally been able to get some code compiled and sent to my dev watch using the OTA method. This is all well and good but:

  • The process is slow and makes iterating on changes arduous
  • It affords no debugging capabilities (ex. logging, etc.)

I've read through the various docs that describe using OpenOCD for flashing the application firmware to the watch as well as (I think?) connecting to it for debugging purposes. It looks like debugging facilities are set up within the dev container as well (accessed via the Run and Debug tab in VS Code).

From reading the various docs, it appears that the dev container provides facilities for flashing the application firmware to the watch as well as debugging it. (Granted, I could be mistaken about this).

However, when attempting to run + debug, VS Code presents me with a pop-up message that reads:

Failed to launch GDB: host.docker.internal:3333: Connection timed out. (from target-select extended-remote host.docker.internal:3333)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the VS Code Run and Debug entry point and the documentation covering dev containers, OpenOCD, flashing, and debugging. Reproduce the reported host.docker.internal:3333 connection timeout and determine whether debugging from the container is supported and what host-side steps are required. Done means the workflow and any required setup are documented clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, vscode
Domain
devtools, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.