Skip to content

Add Phoque1 and Phoque2 brushless driver variants - #3047

Open
Moddingear wants to merge 1 commit into
stm32duino:mainfrom
Moddingear:main
Open

Add Phoque1 and Phoque2 brushless driver variants#3047
Moddingear wants to merge 1 commit into
stm32duino:mainfrom
Moddingear:main

Conversation

@Moddingear

Copy link
Copy Markdown
Contributor

This adds the Phoque1 and Phoque2 brushless driver variants.

These boards are currently in the closed testing phase.

Comment thread variants/STM32G4xx/G431C(6-8-B)U_G441CBU/generic_clock_PHOQUE2.c Outdated
Comment thread variants/STM32G4xx/G431V(6-8-B)T_G441VBT/generic_clock_PHOQUE1.c Outdated
@Moddingear
Moddingear force-pushed the main branch 3 times, most recently from 3907744 to 6c06fd7 Compare August 18, 2026 07:22
@fpistm fpistm added the new variant Add support of new bard label Aug 18, 2026
@fpistm fpistm added this to the 3.0.1/3.1.0 milestone Aug 18, 2026
@github-project-automation github-project-automation Bot moved this from In progress to Needs review in STM32 core based on ST HAL Aug 18, 2026
@fpistm
fpistm self-requested a review August 18, 2026 09:04

@fpistm fpistm left a comment

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.

Thanks for the changes.
Some new comments.

Also It misses the declaration of your boards in the boards.txt else they will not be displayed in the Arduino IDE. You can add them here:


Examples:

# PHOQUE1
GenG4.menu.pnum.PHOQUE1=PHOQUE1
GenG4.menu.pnum.PHOQUE1.upload.maximum_size=131072
GenG4.menu.pnum.PHOQUE1.upload.maximum_data_size=32768
GenG4.menu.pnum.PHOQUE1.build.board=PHOQUE1
GenG4.menu.pnum.PHOQUE1.build.product_line=STM32G431xx
GenG4.menu.pnum.PHOQUE1.build.variant=STM32G4xx/G431V(6-8-B)T_G441VBT
GenG4.menu.pnum.PHOQUE1.build.variant_h=variant_{build.board}.h
GenG4.menu.pnum.PHOQUE1.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32G4xx/STM32G431.svd

# PHOQUE2...

You can add it

Comment thread variants/STM32G4xx/G431C(6-8-B)U_G441CBU/variant_PHOQUE2.cpp Outdated
Comment thread variants/STM32G4xx/G431C(6-8-B)U_G441CBU/variant_PHOQUE2.cpp Outdated
Comment thread variants/STM32G4xx/G431C(6-8-B)U_G441CBU/variant_PHOQUE2.cpp Outdated
Comment thread variants/STM32G4xx/G431V(6-8-B)T_G441VBT/variant_PHOQUE1.cpp Outdated
Comment thread variants/STM32G4xx/G431V(6-8-B)T_G441VBT/variant_PHOQUE1.cpp Outdated
Comment thread variants/STM32G4xx/G431V(6-8-B)T_G441VBT/variant_PHOQUE1.cpp Outdated
@Moddingear
Moddingear force-pushed the main branch 3 times, most recently from d93ce1c to 515d2ef Compare August 18, 2026 10:25
@Moddingear

Copy link
Copy Markdown
Contributor Author

Thanks for all the feedback !

Regarding adding the board in Arduino, I saw that wasn't done for the BG431-ESC1, so I didn't do it for my boards. Maybe it should be added ?

@Moddingear

Copy link
Copy Markdown
Contributor Author

Also i'm squashing all my commits, as most repos ask for it to be done when contributing, if that's something i shouldn't be doing, don't hesitate to tell me.

@fpistm

fpistm commented Aug 18, 2026

Copy link
Copy Markdown
Member

Yes at the end all will be squashed. Moreover, I think astyle should be passed. I've an issue with the action performing the check as astyle 3.1 should be used, newer one required some changed. I will apply it and push on your branch.

@fpistm

fpistm commented Aug 18, 2026

Copy link
Copy Markdown
Member

Thanks for all the feedback !

Regarding adding the board in Arduino, I saw that wasn't done for the BG431-ESC1, so I didn't do it for my boards. Maybe it should be added ?

The BG431-ESC1 has not been added that's why it is not in the boards.txt

Sorry my mistake it is available in the disco menu as it is a Discovery board:

Arduino_Core_STM32/boards.txt

Lines 1348 to 1362 in 36a8f85

# B_G431B_ESC1 board
Disco.menu.pnum.B_G431B_ESC1=B-G431B-ESC1
Disco.menu.pnum.B_G431B_ESC1.node="NODE_G431CB,NOD_G431CB,DIS_G431CB"
Disco.menu.pnum.B_G431B_ESC1.upload.maximum_size=131072
Disco.menu.pnum.B_G431B_ESC1.upload.maximum_data_size=32768
Disco.menu.pnum.B_G431B_ESC1.build.mcu=cortex-m4
Disco.menu.pnum.B_G431B_ESC1.build.fpu=-mfpu=fpv4-sp-d16
Disco.menu.pnum.B_G431B_ESC1.build.float-abi=-mfloat-abi=hard
Disco.menu.pnum.B_G431B_ESC1.build.board=B_G431B_ESC1
Disco.menu.pnum.B_G431B_ESC1.build.series=STM32G4xx
Disco.menu.pnum.B_G431B_ESC1.build.product_line=STM32G431xx
Disco.menu.pnum.B_G431B_ESC1.build.variant=STM32G4xx/G431C(6-8-B)U_G441CBU
Disco.menu.pnum.B_G431B_ESC1.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
Disco.menu.pnum.B_G431B_ESC1.openocd.target=stm32g4x
Disco.menu.pnum.B_G431B_ESC1.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32G4xx/STM32G431.svd

@fpistm fpistm left a comment

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.

Hi @Moddingear
I've updated your PR.
The boards was not properly added. boards_entry.txt is a generated file to help boards addition in the boards.txt.
So fix this, applied astyle, reference your boards in the README.md and update the cmake database.

@github-project-automation github-project-automation Bot moved this from Needs review to Reviewer approved in STM32 core based on ST HAL Aug 21, 2026
@fpistm

fpistm commented Aug 21, 2026

Copy link
Copy Markdown
Member

Boards are now well supported.
image

If the PR is ok for you, I will merge it. Any link on thoses boards?

@Moddingear

Copy link
Copy Markdown
Contributor Author

No link yet, as I don't have a website yet, but as soon as they're available.

PR is ok for me ! thanks for the help !

@Moddingear

Copy link
Copy Markdown
Contributor Author

Actually, seeing as I can add defines in the cmake files, wait before merging, I'll need to add some definitions.

@Moddingear
Moddingear force-pushed the main branch 2 times, most recently from 5c61eae to 4647de0 Compare August 21, 2026 14:57
@Moddingear

Copy link
Copy Markdown
Contributor Author

All good now !

Expect a future PR once I've got the website set up, and maybe then they could be moved out of generic ?

Comment thread cmake/boards_db.cmake Outdated
Comment thread cmake/boards_db.cmake Outdated
Comment thread README.md Outdated
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Needs review in STM32 core based on ST HAL Aug 21, 2026
@fpistm

fpistm commented Aug 21, 2026

Copy link
Copy Markdown
Member

All good now !

Expect a future PR once I've got the website set up, and maybe then they could be moved out of generic ?

You could move it out if you want in this PR.

@Moddingear

Copy link
Copy Markdown
Contributor Author

I think I made it correctly, I ran python3 cmake/scripts/update_boarddb.py -b boards.txt -p platform.txt -t cmake/templates/boards_db.cmake -o cmake/boards_db.cmake to update the cmake, and also I split these board into their own category (to get the custom define).

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

Labels

new variant Add support of new bard

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

2 participants