Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.42 KB

README.rst

File metadata and controls

52 lines (41 loc) · 1.42 KB

ESP-NIX

Complete toolchain needed to build ESP8266 Sming applications on nix.

crosstool-ng.nix is based on xtensa-esp32-elf.nix github gist.

Design

To keep this build system simple and flexible whole Sming directory must be copied for each build. This could be optimized by linking source code and copying only build directories.

Usage

Example nix build file:

{ pkgs ? import <nixpkgs> {} }:
let
  esp-nix = import (pkgs.fetchFromGitHub {
    owner = "xvuko";
    repo = "esp-nix";
    rev = [...];
    sha256 = [...];
  }) { inherit pkgs; };
in
esp.buildSmingApplication {
  name = [...];
  src = ./.;

  SMING_RELEASE = "1";
}

Library caching

Current sming build system creates hash names for compiled libraries. This allows having cache with multiple versions of same library and speeds up recompilation. In sming.nix two samples are build in both release and debug modes to force library cache generation. When using this file with other libraries / compilation options you might want to add additional build instructions.

TODO

  • move spejsiot related tooling into spejsiot repository