Skip to content

Add experimental TBS Mambo support with external Crossfire - #7907

Open
Auster wants to merge 11 commits into
EdgeTX:mainfrom
Auster:mambo-support
Open

Auster wants to merge 11 commits into
EdgeTX:mainfrom
Auster:mambo-support

Conversation

@Auster

@Auster Auster commented Oct 13, 2026 •

Copy link
Copy Markdown

This adds an experimental STM32F407 Mambo target that boots EdgeTX with the original TBS bootloader and preserves the existing Tracer flash and shared memory regions. Direct MLX90393 acquisition and validated SD-backed factory calibration provide working gimbals without starting the proprietary internal RF task.

Summary of changes:

  • Add hardware definitions, an application-only linker layout, build presets, SDIO, LCD/backlight, power, ADC controls, buttons/trims, single-PAGE navigation, and Lua rotary event exports.
  • Keep Mambo-specific target cases after existing radios and consolidate board constants in the Mambo HAL. Preserve the normal FreeRTOS interrupt handlers.
  • Add opt-in external Crossfire support with protocol filtering, UART/DMA reception, power gating, shutdown inhibition, and on-radio Hall/CRSF diagnostics.
  • Support virtual ADC inputs in the hardware schema/generator and skip RTC battery checks on targets without that input.

Validation:

  • Firmware builds: default Mambo, external-CRSF Mambo, and TX12 Mark II regression.
  • Mambo ELF/binary checks: application starts at 0x0800C000, stays below 0x080C0000, and preserves reserved SRAM/CCM regions.
  • All 61 hardware schemas and 976 board/template combinations pass after syncing with current upstream main.
  • Additional local host checks maintained outside this patch: 14 suites covering sensor acquisition/calibration, battery conversion, power control, shutdown inhibition, and related interfaces.
  • On a physical Mambo: normal startup, SD access, gimbal calibration, pots, buttons/trims, battery display, and PAGE navigation work. External receiver channels and decoded telemetry/sensor discovery work with a TBS Crossfire Micro TX v1 at 400 kbaud. Stock application reinstallation with normal FreedomTX startup and custom application uploads through the original bootloader have been demonstrated.

Draft status:

On-radio TBS Agent 1.02 rotary navigation and selection are now confirmed working.

Internal Tracer integration is unfinished and remains disabled. Higher-speed CRSF interoperability/negotiation, charging/off-state behavior, external power-off/shutdown hardware checks, long-duration stability, receiver failsafe, and Companion/release integration remain to be completed. This is a bench-tested prototype, not a flight-validated release target. Private calibration data, captured firmware, research tooling, flashing tooling, and research documents are kept outside this patch.

Cross-references:

@bkleiner

Copy link
Copy Markdown

Tokens well spent :)

i have uploaded our branches for main, 2.11 and 2.12 but i am afraid they have gone quite stale since we first submitted them.

They include code for interacting with newer (currently in alpha) versions of the radio firmware, maybe that could be a good middle of the road approach: external only when the radio firmware is old, internal and external when it is up to date.

@Auster

Auster commented Oct 17, 2026

Copy link
Copy Markdown
Author

Mambo’s default build now includes the encoder, Hall-stick and external-bay CRSF fixes, without a separate external-CRSF build switch. Internal Tracer work remains separate from this PR.
Added an application-only USB HID flasher and a CI tester bundle. The default CMake flashing path was tested on one Mambo/macOS setup: complete transfer at 15 ms pacing, zero retries and matching terminal checksum. Post-flash startup, encoder, sticks and external bay were reported working.
All nine host suites pass, including 29 uploader tests. This remains experimental bench support—not flight validation. Windows/Linux flashing is not yet hardware-qualified.

@Auster

Auster commented Oct 17, 2026

Copy link
Copy Markdown
Author

Flash Mambo from the repository

These instructions use the tested macOS flashing path.
Only the controller application is updated, not the bootloader or internal Tracer.

Before starting, back up the SD card, models/settings and your radio’s own /CROSSFIRE/EEPROM.bin.
Have stock FreedomTX recovery through TBS Agent available.

  1. Prepare the source and dependencies
    From an existing EdgeTX clone, check out PR Add experimental TBS Mambo support with external Crossfire #7907:
git fetch https://github.com/EdgeTX/edgetx.git pull/7907/head
git switch --detach FETCH_HEAD
git submodule update --init --recursive

brew install cmake uv hidapi
uv sync --locked

You also need the complete ARM GNU Toolchain; the tested version is 14.2.rel1.
2. Configure, build and verify
Replace the toolchain path with its actual bin directory:

cmake --preset mambo \
  -DARM_TOOLCHAIN_DIR="/path/to/arm-gnu-toolchain/bin" \
  -DPython3_EXECUTABLE="$PWD/.venv/bin/python" \
  -DLUA=ON -DLUA_COMPILER=ON -DLUA_MIXER=ON

cmake --build build/mambo --target flash-plan --parallel 4

If the ARM toolchain is already on PATH, omit ARM_TOOLCHAIN_DIR.
flash-plan builds and verifies the image without accessing USB. Save the displayed sha256.
3. Connect the controller bootloader
Close TBS Agent and other radio tools.
With the radio off, hold PAGE while connecting USB. Use PAGE, not MENU.

cmake --build build/mambo --target flash-probe

Save the returned controller serial. This command only checks identity; it does not erase anything.
4. Flash
Replace both placeholders with your own results:

MAMBO_FLASH_SERIAL=SERIAL_FROM_PROBE \
MAMBO_FLASH_SHA256=SHA256_FROM_PLAN \
cmake --build build/mambo --target flash

Keep USB connected until the tool reports successful completion and a matching terminal checksum. Leave the default pacing unchanged.
If the image is rebuilt or changed, run flash-plan again and use its new SHA256.

@Auster
Auster marked this pull request as ready for review October 17, 2026 18:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants