Add BCubeF745v2 board#32753
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds ArduPilot ChibiOS hardware/bootloader definitions for the B-CUBE F745 V2 flight controller target.
Changes:
- Introduces new
hwdef.dat/hwdef-bl.datfor BCubeF745v2 (MCU/pins/peripherals, storage, sensors, OSD). - Adds board documentation (
README.md) describing interfaces, UART mapping, PWM groups, GPIOs, and flashing. - Registers a new bootloader artifact and board ID (
board_types.txt) for APJ / bootloader builds.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| libraries/AP_HAL_ChibiOS/hwdef/BCubeF745v2/hwdef.dat | Main board pin/peripheral mapping, sensor/OSD config, DMA priorities, storage/logging flags |
| libraries/AP_HAL_ChibiOS/hwdef/BCubeF745v2/hwdef-bl.dat | Bootloader-specific minimal pin config (USB, LED/buzzer, motor outputs, CS pins) |
| libraries/AP_HAL_ChibiOS/hwdef/BCubeF745v2/README.md | User-facing board documentation (specs, serial mapping, PWM groups, flashing notes) |
| Tools/bootloaders/BCubeF745v2_bl.hex | Prebuilt bootloader image for the target |
| Tools/AP_Bootloader/board_types.txt | Adds new AP_HW_BCUBEF745V2 board ID mapping |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8fb4369 to
68c2ca9
Compare
|
Just a comment on naming.. we love other boards turning up, but "Cube" is well and truly a CubePilot thing, are you able to please rename this before merging? |
|
Hi @proficnc, I totally understand the concern regarding the 'Cube' naming and CubePilot's branding. However, since the board is commercially sold under this name (link here), I was worried that changing it might make it harder for users to identify. Do you think the current name could be misleading? If so, do you have any suggestions for an alternative that would allow users to identify the hardware correctly without overlapping your naming? |
68c2ca9 to
568f9ed
Compare
568f9ed to
37f908b
Compare
|
Hi, just a quick update on this PR. I’ve rebased it on top of the latest master to keep it up to date. Please let me know if there’s anything I should adjust to help with the review. Thanks! |
37f908b to
b7a6076
Compare
|
Hi, just a gentle follow-up on this PR. @Hwurzburg if you have a chance to take a look, I’d appreciate any feedback. Thanks! |
|
Will be next week ...
moving from TX to TN this week...computers are packed
Yahoo Mail: Search, Organize, Conquer
On Sun, May 10, 2026 at 3:09 PM, Pietro ***@***.***> wrote: pietrosaccone left a comment (ArduPilot/ardupilot#32753)
Hi, just a gentle follow-up on this PR.
@Hwurzburg if you have a chance to take a look, I’d appreciate any feedback.
I’ve already rebased the branch on the latest master and I’m available for any required changes.
Thanks!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
/hwdef-check reviews a new-board hwdef PR end-to-end: fetches the PR via gh, makes a temporary worktree, runs deterministic checks (files, APJ_BOARD_ID, commit structure, hwdef.dat patterns, DMA allocation) plus a playbook pass, and drafts a review comment for the user to approve before posting. Testing against ArduPilot/ardupilot#32753 caught two hwdef-playbook bugs that the new skill would have propagated: - Default STM32_ST_USE_TIMER is TIM2 on F1/F3/F4/F7/G4/L4 and TIM5 on H7 (per libraries/AP_HAL_ChibiOS/hwdef/common/stm32*_mcuconf.h). Previous text had the values swapped and conflated "recommendation when default conflicts with PWM" with "default", which led the reviewer to a false-positive must-fix. - GPS_DRV_OPTIONS is a single global AP_GPS parameter and the "force ublox 115200" bit is 2 (value 4), not 1. Don't recommend it on a board where at least one GPS port has DMA — it would needlessly throttle the working port. Permissions added for the skill are scoped: gh pr view/diff/list/ status and rm -f /tmp/* in shared settings; gh pr checkout/comment, git worktree/fetch/rev-parse/submodule only inside the skill's allowed-tools so destructive gh and git operations still prompt.
|
Automated hwdef review ( Worktree: Build
Must-fix
Should-fix
Notes
Generated by Claude via |
dfe8889 to
b8a0ecb
Compare
|
Hi @andyp1per, |
Hwurzburg
left a comment
There was a problem hiding this comment.
Several issues...pinout/wiring diagram has many conflicts with hwdef:
- UART2 is shown in image as RC input, not UART 6
- UART3 is the first GPS, so first system GPS must be marked attached, unless you default its protocol in hwdef to NONE
- UART7 default protocol should be set to ESCTelemetry
- UART6 is shown on the DisplayPort connector...whichever UART is actually on that
connector should have is default protocol set to MSP_DisplayPort - I cannot find the RSSI in pin on the image
once these are addressed, I can review the Readme for consistency and required documentation
b8a0ecb to
cc95807
Compare
|
Hi @Hwurzburg, I have applied all the requested fixes. |
94cee63 to
312da19
Compare
|
Hi @Hwurzburg , Thanks for the review! I have applied the requested fixes. |
1242f52 to
d0ccdf1
Compare
|
Automated hwdef review ( PR 32753 · base Build
Must-fix
Should-fix
Notes
Generated by Claude via |
990fd57 to
384d951
Compare
|
Hi @andyp1per , thanks for the review! I've applied all the requested changes. Regarding outputs 1 and 2 — even though the supplier's datasheet lists them as bi-directional, testing confirmed they actually aren't, so I've removed the related notes from the README. All other suggestions have been addressed as well. As for |
Hwurzburg
left a comment
There was a problem hiding this comment.
my changes were either not implemented or were removed....
5e37107 to
71836ff
Compare
|
I'm sorry, some changes to the hwdef.dat file were missed after the latest review. The other changes had actually been applied. |
71836ff to
e2eddc6
Compare
Hwurzburg
left a comment
There was a problem hiding this comment.
needs unresolved requested changes addressed also
e2eddc6 to
787d64d
Compare
Hwurzburg
left a comment
There was a problem hiding this comment.
still did not address all my requested changes! getting a bit tiring
787d64d to
baead5c
Compare
baead5c to
1d4110a
Compare
|
Sorry, my mistake. Two requested fixes were missed because of a misunderstanding on my side, and another fix was still in staging and had not been pushed yet. I've now addressed everything. Thanks for the review and for your patience. |
| FLASH_RESERVE_START_KB 0 | ||
|
|
||
| # the location where the bootloader will put the firmware | ||
| FLASH_BOOTLOADER_LOAD_KB 96 |
There was a problem hiding this comment.
The STM32F745 has a non-uniform flash sector layout: sectors 0–3 are 16 KB each (64 KB total), sector 4 is 64 KB, and sectors 5–11 are 128 KB each. Since flash erase operates on a full sector at a time, the bootloader and firmware must not share the same sector, otherwise erasing one would wipe the other.
Sectors 0–3 (64 KB) are reserved for the bootloader. The extra 32 KB of padding up to 96 KB acts as a buffer inside sector 4, ensuring the bootloader has room to grow without ever touching the firmware region. The firmware itself starts at sector 5 (0x08020000 = 128 KB), which is a clean sector boundary safe to erase independently.
This is the same for other boards using the same microcontroller, such as BlitzF745 or FlywooF745.
| # save some flash | ||
| include ../include/minimize_fpv_osd.inc | ||
|
|
||
| # minimize_fpv_osd.inc disables external baro probing; re-enable for this board |
There was a problem hiding this comment.
Why would you do that by default?
There was a problem hiding this comment.
I’m using minimize_fpv_osd.inc because there is not enough flash memory available and the build fails otherwise.
I have to re-enable AP_BARO_PROBE_EXTERNAL_I2C_BUSES because, for some reason, when I connect the external compass, it gets detected correctly but the barometer stops working. After several tests, and after looking at how similar issues were handled on other boards, this solution consistently fixes the problem.
There was a problem hiding this comment.
@Hwurzburg @andyp1per any idea how this all works?!
Summary
Add support for the B-CUBE F745 V2 flight controller.
Classification & Testing
Hardware Testing Description:
waffor theBCubeF745v2target..bin/.hexlocally and verified board boots correctly.Description
This Pull Request introduces the hardware definition and bootloader for the B-CUBE F745 V2.
The board features:
Included are the
board_types.txtupdate,hwdef.dat,hwdef-bl.dat, comprehensiveREADME.md(conforming to the ardupilot_wiki board template, listing GPIOs, Timer groups for DShot compatibility, and explicit UART mappings) with board image and bootloaders.