Platformio

From NixOS Wiki
Revision as of 09:06, 1 November 2021 by imported>Mic92 (add platformio page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

[Platformio https://platformio.org/] is a SDK/toolchain manager for various microcontrollers and and embedded platforms i.e. esp32.

Basic development environment

{ pkgs ? import <nixpkgs> {} }:
let
in
  pkgs.mkShell {
    buildInputs = [
      pkgs.platformio
      # optional: needed as a programmer i.e. for esp32
      # pkgs.avrdude
    ];
}

Use in vscode

To use the nix-shell provided platformio rather the builtin one first open vscode within the nix-shell and also modify it's settings.json to also contain the following line:

{
      "platformio-ide.useBuiltinPIOCore": false,
}