Skip to content

Add an embedded dev-env for ESP32 and Arduino boards - #9723

Open
HugoluizMTB wants to merge 2 commits into
omacom:quattrofrom
HugoluizMTB:dev-env-embedded
Open

Add an embedded dev-env for ESP32 and Arduino boards#9723
HugoluizMTB wants to merge 2 commits into
omacom:quattrofrom
HugoluizMTB:dev-env-embedded

Conversation

@HugoluizMTB

Copy link
Copy Markdown

omarchy install dev-env embedded installs arduino-cli, platformio-core, esptool, avrdude, and picocom, then clears the two things that otherwise stand between a freshly plugged board and a working upload.

Why

The 18 existing dev-envs each absorb their own environment papercuts — Composer on PATH, PHP extensions enabled, opam initialised. Hardware has none, and it has two that bite everyone on the first board:

Serial devices belong to uucp on Arch. Without group membership, every upload and every serial monitor needs sudo. Almost all advice online names dialout, which does not exist on Arch, so the search usually costs more time than the fix.

ModemManager probes new serial devices on plug-in and holds them open long enough to break the first upload. The symptom is a failed flash that succeeds on the second try, which reads as flaky hardware rather than a fixable cause.

A udev rule marks the common development-board vendors so ModemManager leaves them alone and the node lands in uucp:

Vendor ID Chip Found on
1a86 CH340/CH341 most low-cost ESP32 and Arduino clones
10c4 CP210x ESP32 DevKit
0403 FTDI official Arduino, many debug probes
303a Espressif native USB ESP32-S2/S3/C3
2341 Arduino native USB Leonardo, Micro

Notes

  • Every package comes from the official repositories; no AUR.
  • Group membership only applies on a new login, so the script reports that rather than appearing to have failed.
  • Follows the group-membership pattern already used by omarchy-install-gaming-xbox-controllers.
  • test/cli passes (116 tests).

Tested on Arch with the toolchain install and udev reload; I did not have a board on hand to confirm the end-to-end upload, so a second pair of eyes on the vendor list would be welcome.

`omarchy install dev-env embedded` installs arduino-cli, platformio-core,
esptool, avrdude, and picocom, then clears the two things that otherwise
stand between a freshly plugged board and a working upload:

- Serial devices belong to `uucp` on Arch, so without group membership every
  upload and every serial monitor needs sudo. Most advice found online names
  `dialout`, which does not exist here.
- ModemManager probes new serial devices on plug-in and holds them open long
  enough to break the first upload. A udev rule marks the common development
  board vendors so they are left alone: CH340/CH341 (low-cost ESP32 and
  Arduino clones), CP210x (ESP32 DevKit), FTDI (official Arduino and debug
  probes), and the Espressif and Arduino native-USB IDs.

Both are the kind of first-hour papercut the other dev-envs already absorb.
Every package comes from the official repositories.
@HugoluizMTB
HugoluizMTB changed the base branch from master to quattro September 2, 2026 02:08
The command alone is unreachable: Install > Development is built from
`omarchy-menu.jsonc`, so without an entry there the environment exists but
nobody finds it. The menu item is disabled once `arduino-cli` is present,
matching how the other environments detect themselves.

The manual lists the available environments by hand, so it gets the new one
too.
@HugoluizMTB

Copy link
Copy Markdown
Author

Pushed two follow-ups after re-reading AGENTS.md:

  • Menu entry in default/omarchy/omarchy-menu.jsonc. Install > Development is built from that file, so without it the environment existed but was unreachable from the menu. It disables itself once arduino-cli is present, matching how the other environments detect themselves.
  • Manualmanual/18-development-tools.md lists the environments by hand, so the new one is named there too.

test/cli (116) and test/shell.d/menu-test.sh both pass.

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.

1 participant