Skip to content

Document building ELRS using a flatpak install of Visual Studio Code + distrobox + platform io + devcontainers. #505

@hydra

Description

@hydra

I'm pressed for time right now, but it would be good if someone could integrate the instructions below into the docs.

  1. Install VS Code flatpak via Bazaar. (NOT VSCodium)
  2. From terminal create a new distrobox.
    $ distrobox create --name expresslrs --unshare-netns
  3. Run VSCode on host.
  4. Install Microsoft Dev Containers extension.
  5. Get the official distrobox script for vscode integraton.
mkdir ~/.local/bin
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/extras/podman-host -o ~/.local/bin/podman-host
chmod +x ~/.local/bin/podman-host
  1. In VS Code set docker path to /home/<username/.local/bin/podman-host (replace <username> with your linux username)
  2. Install PlatformIO extension.
  3. Restart VS code when installation completes.
  4. In VS Code, click the remote explorer button in the sidebar.
  5. Click the right arrow -> button next to the expresslrs container, wait for it to finish.
  6. Either clone the expresslrs repo using git or open an existing ELRS git checkout.
  7. Click the Platform IO button in the sidebar.
  8. Open the src folder in the ELRS git local workspace, wait for platform IO to open the project. it will install some dependencies.
  9. Continue development as normal, e.g. pick an env target then press build from the status bar at the bottom of the window.

Here's what it should look like after a running build:

Image

If you need to run terminal commands you can use the PIO cli from within VS Code, or from a terminal you can run distrobox enter expresslrs and cd to your checkout and run commands as normal, as below.

Image

References/Links:

I tested this running on Bazzite (20260101, Fedora 43).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions