Skip to content

✨ Prusa Buddy / Buddy XL boards#28443

Open
thinkyhead wants to merge 3 commits into
MarlinFirmware:bugfix-2.1.xfrom
thinkyhead:bf2_prusa_buddy_PR
Open

✨ Prusa Buddy / Buddy XL boards#28443
thinkyhead wants to merge 3 commits into
MarlinFirmware:bugfix-2.1.xfrom
thinkyhead:bf2_prusa_buddy_PR

Conversation

@thinkyhead

Copy link
Copy Markdown
Member

As requested in #28439

Initial support for Prusa Buddy and Prusa Buddy XL boards.

Copilot AI review requested due to automatic review settings May 22, 2026 18:32
@thinkyhead thinkyhead force-pushed the bf2_prusa_buddy_PR branch 2 times, most recently from b63484a to 9f107e6 Compare May 22, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial Marlin board definitions and PlatformIO environments for Prusa’s STM32F407-based Buddy family boards (Buddy Board Mini / xBuddy), integrating them into Marlin’s board/pins selection system.

Changes:

  • Added new STM32F4 pins headers for PRUSA_BUDDY and PRUSA_BUDDY_XL, sharing a common pin definition file.
  • Registered new board IDs in boards.h and hooked the new boards into pins.h selection.
  • Added new PlatformIO environments for building Buddy firmware targets in ini/stm32f4.ini.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Marlin/src/pins/stm32f4/pins_PRUSA_BUDDY.h Defines Buddy Mini board info and includes shared pin map.
Marlin/src/pins/stm32f4/pins_PRUSA_BUDDY_XL.h Defines xBuddy board info and includes shared pin map (with override placeholder).
Marlin/src/pins/stm32f4/pins_PRUSA_BUDDY_common.h Provides the shared pin map for both Buddy variants.
Marlin/src/pins/pins.h Adds board-to-pins-header include routing for the new boards.
Marlin/src/core/boards.h Registers new board numeric IDs for Buddy variants.
ini/stm32f4.ini Adds PlatformIO build environments for Buddy (and Buddy USB media-share variant).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Marlin/src/pins/stm32f4/pins_PRUSA_BUDDY_common.h Outdated
Comment thread Marlin/src/pins/pins.h Outdated
Comment thread Marlin/src/pins/stm32f4/pins_PRUSA_BUDDY_common.h Outdated
@thinkyhead thinkyhead force-pushed the bf2_prusa_buddy_PR branch 2 times, most recently from 29f7f0c to 1972074 Compare May 22, 2026 18:50
@Patronics

Patronics commented May 23, 2026

Copy link
Copy Markdown
Contributor

I haven't tested this on either of my relevant printers (a Prusa Mini and a Prusa Core One) yet (I'm a bit hesitant to do so for an AI-generated (or AI-researched, at least, based on your comment on #28439) commit until someone else tries them and confirms it's functional or at least harmless), but a potential issue I see based on the comments of the xBuddy board, it doesn't seem to have the right STM chip assigned for it? The comments (such as https://github.com/MarlinFirmware/Marlin/pull/28443/changes#diff-ec5185ebdac928ccc8ca33f58dafc737a2ab0230f6875bca5d23a04c3e0dbe2eR28 ) suggest it's using the same F407 series chip as the mini, while that seems inaccurate based on the schematic, which indicates the STM32F427ZIT6. I'm also curious why the file's name is Prusa Buddy XL rather than xBuddy as Prusa calls it and as is used on the Prusa Mk4 and Core One (L). And based on Prusa's Open source page the Buddy XL uses a different XLBuddy board, which apparently doesn't yet have an open source schematic? Did you somehow get enough information to accidentally implement the XLBuddy board rather than the xBuddy board?

@ellensp

ellensp commented May 23, 2026

Copy link
Copy Markdown
Contributor

This is a first draft... its got things like ETH_PHY_TYPE LAN8742A, which stock Marlin does not know anything about.

@thinkyhead

Copy link
Copy Markdown
Member Author

I expected a bit of a mess with this first attempt. I didn't clean up the collected research and used a pretty reliable model, but not the most premium by a long stretch. Of course, nothing goes into Marlin without thorough Human correction and review! Let's show this dumb AI how it's done.

@thinkyhead thinkyhead force-pushed the bf2_prusa_buddy_PR branch from 1972074 to 25ca0bd Compare May 23, 2026 20:07
- Add MARLIN_PRUSA_BUDDY PlatformIO variant (based on MARLIN_BTT_E3_RRF)
  with PF6/PF7 TIM10/TIM11 PWM entries enabled for fan output
- Switch STM32F407VG_prusa_buddy env to use new MARLIN_PRUSA_BUDDY variant
  (previous MARLIN_F4x7Vx lacked PF/PG pins entirely, causing false conflicts)
- Wrap PS_ON_PIN in ENABLED(PSU_CONTROL) guard (PA4 shared with POWER_LOSS_PIN)
- Rename FAN_PIN -> FAN0_PIN in pins_PRUSA_XBUDDY.h (Marlin mainline convention)
@thinkyhead

Copy link
Copy Markdown
Member Author

Ok, we have successful build now. I put a smarter model (Sonnet 4.6) on this task and told it to iterate until the build succeeded. Sonnet being a smarter model, it should have most things sorted out correctly, but no guarantees! The step of adding supporting files to the buildroot/PlatformIO folder was a new step that will now be formalized in the workflow and associated skills.

I also put this to the test with the AnyCubic Kobra Max and the Duet 2 Maestro. These trials with a lot of different boards should help to further refine and document the complete process of integrating new boards into Marlin. This will all become useful as a reference document for developers that will be posted on the new marlinfw dot org site.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants