!arch/stm32: split stm32 and stm32f0l0g0 into per-chip-family directories#19143
Merged
Conversation
raiden00pl
requested review from
Donny9,
GUIDINGLI,
Ouss4,
acassis,
adamfeuer,
anchao,
antmerlino,
btashton,
cederom,
davids5,
gustavonihei,
hartmannathan,
jerpelea,
linguini1,
liuguo09,
masayuki2009,
michallenc,
patacongo,
pkarashchenko,
pussuw,
rcsim,
simbit18,
tmedicci,
xiaoxiang781216,
yamt and
yf13
as code owners
June 15, 2026 10:05
raiden00pl
force-pushed
the
stm32_refactor_all_pr8
branch
from
June 16, 2026 09:12
93dd46b to
eba261d
Compare
xiaoxiang781216
previously approved these changes
Jun 16, 2026
BREAKING CHANGE: Move the existing STM32 board common sources to boards/arm/common/stm32 and fold in the common STM32F0/L0/G0/C0 board helpers so split STM32 board families can share one source tree. Signed-off-by: raiden00pl <raiden00@railab.me>
Add boards/arm/stm32l4/common so STM32L4 boards build through the shared STM32 board-common tree (boards/arm/common/stm32), like the other split STM32 families. Convert each STM32L4 board's src/Makefile to src/Make.defs so the per-board sources are pulled in by the common board Makefile. Signed-off-by: raiden00pl <raiden00@railab.me>
BREAKING CHANGE: Common STM32 source and private header files moved to arch/arm/src/common/stm32. Out-of-tree code that references family-local common source paths must update includes, build rules, and source paths to the new common STM32 location. Signed-off-by: raiden00pl <raiden00@railab.me>
BREAKING CHANGE: Part of splitting the legacy stm32 super-directory; relocates the stm32f0 sources, headers and boards into arch/arm/src/stm32f0, arch/arm/include/stm32f0 and boards/arm/stm32f0. Signed-off-by: raiden00pl <raiden00@railab.me>
BREAKING CHANGE: Part of splitting the legacy stm32 super-directory; relocates the stm32l0 sources, headers and boards into arch/arm/src/stm32l0, arch/arm/include/stm32l0 and boards/arm/stm32l0. Signed-off-by: raiden00pl <raiden00@railab.me>
BREAKING CHANGE: Part of splitting the legacy stm32 super-directory; relocates the stm32g0 sources, headers and boards into arch/arm/src/stm32g0, arch/arm/include/stm32g0 and boards/arm/stm32g0. Signed-off-by: raiden00pl <raiden00@railab.me>
Move the stm32c0 sources, headers and boards into arch/arm/src/stm32c0, arch/arm/include/stm32c0 and boards/arm/stm32c0, then finalize the split: source each split family directly in arch/arm/Kconfig and boards/Kconfig and remove the now-empty combined arch/arm/src/stm32f0l0g0 and boards/arm/stm32f0l0g0 trees. BREAKING CHANGE: The combined STM32F0/L0/G0/C0 architecture and board paths were split into stm32f0, stm32l0, stm32g0, and stm32c0 directories. Out-of-tree boards, include paths, source paths, and defconfigs must move from stm32f0l0g0 to the matching split family. Signed-off-by: raiden00pl <raiden00@railab.me>
BREAKING CHANGE: Part of splitting the legacy stm32 super-directory; relocates the stm32f1 sources, headers and boards into arch/arm/src/stm32f1, arch/arm/include/stm32f1 and boards/arm/stm32f1. Signed-off-by: raiden00pl <raiden00@railab.me>
BREAKING CHANGE: Part of splitting the legacy stm32 super-directory; relocates the stm32f2 sources, headers and boards into arch/arm/src/stm32f2, arch/arm/include/stm32f2 and boards/arm/stm32f2. Signed-off-by: raiden00pl <raiden00@railab.me>
BREAKING CHANGE: Part of splitting the legacy stm32 super-directory; relocates the stm32f3 sources, headers and boards into arch/arm/src/stm32f3, arch/arm/include/stm32f3 and boards/arm/stm32f3. Signed-off-by: raiden00pl <raiden00@railab.me>
BREAKING CHANGE: Part of splitting the legacy stm32 super-directory; relocates the stm32f4 sources, headers and boards into arch/arm/src/stm32f4, arch/arm/include/stm32f4 and boards/arm/stm32f4. Signed-off-by: raiden00pl <raiden00@railab.me>
BREAKING CHANGE: Part of splitting the legacy stm32 super-directory; relocates the stm32g4 sources, headers and boards into arch/arm/src/stm32g4, arch/arm/include/stm32g4 and boards/arm/stm32g4. Signed-off-by: raiden00pl <raiden00@railab.me>
Move the stm32l1 sources, headers and boards into arch/arm/src/stm32l1, arch/arm/include/stm32l1 and boards/arm/stm32l1, then finalize the split: source each split family directly in arch/arm/Kconfig and boards/Kconfig and remove the now-empty combined arch/arm/src/stm32 and boards/arm/stm32 trees. BREAKING CHANGE: The legacy STM32 architecture and board paths were split into stm32f1, stm32l1, stm32f2, stm32f3, stm32f4, and stm32g4 directories. Out-of-tree boards must move from stm32 to the matching split family. Signed-off-by: raiden00pl <raiden00@railab.me>
fix various stm32 boards errors found by CI Signed-off-by: raiden00pl <raiden00@railab.me>
update arm-13.dat build targets so they match state before stm32 split Signed-off-by: raiden00pl <raiden00@railab.me>
add STM32 porting guide Signed-off-by: raiden00pl <raiden00@railab.me>
raiden00pl
force-pushed
the
stm32_refactor_all_pr8
branch
from
June 17, 2026 13:51
eba261d to
c2bf6a3
Compare
xiaoxiang781216
approved these changes
Jun 17, 2026
Contributor
acassis
approved these changes
Jun 24, 2026
Contributor
|
@raiden00pl please take a look:
Seems like the linker file for a board is missing |
Member
Author
|
I'm AFK this week. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This PR moves the shared
arch/arm/src/stm32andarch/arm/src/stm32f0l0g0arch and board code into common/stm32 directories and splits the two historical super-directories into one directory per chip family.Most of the changes in the PR involve moving files and using "git mv" to preserve git history. The size of this PR is quite large, but it can't be broken down into smaller pieces without breaking CI.
I also added a page in the documentation summarizing the stm32 ports standardization with migration guide.
Reference: #19004
Fixes #16172 and #18894
Impact
BREAKING CHANGE: Each STM32 family now has a separate directory in the arch.
arch/arm/src/stm32was divided into:arch/arm/src/stm32f0l0g0was divided into:The common code that was used by the families was moved to
arch/arm/src/common/stm32.For boards, common STM32 board code was introduced in
boards/arm/common/stm32. It can now we shared for all STM32 families and board code can be reused. Migration of the rest STM32 families to board common will be done later.Testing
CI