platformio-purifier full guide
Detailed setup, dependency management, build commands, and troubleshooting. Start with the overview for the initial commands; use the sections below for the complete setup and behavior. platformio-purifier is classified at maturity tier 4 (see tier assessment for details).
Contents
- Setup and activation
- Version compatibility
- Development loop
- Using locked dependencies
- Nix builds
- Project projections
- Supported scope
Setup and activation
Build PlatformIO projects with packages resolved and locked by Nix.
From an existing Arduino AVR project with platformio.ini:
Use the overview’s Quickstart for the initial command sequence. The setup details below apply to that workflow.
Commit platformio-purifier.lock.json. Locking uses PlatformIO’s own registry
resolver and package installer for both supported host architectures. It captures
the platform, toolchain, frameworks, transitive libraries, uploader, test framework,
and configured analysis tools. Nix verifies the archives and replays the native
installer before the lock is written.
Version compatibility
| Tool or language | Packaged defaults | Tested versions |
|---|---|---|
| PlatformIO Core | 6.2.0 | — |
| Python | 3.14.8 | — |
Operating systems and architectures
| OS | CPU architecture | Packaged toolchain | Recorded workflow |
|---|---|---|---|
| Linux | ARM64 | Yes | Not recorded |
| Linux | x86-64 | Yes | Tested |
Choosing versions
| Component | Selected by |
|---|---|
| Project compiler: Board toolchain | The PlatformIO environment selects its platform, framework and compiler packages, which the lock captures.platformio.ini, platformio-purifier.lock.json |
Development loop
Edit your sources and use the normal commands:
pio run
pio test
pio check
pio run --target upload
Tests and uploads use your configured hardware normally. For a test firmware compile without uploading or running it:
pio test --without-uploading --without-testing
Dependency selections are checked through PlatformIO’s native configuration parser. Source edits and build flags do not require relocking. After changing dependency declarations:
platformio-purifier lock --update
platformio-purifier prefetch
Using locked dependencies
This integration requires the pio and platformio wrappers. They supply readonly
Nix package trees through private writable PlatformIO state. Existing .pio
dependency caches and global installations are preserved. Without a lockfile,
the wrappers warn and run ordinary, impure PlatformIO. Install them through your
usual installation method if you want them beyond nix shell.
Native package update and removal operations direct you to the lock command.
Build outputs stay in the project’s usual build directory. Package aliases,
private caches, and Nix GC roots live beneath
$XDG_CACHE_HOME/platformio-purifier. Project commands retain networking.
--project, --config, and --lock accept explicit locations. Their environment
equivalents are PLATFORMIO_PURIFIER_PROJECT, PLATFORMIO_PURIFIER_CONFIG, and
PLATFORMIO_PURIFIER_LOCK. The native wrappers also honor --project-dir and
--project-conf where the underlying command supports them.
Nix builds
The overlay exposes buildPlatformioProject with src, configFile, doCheck,
and checkCommand. It exposes packages, tests, release, and fetches;
output names are known without import-from-derivation.
Project projections
This integration provides native release artifacts, rather than a typed cross-purifier project projection interface. The publication workflow below uses those native artifacts.
platformio-purifier bundle produces an archive containing the native firmware
HEX and ELF files for each locked environment. publish --tag TAG uploads that
exact archive to an existing GitHub release.
Supported scope
Scope
The initial provider supports public registry and HTTPS archive packages for Arduino AVR projects on Linux x86-64 and ARM64. The SDK patches host executable loaders for Nix. It supplies Nixpkgs’ all-target GDB in place of the old bundled AVR debugger, and Nixpkgs cppcheck replaces the registry analyzer that crashes on ARM64. These providers and versions are recorded in the environment metadata.
Native resolution, firmware compilation, Unity test-firmware compilation, and firmware inspection are tested without a board. Physical uploads and on-device test execution require your hardware. Other platforms, Git or local package sources, and additional Python dependencies need their own providers.
Target systems
- x86_64-linux
- aarch64-linux
Platform limitations and validation
- Native Linux x86-64 and ARM64 are supported. PlatformIO firmware compilation and unit-firmware compilation are tested without hardware; physical uploads and on-device test execution are not exercised.