Skip to content

Add ACCT/ACCTON_GFH7 board configuration - #1145

Open
RunnyCow wants to merge 13 commits into
betaflight:masterfrom
RunnyCow:Branch_H7_master
Open

Add ACCT/ACCTON_GFH7 board configuration#1145
RunnyCow wants to merge 13 commits into
betaflight:masterfrom
RunnyCow:Branch_H7_master

Conversation

@RunnyCow

@RunnyCow RunnyCow commented Jul 7, 2026

Copy link
Copy Markdown

Description

Add support for the new flight controller: ACCT/ACCTON_GFH7

Hardware Specifications

  • MCU: STM32H753
  • Gyro: ICM42688P(SPI4)、LSM6DSK320X(SPI2)
  • Baro: DPS368(I2C1)
  • Blackbox: SD CARD
  • Motor Output: 4
  • UARTs: 7

Test Plan

Checklist (✓/✕, or y/n)

  • [ n] passed Betaflight team's schematics review
  • [ y] passed hardware samples testing
  • [ y] follows guidelines
  • [ y ] follows connector standards
  • [ n] flight tested
  • [ n] comments/issues resolved

Summary by CodeRabbit

  • New Features
    • Added support for the ACCT manufacturer.
    • Added the ACCTON GFH7 flight controller target, including its hardware peripherals, sensor configuration, connectivity, storage, and control settings.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The pull request registers Accton Technology Corporation and adds the ACCTON_GFH7 STM32H753 Betaflight target configuration, including hardware mappings, enabled peripherals, timers, defaults, and output inversion settings.

Changes

New board target support

Layer / File(s) Summary
Manufacturer registration and board configuration
Manufacturers.md, configs/ACCT/ACCTON_GFH7/config.h
Adds the ACCT manufacturer entry and defines the ACCTON_GFH7 target identity, sensors, pin mappings, timers, peripherals, storage defaults, gyro settings, and inverted outputs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • betaflight/config#1051: Adds a manufacturer entry and corresponding Betaflight target configuration.
  • betaflight/config#1140: Adds a manufacturer entry and STM32 target configuration under the standard configuration path.
  • betaflight/config#1154: Adds a related manufacturer ID entry while this pull request adds the ACCTON_GFH7 target.

Suggested labels: Uses Betaflight Connector Standard

Suggested reviewers: sugaark, haslinghuis, nerdcopter

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the added ACCT/ACCTON_GFH7 board configuration.
Description check ✅ Passed The description identifies the board, hardware specifications, and test checklist, including the required review and testing status.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch Branch_H7_master
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ot0tot

ot0tot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Config does not match schematic. The same comments for the F4 config apply here.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
configs/ACCTON_GFH7/config.h (2)

96-97: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fix typo in comment.

♻️ Proposed refactor
 `#define` PINIO1_PIN    PC12 // 12V_EN Switch
-#define PINIO2_PIN    PE3 // hearter switch pin
+#define PINIO2_PIN    PE3 // heater switch pin
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@configs/ACCTON_GFH7/config.h` around lines 96 - 97, Correct the spelling in
the comment for PINIO2_PIN, changing “hearter” to “heater” while leaving the
macro definition and PINIO1_PIN unchanged.

126-128: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Define a user-friendly name for PINIO2_BOX.

Since PINIO1_BOX has a custom name defined via BOX_USER1_NAME, consider defining a corresponding name for PINIO2_BOX (e.g., BOX_USER2_NAME) so it displays clearly in the Configurator instead of defaulting to "USER2".

♻️ Proposed refactor
 `#define` BOX_USER1_NAME      "VTX SWITCH"
+#define BOX_USER2_NAME      "HEATER SWITCH"
 `#define` PINIO1_BOX   40
 `#define` PINIO2_BOX   41
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@configs/ACCTON_GFH7/config.h` around lines 126 - 128, Define a corresponding
user-friendly name for PINIO2_BOX by adding the appropriate BOX_USER2_NAME
configuration alongside BOX_USER1_NAME, so the second user mode displays a
descriptive label instead of the default “USER2”.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@configs/ACCTON_GFH7/config.h`:
- Around line 96-97: Correct the spelling in the comment for PINIO2_PIN,
changing “hearter” to “heater” while leaving the macro definition and PINIO1_PIN
unchanged.
- Around line 126-128: Define a corresponding user-friendly name for PINIO2_BOX
by adding the appropriate BOX_USER2_NAME configuration alongside BOX_USER1_NAME,
so the second user mode displays a descriptive label instead of the default
“USER2”.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6e63494d-286d-40f1-a970-f5aff7208487

📥 Commits

Reviewing files that changed from the base of the PR and between 3743fc7 and 13c881b.

📒 Files selected for processing (1)
  • configs/ACCTON_GFH7/config.h

@RunnyCow

Copy link
Copy Markdown
Author

Modified the H7 config settings based on the F4 config settings.

1.add servo
2.pinio setting
3.timer_pin_mapping
4.ADC, BARO and MAG set
5.SYSTEM_HSE_MHZ modified
@RunnyCow

Copy link
Copy Markdown
Author

@ot0tot Modified the H7 config settings based on H7 new schematic.Please review it .Thanks.

Comment thread configs/ACCTON_GFH7/config.h Outdated
Comment thread configs/ACCTON_GFH7/config.h Outdated
Comment thread configs/ACCT/ACCTON_GFH7/config.h
Comment thread configs/ACCTON_GFH7/config.h Outdated
Comment thread configs/ACCT/ACCTON_GFH7/config.h Outdated
Comment thread configs/ACCTON_GFH7/config.h Outdated
Comment thread configs/ACCT/ACCTON_GFH7/config.h Outdated
Comment thread configs/ACCTON_GFH7/config.h Outdated
Comment thread configs/ACCTON_GFH7/config.h Outdated
Comment thread configs/ACCTON_GFH7/config.h Outdated
Comment thread configs/ACCTON_GFH7/config.h Outdated
1. removed second IMU(LSM6DSK320X) defined
2. removed OSD defined
3. removed LED1_PIN defined
4. removed piniox_config defined
5. modified LED_STRIO_PIN configuration
6. modified ADC1_DMA_OPT configuration
7. modified MAG_I2C configuration
8. modified DSHOT_BITBANG configuration
9. add DEFAULT_VOLTAGE_METER_SCALE
10. add DEFAULT_GYRO_TO_USE

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
configs/ACCTON_GFH7/config.h (1)

29-36: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Enable the LSM6DSK320X driver for gyro 2.

GYRO_2_SPI_INSTANCE SPI2 leaves GYRO_2 enabled with no matching sensor macro, because only USE_ACC_SPI_ICM42688P / USE_GYRO_SPI_ICM42688P are defined here. Add USE_ACCGYRO_LSM6DSK320X so the second IMU is built and can be configured separately from gyro 1.

Proposed fix
 `#define` USE_ACC_SPI_ICM42688P
+#define USE_ACCGYRO_LSM6DSK320X
 `#define` USE_GYRO
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@configs/ACCTON_GFH7/config.h` around lines 29 - 36, Add the
USE_ACCGYRO_LSM6DSK320X feature macro alongside the existing sensor definitions
in config.h so GYRO_2 on SPI2 has a matching LSM6DSK320X driver while preserving
the existing ICM42688P configuration for gyro 1.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@configs/ACCTON_GFH7/config.h`:
- Around line 98-100: Correct the hardware name spelling in the BOX_USER2_NAME
label and the adjacent PINIO2_PIN comment, changing “HEARTER”/“hearter” to
“HEATER”/“heater” while leaving the pin definitions unchanged.

---

Outside diff comments:
In `@configs/ACCTON_GFH7/config.h`:
- Around line 29-36: Add the USE_ACCGYRO_LSM6DSK320X feature macro alongside the
existing sensor definitions in config.h so GYRO_2 on SPI2 has a matching
LSM6DSK320X driver while preserving the existing ICM42688P configuration for
gyro 1.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4df359a1-c905-4afb-bd8f-5365fb2dda11

📥 Commits

Reviewing files that changed from the base of the PR and between 5f99440 and 02a6bbd.

📒 Files selected for processing (1)
  • configs/ACCTON_GFH7/config.h

Comment thread configs/ACCT/ACCTON_GFH7/config.h Outdated
@RunnyCow

Copy link
Copy Markdown
Author

@ot0tot Modified the H7 config settings based on your suggestions.Please review it .Thanks.

@nerdCopter

This comment was marked as outdated.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@configs/ACCT/ACCTON_GFH7/config.h`:
- Around line 29-36: Add the supported LSM6DSK320X accelerometer/gyro driver
configuration macro alongside the existing gyro driver defines in the
ACCTON_GFH7 configuration, while preserving the current ICM42688P settings and
second-gyro pin/SPI declarations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e666729-5ea6-4429-ad70-6bc76d6785c0

📥 Commits

Reviewing files that changed from the base of the PR and between 02a6bbd and 2ad1275.

📒 Files selected for processing (1)
  • configs/ACCT/ACCTON_GFH7/config.h

Comment thread configs/ACCT/ACCTON_GFH7/config.h
@coderabbitai coderabbitai Bot mentioned this pull request Jul 31, 2026
9 tasks
@RunnyCow

RunnyCow commented Aug 3, 2026

Copy link
Copy Markdown
Author

@osirisinferi Modified the H7 config settings based on your suggestions.Please review it .Thanks.

@coderabbitai coderabbitai Bot mentioned this pull request Aug 12, 2026
@RunnyCow RunnyCow changed the title Add ACCTON_GFH7 board configuration Add ACCT/ACCTON_GFH7 board configuration Aug 14, 2026
@RunnyCow RunnyCow closed this Aug 14, 2026
…into Branch_H7_master

# Conflicts:
#	Manufacturers.md
@RunnyCow RunnyCow reopened this Aug 17, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Aug 17, 2026
6 tasks
@nerdCopter

Copy link
Copy Markdown
Member

@coderabbitai, regarding this #1145 (review) , is it resolved? any other open items to resolve?

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '=== PR metadata ==='
gh pr view 1145 --repo betaflight/config --json number,state,isDraft,mergeable,reviewDecision,statusCheckRollup,files

echo
echo '=== Referenced review ==='
gh api repos/betaflight/config/pulls/1145/reviews/4795114658 \
  --jq '{id,user:.user.login,state,body,submitted_at,commit_id}'

echo
echo '=== Review threads ==='
gh api graphql -F owner='betaflight' -F name='config' -F number=1145 -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes {
          isResolved
          path
          line
          originalLine
          comments(first: 20) {
            nodes { author { login } body createdAt url }
          }
        }
      }
    }
  }
}' --jq '.data.repository.pullRequest.reviewThreads.nodes[] |
  {isResolved,path,line,originalLine,comments:[.comments.nodes[] | {author:.author.login,body,url}]}'

echo
echo '=== Changed configuration ==='
ast-grep outline configs/ACCT/ACCTON_GFH7/config.h --items all
nl -ba configs/ACCT/ACCTON_GFH7/config.h | sed -n '1,220p'
echo
rg -n -C2 '^\|\s*ACCT\s*\|' Manufacturers.md

Length of output: 22553


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '=== Sensor and feature definitions ==='
sed -n '20,115p' configs/ACCT/ACCTON_GFH7/config.h

echo
echo '=== Timer, ADC, video, and defaults ==='
sed -n '115,180p' configs/ACCT/ACCTON_GFH7/config.h

echo
echo '=== Relevant current declarations ==='
rg -n -C2 \
  'USE_ACCGYRO_LSM6DSK320X|USE_(ACC|GYRO)_SPI_ICM42688P|GYRO_2_|DEFAULT_GYRO_TO_USE|LED[0-9]?_PIN|MAX7456_SPI_INSTANCE|ADC1_DMA_OPT' \
  configs/ACCT/ACCTON_GFH7/config.h

echo
echo '=== Failed target-check log ==='
gh run view 32233713853 --repo betaflight/config --log-failed

Length of output: 6472


@nerdCopter, the referenced review is marked resolved in GitHub, but it is not fully resolved in the current source.

Open items:

  1. Fix the failed Config File Check.
    Process Target ACCTON_GFH7 fails with:
    No TARGET_MCU specified. Is the target.mk valid for STM32H753?
    The target needs a valid target.mk that declares the STM32H753 target MCU.

  2. Resolve the second-gyro configuration.
    config.h still declares GYRO_2_EXTI_PIN, GYRO_2_CS_PIN, and GYRO_2_SPI_INSTANCE SPI2.
    It does not define USE_ACCGYRO_LSM6DSK320X.
    If the LSM6DSK320X is an optional supported board variant, add the driver macro. Otherwise, remove the GYRO_2_* declarations.

  3. Correct the remaining spelling error.
    PINIO2_PIN still has the comment hearter switch pin.
    Change it to heater switch pin.

  4. Resolve the maintainer review threads.

    • Specify DEFAULT_GYRO_TO_USE for the selected default IMU.
    • Confirm whether MAX7456_SPI_INSTANCE SPI1 is valid for the schematic. Remove it if the hardware is absent.
    • Resolve the stale ADC thread. ADC1_DMA_OPT 10 is now present.
    • Resolve the stale LED thread. PC13 is no longer configured, and LED0_PIN is now PE10.

The directory migration requirement is resolved. BOARD_NAME matches configs/ACCT/ACCTON_GFH7, MANUFACTURER_ID is ACCT, and Manufacturers.md contains ACCT. I verified these items using the existing board-review guidance.


🧠 Learnings used
Learnt from: ot0tot
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have `#define` BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.

Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:09:11.644Z
Learning: For Betaflight board configuration reviews, the manufacturer must be registered in the Manufacturers.md file. Always verify that the MANUFACTURER_ID in config.h has a corresponding entry in Manufacturers.md.

You are interacting with an AI system.

@RunnyCow RunnyCow closed this Aug 22, 2026
@RunnyCow RunnyCow reopened this Aug 22, 2026
@RunnyCow
RunnyCow requested a review from osirisinferi August 26, 2026 05:18
@blckmn blckmn added the Checks failing CI checks are failing label Aug 30, 2026

@RunnyCow RunnyCow left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. I have updated the code accordingly.

@nerdCopter

Copy link
Copy Markdown
Member

@RunnyCow , your last commit only addressed the spelling error and skipped the prior concerns in #1145 (comment) if i'm not mistaken.

2、Removed MAX7456_SPI_INSTANCE SPI1 , because the hardware is absent
@RunnyCow

RunnyCow commented Sep 1, 2026

Copy link
Copy Markdown
Author

@nerdCopter I have resolved all the issues; please review it again.Thank you.

@blckmn blckmn removed the Checks failing CI checks are failing label Sep 1, 2026
Comment thread configs/ACCT/ACCTON_GFH7/config.h Outdated
#define SYSTEM_HSE_MHZ 16
#define GYRO_1_SPI_INSTANCE SPI4
#define SDIO_DEVICE SDIODEV_2
#define SDIO_USE_4BIT 1 No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No newline on EOF.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@haslinghuis I add newline on EOF. Thank you.

@blckmn blckmn added the Checks failing CI checks are failing label Sep 1, 2026

#pragma once

#define FC_TARGET_MCU STM32H753

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

CI: Makefile:258: *** No TARGET_MCU specified. Is the target.mk valid for STM32H753?. Stop.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

H743 maybe?

@haslinghuis

Copy link
Copy Markdown
Member

This PR needs betaflight/betaflight#15654

@blckmn blckmn removed the Checks failing CI checks are failing label Sep 2, 2026
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.

6 participants