Skip to content

Example / template STM32 projects utilizing Bazel build system with ST HAL and FreeRTOS.

License

Notifications You must be signed in to change notification settings

agoessling/bazel_stm32

Repository files navigation

bazel_stm32

Example / template STM32 HAL projects built with Bazel (using bazel_arm_toolchains).

In another life I've reimplemented the HAL, but couldn't bring myself to do it again (even if open-source). But, I still wanted to use Bazel with a sensible and documented startup configuration. Hopefully these examples provide that.

C and C++ projects are supported.

In particular, you might be interested in how the F7 HAL is incorporated into Bazel from ST's STM32CubeF7 repo. Some interesting aspects:

  • third_party/stm32cubef7.BUILD -- BUILD file for external repo
  • third_party/stm32cubef7.bzl -- hal_library macro for creating project specific HAL library
  • bare_metal/BUILD -- Contains //bare_metal:main.elf showing how complete embedded target is built.

To build the bare_metal project:

bazel build --config=m7 //bare_metal:main.elf

About

Example / template STM32 projects utilizing Bazel build system with ST HAL and FreeRTOS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published