-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds initial Bazel support for Drivers #25
Conversation
f28c6fd
to
58f4bbd
Compare
58f4bbd
to
8b1e5e5
Compare
Hi @silvergasp, Thank you for your contribution. This issue will be discussed with our development teams. We will be back to you as soon as we get an answer. Thank you for you again for your contribution. With regards, |
No worries, feel free to post any queries here or email me directly.
with the resulting elf available at; Also, just as a quick summary of the general level of interest, here is a shortlist of public projects already using Bazel with embedded toolchains + stm32's; |
Hi @silvergasp, Thank you for your contribution. Unfortunately, we don't treat aspect related to loader files and testing routines for external loaders for STM32 series of microcontrollers in our GitHub repositories. Please allow me to redirect you to the stm32-external-loader repository. There you shall find people who will address your request and whom you will hopefully find a solution with. Thank you again for your contribution. We are looking forward to reading from you again. With regards, |
Hey @RKOUSTM, I'm happy to move this PR elsewhere, however, I'm not sure that the stm32-external-loader is the right place for this to go. This PR isn't related to external flash loaders. It is specifically related to building (compiling/linking) software. TLDR; I have not communicated what this PR is effectively, this PR adds the capability to use this repo with the Bazel build system, which is roughly equivalent to GNU make. It is not related to external/flash loaders. To clarify bazel.build is the open-sourced version of Google's internal build system 'Blaze'. The As it currently stands this PR adds the necessary build configs for the 'library component' of stm32cube but does not do the code generation required for the project. Here is a fairly minimal cc_library(
name = "config",
hdrs = ["Core/Inc/stm32l4xx_hal_conf.h"],
includes = ["Core/Inc"],
visibility = ["//visibility:public"],
)
cc_library(
name = "base_project",
srcs = [
"Core/Src/gpio.c",
"Core/Src/i2c.c",
"Core/Src/stm32l4xx_hal_msp.c",
"Core/Src/stm32l4xx_it.c",
"Core/Src/system_stm32l4xx.c",
"Core/Src/usart.c",
],
hdrs = [
"Core/Inc/gpio.h",
"Core/Inc/i2c.h",
"Core/Inc/main.h",
"Core/Inc/stm32l4xx_it.h",
"Core/Inc/usart.h",
],
includes = ["Core/Inc"],
visibility = ["//visibility:public"],
deps = ["@com_github_stmicroelectronics_stm32cubel4//:stm32l4xx_hal_driver"],
)
cc_binary(
name = "main",
srcs = [
"Core/Src/main.c",
"startup/startup_stm32l432xx.s",
],
linkopts = [
"-T $(location :STM32L432KCUx_FLASH.ld)",
],
deps = [
":STM32L432KCUx_FLASH.ld",
":base_project",
],
) |
This PR adds initial support for using the Bazel build system with stm32cubewl. This approach allows this repository and the targets specified in the Bazel build files to be fetched remotely with local configuration.
If required, I'm happy to provide some documentation to supplement this. Though I could do with some guidance in terms of where and what format the documentation should be in.
Alternatively, these build definitions can be placed in the third_party_libs, directory of this repository.