Migration to Bazel from GNU Make for embedded ARM application

502 views
Skip to first unread message

Sumit Mapari

unread,
Jul 14, 2022, 7:26:15 AM7/14/22
to bazel-discuss
I am working on migrating to bazel from gnu make based build system. It is an ARM embedded application, and uses Green Hills Compiler. The assembler, compiler and linker flags need to be specified during the build. The source code consists of about 400 .c files and few libraries.

However I am not able to find any relevant documentation or examples for the same.
Could somebody please direct me here to some useful resources please.
Thanks!!!

Austin Schuh

unread,
Jul 14, 2022, 1:13:29 PM7/14/22
to Sumit Mapari, bazel-discuss
Check out https://docs.bazel.build/versions/main/tutorial/cc-toolchain-config.html

We've got toolchains setup for various embedded ARM and x86 platforms
here: https://github.com/frc971/971-Robot-Code
https://github.com/frc971/971-Robot-Code/blob/master/tools/cpp/toolchain_config.bzl
has the crosstool features for a cortex m4f processor, and the rp2040.

Hopefully that's enough to get you started and on to the next set of
questions :)

Austin
> --
> You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/03e25443-42e6-42c1-86e4-c0bb5f363c53n%40googlegroups.com.

Nathaniel Brough

unread,
Jul 15, 2022, 3:17:57 PM7/15/22
to bazel-discuss
Hey Sumit,

In addition to the Bazel tutorials, Austin mentioned you might want to check out https://github.com/bazelembedded/bazel-embedded which has some gcc based embedded toolchains.

Sumit Mapari

unread,
Jul 20, 2022, 6:38:42 AM7/20/22
to bazel-discuss
Thank you very much Austin and Nathaniel for the help. It will help me to get started!!!
Reply all
Reply to author
Forward
0 new messages