AboutCapabilitiesPortfolioExplore
Projects
Hanging Plotter
Android development on NixOS
Using an Arduino as a logic analyzer
First Steps - Pinning an idea down and checking assumptions
Connecting an ESP32 to android with bluetooth
Spinning a Stepper
Driving steppers with the RMT module
Using Nix to write rust on the esp32
Using an ESP32 as a logic analyzer
ESP32 development in NixOS using VSCode
Translating an esp32+esp-idf bluetooth example to rust
Post Print Iterations
Musings on packaging build system via splitting independent libraries
Using a smooth stepper driver on the esp32 in rust
thumbnail

Musings on packaging build system via splitting independent libraries

2020-5-31
12th article in Hanging Plotter
Project
Hanging Plotter
Skill
Esp 32
Rust
Philosophy
Bluetooth
Summary:
  • Packaged esp-idf build system into a standalone Rust library to enable reusable ESP32 Bluetooth development
  • Resolved sdkconfig.h timing issue by triggering esp-idf build during compilation to ensure accurate per-project configuration
  • Extended esp-idf-bindgen with Bluetooth-specific helpers and handwritten macro redefinitions for ESP32 BLE support
  • Established reproducible ESP32 toolchain using Nix, Rust analysis checks, and automated flashing scripts

How can the esp-idf build system be packaged into an independent library?

TLDR

TODO

Research

  • sapir/esp-idf-sys Sapir has packaged building esp-idf into a repo
  • reitermarkus/esp-idf-bindgen Reiter Markus forked esp-idf-sys and built up build.rs
  • reitermarkus/esp32-hello An implementation demonstrating using esp-idf-bindgen

Plan

  1. Split esp32-bluetooth into a separate repo
  2. Fork esp-idf-bindgen and integrate changes from esp32-bluetooth/esp32-sys
  3. Audit and integrate any bluetooth specific helpers
  4. Determine existing rust+ble landscape and see if there are any idiomatic implementations that can have esp32 added as a target

Project aspects

  • Dev tooling (rust-analysis-check)
  • Build tooling (makefiles, *.sh for flashing, nix)
  • Handwritten bindings (macro redefs)
  • Per project Configuration (sdkconfig.h)

Sdkconfig

The original esp-idf-bindgen includes an sdkconfig.h while the esp-idf build process includes one in the build/include after calling “make”

To use the most accurate and project specific sdkconfig we must call build during the build process. Is it possible to reference the “parent project” in a dependencies crate?

Previous Next
Featured Work
Welding PositionerSurface Grinder Retrofit
Company Info
About UsContactAffiliate DisclosurePrivacy Policy
Specific Solutions LLC
Portland, OR