Add STM32 G474RE FreeRTOS board config#418
Draft
nhuvaoanh123 wants to merge 7 commits into
Draft
Conversation
nhuvaoanh123
added a commit
to nhuvaoanh123/openbsw
that referenced
this pull request
Mar 30, 2026
Add ThreadX RTOS support as an alternative to FreeRTOS for STM32 platforms: - ThreadX Cortex-M4 GNU port (context save/restore, scheduler, timer ISR) - tx_port.h and tx_user.h configuration for G474RE - ThreadX core configuration module for NUCLEO-G474RE - Updated platform CMakeLists for dual-RTOS selection Build with: `cmake --preset nucleo-g474re-threadx-gcc` The main/ directory (PR 6) already contains ThreadX-specific hooks (tx_initialize_low_level.S, tx_execution_initialize.c, osHooks/threadx/). Milestone: `cmake --preset nucleo-g474re-threadx-gcc` configures successfully. Depends on eclipse-openbsw#418 (PR 6: FreeRTOS board config). PR 7 of 10.
This was referenced Mar 30, 2026
c421f80 to
cd8d7c7
Compare
nhuvaoanh123
pushed a commit
to nhuvaoanh123/openbsw
that referenced
this pull request
Mar 30, 2026
Add ThreadX RTOS support as an alternative to FreeRTOS for STM32 platforms: - ThreadX Cortex-M4 GNU port (context save/restore, scheduler, timer ISR) - tx_port.h and tx_user.h configuration for G474RE - ThreadX core configuration module for NUCLEO-G474RE - Updated platform CMakeLists for dual-RTOS selection Build with: `cmake --preset nucleo-g474re-threadx-gcc` The main/ directory (PR 6) already contains ThreadX-specific hooks (tx_initialize_low_level.S, tx_execution_initialize.c, osHooks/threadx/). Milestone: `cmake --preset nucleo-g474re-threadx-gcc` configures successfully. Depends on eclipse-openbsw#418 (PR 6: FreeRTOS board config). PR 7 of 10.
cd8d7c7 to
e8eec9d
Compare
nhuvaoanh123
added a commit
to nhuvaoanh123/openbsw
that referenced
this pull request
Mar 30, 2026
Add ThreadX RTOS support as an alternative to FreeRTOS for STM32 platforms: - ThreadX Cortex-M4 GNU port (context save/restore, scheduler, timer ISR) - tx_port.h and tx_user.h configuration for G474RE - ThreadX core configuration module for NUCLEO-G474RE - Updated platform CMakeLists for dual-RTOS selection Build with: `cmake --preset nucleo-g474re-threadx-gcc` The main/ directory (PR 6) already contains ThreadX-specific hooks (tx_initialize_low_level.S, tx_execution_initialize.c, osHooks/threadx/). Milestone: `cmake --preset nucleo-g474re-threadx-gcc` configures successfully. Depends on eclipse-openbsw#418 (PR 6: FreeRTOS board config). PR 7 of 10.
e8eec9d to
2fc5895
Compare
nhuvaoanh123
added a commit
to nhuvaoanh123/openbsw
that referenced
this pull request
Mar 31, 2026
Add ThreadX RTOS support as an alternative to FreeRTOS for STM32 platforms: - ThreadX Cortex-M4 GNU port (context save/restore, scheduler, timer ISR) - tx_port.h and tx_user.h configuration for G474RE - ThreadX core configuration module for NUCLEO-G474RE - Updated platform CMakeLists for dual-RTOS selection Build with: `cmake --preset nucleo-g474re-threadx-gcc` The main/ directory (PR 6) already contains ThreadX-specific hooks (tx_initialize_low_level.S, tx_execution_initialize.c, osHooks/threadx/). Milestone: `cmake --preset nucleo-g474re-threadx-gcc` configures successfully. Depends on eclipse-openbsw#418 (PR 6: FreeRTOS board config). PR 7 of 10.
2fc5895 to
5f537d3
Compare
nhuvaoanh123
added a commit
to nhuvaoanh123/openbsw
that referenced
this pull request
Mar 31, 2026
Add ThreadX RTOS support as an alternative to FreeRTOS for STM32 platforms: - ThreadX Cortex-M4 GNU port (context save/restore, scheduler, timer ISR) - tx_port.h and tx_user.h configuration for G474RE - ThreadX core configuration module for NUCLEO-G474RE - Updated platform CMakeLists for dual-RTOS selection Build with: `cmake --preset nucleo-g474re-threadx-gcc` The main/ directory (PR 6) already contains ThreadX-specific hooks (tx_initialize_low_level.S, tx_execution_initialize.c, osHooks/threadx/). Milestone: `cmake --preset nucleo-g474re-threadx-gcc` configures successfully. Depends on eclipse-openbsw#418 (PR 6: FreeRTOS board config). PR 7 of 10.
852a562 to
c128d70
Compare
Import the STM32F4 and STM32G4 CMSIS device headers from STMicroelectronics' dedicated RIM-tracked repositories. Keep only the F413 and G474 headers needed by the STM32 MCU foundation and record the unused upstream headers as RIM ignores.
Add the STM32 platform entry point, chip CMake files, bspMcu startup code, a software reset wrapper, and the STM32 unit-test presets. The platform reuses the shared CMSIS core from libs/3rdparty/cmsis instead of carrying a local copy.
Add STM32 BSP modules for clock, UART, GPIO, timer, ADC, and EEPROM, plus interrupt handling primitives and the ETL platform glue.
41d1aa2 to
5441298
Compare
Add bxCAN and FDCAN device drivers with STM32 CAN tests. Add the bxCAN transceiver adapter and unit-test registration.
Add the FDCAN transceiver implementation and STM32 test coverage. Wire the FDCAN transceiver into the chip-family CMake selection.
Add the STM32 hard fault handler with RAM dump region and the IWDG watchdog driver. Add the G474RE safety manager sources and watchdog unit tests.
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.
Purpose of this PR
Description
Sixth PR in the STM32 platform series. This is the key integration PR — it produces the first bootable reference app binary for NUCLEO-G474RE.
What's included
port.c,portmacro.h)FreeRTOSConfig.htuned for G474RE (170 MHz, 128 KB SRAM)main.cpp): clock init → UART console → FreeRTOS scheduler startDual-RTOS architecture
OpenBSW supports both FreeRTOS and ThreadX on STM32, selectable at configure time via
BUILD_TARGET_RTOS. This PR adds FreeRTOS; PR 7 adds ThreadX. Themain/directory contains RTOS-specific hooks in separate subdirectories (osHooks/freertos/,osHooks/threadx/).Milestone
cmake --build --preset nucleo-g474re-freertos-gccproduces a bootable ELF (6.5 MB with debug info). Reference app boots on NUCLEO-G474RE with UART console output at 115200 baud.Depends on #417 (PR 5: safety). PR 6 of 10.
Related Issues
Part of STM32 platform port — see #413 for series overview.
Breaking Changes
Test Plan
CC=arm-none-eabi-gcc CXX=arm-none-eabi-g++ cmake --preset nucleo-g474re-freertos-gcc && cmake --build --preset nucleo-g474re-freertos-gccRegression Tests
Have tests been added/updated? [ ] Yes [x] No — this PR enables on-target testing; HIL tests in PR 10