Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLY Buffer PLUS — custom firmware

Alternative firmware for the Mellow FLY LLL Buffer PLUS, plus a browser-based tool that configures and flashes it over USB with no software to install.

Built on Mellow's open v1.1.5 source (GPL-3.0), restructured and extended.

Runs in the browser, nothing to install. Chrome, Edge or Opera — it uses Web Serial, which Firefox and Safari do not implement.


Why

Stock v2.0.1 is capable but has some sharp edges:

Stock v2.0.1 This firmware
speed upper bound none — any positive value is accepted 1–200 mm/s, enforced
Factory reset no such command defaults
EEPROM writes on every parameter set explicit save
Boost current ×1.2 + StealthChop, feed only current and speed, both directions
Double-tap a button sets an error flag, nothing else full retract / full load
Jam vs runout both driven onto PB15 separate pins, as the hardware intends
Manual jog leaves the unit in an error state doesn't
Configurable I/O none 15 events → 8 pins, 8 slots
Source not published this repo

The missing speed limit is not academic: a value of 100 mm/s (≈785 r/min) will stall the motor, and because stock has no factory reset, that value survives a firmware reflash.


Features

Motion — speed in mm/s derived from real drive geometry (22.93 mm hobb circumference, 3:1 BMG reduction), configurable microstepping, runtime motor current, and a staged boost that raises both current and speed after a set distance of continuous travel.

Buttons — hold to jog, double-tap KEY1 for full retract, double-tap KEY2 for full load. Both run until the filament switch changes state, then a further distance-based clearance, so changing the speed doesn't change the result. Non-blocking throughout.

Configurable I/O — map any of 15 firmware events to any of 8 output pins, LEVEL or PULSE, either polarity. Typical use: pulse an output when filament is inserted so Klipper runs a load macro.

iotest FEED 1                                   # confirm the wiring first
ioset 0 FILAMENT_INSERTED FEED PULSE HIGH 3000
save

Safety — every parameter range-checked, versioned + CRC'd config that falls back to defaults rather than reading stale bytes, and an unchanged 60 s jam timeout.


Web tool

Open it here, or save tools/buffer-config.html and open it locally — it is one self-contained file with no dependencies. Chrome, Edge or Opera only (Web Serial; Firefox and Safari don't implement it).

  • Reads every value from the board on connect
  • Min/max on each field, hover any name for what it does and its limits
  • I/O mapping table with a "drive this pin" test button
  • Raw console
  • Flashes firmware — sends flyboot, connects to the Katapult bootloader, writes, reads every block back to verify, then restarts the application

The flasher will not send COMPLETE unless verification passes.


Install

Requires the FlyBoot/Katapult bootloader, which every board shipping with v2.0.0 or later already has.

  1. Open the web tool
  2. Connect, then the Flash firmware tab
  3. Enter bootloaderConnect bootloader → drop firmware/FLY-Buffer-Custom-v1.0.5-0x08002000.binFlash

Mellow's own web tool works too — same image, same address.

Reverting to stock: flash Mellow's FLY-LLL-PLUS-V2.0.1.bin the same way. This firmware never touches the bootloader, so it is always a round trip. If a board stops enumerating entirely, hold BOOT, tap RESET, release — that forces the ROM DFU bootloader, and Mellow's -mergedBL image at 0x08000000 restores everything.


Building

pio run -e katapult      # app at 0x08002000, behind the bootloader
pio run -e dfu           # full image at 0x08000000, DFU recovery only
pio test -e native       # 47 host unit tests, needs a host g++

board_build.flash_offset = 0x2000 is what places the app behind the bootloader. Always verify the link address in the produced image rather than trusting the flag — see below.

Cortex-M0 gotcha

The APM32F072 has no VTOR register, so VECT_TAB_OFFSET (which flash_offset sets) does nothing. An app at 0x08002000 must copy its vector table into SRAM and alias SRAM to 0x00000000 via SYSCFG->CFGR1 MEM_MODE. That is src/vector_relocate.cpp, and .ram_vector in the linker script reserves the space at RAM base.

Two things this cost us, recorded so nobody repeats them:

  • the file must live in src/, not lib/ — in a library it becomes an archive member, nothing references its symbols, and the linker silently drops it, .init_array constructors included
  • .data used to start at 0x20000000, exactly where the relocated table goes

Layout

fw/                 PlatformIO project
  lib/board/        pin map — the single source of truth
  lib/config/       parameters, validation, versioned CRC persistence
  lib/console/      command parser
  lib/geometry/     mm/s <-> steps <-> VACTUAL maths
  lib/motor/        TMC2225 driver, boost
  lib/iomap/        event -> output mapping
  lib/buffer/       state machine
  lib/hal/          the only Arduino-dependent module
  test/             host unit tests
tools/              web config + flash tool
host-tools/         PowerShell / Python serial helpers
hardware/PINOUT.md  pin map read off the official schematic
docs/design.md      design rationale
firmware/           prebuilt images

Hardware notes

Full table in hardware/PINOUT.md, read from Mellow's schematic and cross-checked against their connector diagram. Two things worth knowing:

  • DULIAO (jam) is PB14, not PB15. Fly's buffer.h defines both DUANLIAO and DULIAO as PB15, so stock drives jam and runout onto one pin and never uses the dedicated jam output the board provides.
  • DIR_PIN is defined twice in buffer.hPA7, then EXTENSION_PIN3. The second wins, so PA7 is never configured as an output. Harmless only because the motor runs on TMC VACTUAL, which ignores STEP/DIR.

MCU is an APM32F072C8 (Geehy), not a genuine ST part. The bootloader reports it as stm32f072xb, i.e. 128 KB — the stock PlatformIO board file's 64 KB cap is wrong, and the stock merged image is already 70,636 bytes.


Status

Running on hardware. Auto-feed, buttons, full retract/load, boost, I/O mapping and the config side of the web tool are all working.

Validated on one board. Treat it as community firmware: read the code, keep DFU recovery available, and don't put it on a machine mid-print.


Credits

  • Fly3DTeam / Mellow — the original firmware and hardware. This is a derivative of their GPL-3.0 buffer_v1.1.5 tag; the state machine, sensor conventions and pin assignments are theirs.
  • Katapult — the bootloader Mellow ships as FlyBoot.
  • Other community work on this board, read while figuring things out: ss1gohan13, Nitrooxyde, river29.

Licence

GPL-3.0, inherited — this is a derivative work of Fly3DTeam/Buffer, which is GPL-3.0. See LICENSE.

Warranty

None. Flashing firmware can brick a board or damage hardware. You assume all risk; see GPL-3.0 §15 and §16.

About

Custom firmware for the Mellow FLY LLL Buffer PLUS, with a browser-based config and flashing tool. GPL-3.0, derived from Fly3DTeam/Buffer.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages