!arch/stm32: split stm32 and stm32f0l0g0 into per-chip-family directories#19143
!arch/stm32: split stm32 and stm32f0l0g0 into per-chip-family directories#19143raiden00pl wants to merge 16 commits into
Conversation
2fc9180 to
93dd46b
Compare
I prefer consistency as much as possible throughout the NuttX tree. Once someone becomes familiar with using NuttX on one architecture, it is beneficial if other architectures follow similar patterns. arch/arm/src/common/stm32 is a parallel of arch/risc-v/src/common/espressif, so that would give us two architectures following a similar pattern. Hopefully other architectures are consistent with this layout too. |
|
@raiden00pl please fix the conflict |
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>
eba261d
93dd46b to
eba261d
Compare
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