Skip to content

Latest commit

 

History

History
118 lines (84 loc) · 2.39 KB

File metadata and controls

118 lines (84 loc) · 2.39 KB

Getting Started

Use this guide when you want to install fbuild, compile a first sketch, and understand what happens on the first run.

Install

Install the published Python package:

pip install fbuild

Or install from a local checkout:

git clone https://github.com/fastled/fbuild.git
cd fbuild
pip install -e .

Source installs require a globally installed soldr executable and use Rust's fast dev profile by default (no Rust LTO), which keeps local rebuilds quick. To explicitly build an optimized Rust wheel, set the build environment flag:

FBUILD_BUILD_RELEASE=1 pip install .

pip install . --config-settings profile=release is no longer supported; the setuptools backend does not interpret that setting. On Windows, set the same environment variable before invoking pip.

First Project

Create a project with a PlatformIO-compatible layout:

mkdir my-project
cd my-project
mkdir src

Create platformio.ini:

[env:uno]
platform = atmelavr
board = uno
framework = arduino

Create src/main.ino:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}

Build it:

fbuild build

The first build downloads the AVR-GCC toolchain and Arduino AVR core, then caches them. Later builds reuse the cache and write firmware under .fbuild/build/<env>/.

First Deploy And Monitor

Deploy to a connected board:

fbuild deploy -e uno

Deploy and attach the serial monitor:

fbuild deploy -e uno --monitor

Run the monitor by itself:

fbuild monitor -e uno --timeout 60

Serial monitoring uses pyserial and follows the same general port-selection model as PlatformIO. You can pass --port COM3 or --port /dev/ttyUSB0 when auto-detection is not enough.

First Emulator Run

Run a build in the default emulator for the board:

fbuild test-emu . -e uno --timeout 10

See the emulator testing guide for backend selection, QEMU notes, and CI-friendly halt conditions.

Next Steps