--
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-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/bd98dd26-987d-4b6d-a5a1-6775a823cd1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
+Marcel, can you take a look at this?
On Mon, Feb 20, 2017 at 11:50 PM, <tim.b...@gmail.com> wrote:
Ha, turns out I'm actually knee-deep in doing the same. Have most of the stm32cubef4 library compiling now. As for the processor type, I've gotten around that by doing one of two things:
1) bazel build --copt=-DSTM32F446xx
2) adding "build --copt=-DSTM32F446xx" to .bazelrc in that directory
I'm doing similar techniques to compile the DSP_Lib CMSIS driver as well (e.g. -DARM_MATH_CM4, -D__FPU_PRESENT, etc).
On Wednesday, February 15, 2017 at 12:18:58 PM UTC-8, Pedro Kiefer wrote:
> I'm trying to create a set of rules for building embedded bare metal projects using STM32 arm's.
> So far it's working great, but outputting a great deal of warnings like this one:
>
>
>
> WARNING: trunk/BUILD:293:1: in srcs attribute of cc_library rule //:hal_smart_pic_v2: please do not import '@stm32//Drivers/STM32F4xx_HAL_Driver/Src:stm32f4xx_hal.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'stm32f4_binary', the error might have been caused by the macro implementation in /home/pedro/.cache/bazel/_bazel_pedro/3c6877b00a85c408a112e7fc3473f349/external/stm32/stm32f4/rules.bzl:42:16.
>
>
>
> I cannot create a cc_library with stm32f4xx_hal.c and the other files of the warning as they depend on the processor type and some other flags that will be defined by the user of the rule (or can ?!). Right now I have a filegroup listing those files, and my macro use it, but I get this awful warnings.
>
>
> The rules repo:
> https://github.com/pedrokiefer/rules_stm32
>
>
>
> Any ideas on how I should fix this is highly appreciated.
>
>
> Cheers,
> Pedro
--
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/bd98dd26-987d-4b6d-a5a1-6775a823cd1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Pedro and Tim,sorry for the slow reply, I'm still recovering from the vacation :)You can do what Tim suggested, maybe tuning it a little by using select function. That's the first thing that I'd try when dealing with platform specific sources. For an example, you can check how bazel client gets built.Cheers!
On Tue, Feb 21, 2017 at 10:31 AM Irina Iancu <elena...@google.com> wrote:
+Marcel, can you take a look at this?
On Mon, Feb 20, 2017 at 11:50 PM, <tim.b...@gmail.com> wrote:
Ha, turns out I'm actually knee-deep in doing the same. Have most of the stm32cubef4 library compiling now. As for the processor type, I've gotten around that by doing one of two things:
1) bazel build --copt=-DSTM32F446xx
2) adding "build --copt=-DSTM32F446xx" to .bazelrc in that directory
I'm doing similar techniques to compile the DSP_Lib CMSIS driver as well (e.g. -DARM_MATH_CM4, -D__FPU_PRESENT, etc).
On Wednesday, February 15, 2017 at 12:18:58 PM UTC-8, Pedro Kiefer wrote:
> I'm trying to create a set of rules for building embedded bare metal projects using STM32 arm's.
> So far it's working great, but outputting a great deal of warnings like this one:
>
>
>
> WARNING: trunk/BUILD:293:1: in srcs attribute of cc_library rule //:hal_smart_pic_v2: please do not import '@stm32//Drivers/STM32F4xx_HAL_Driver/Src:stm32f4xx_hal.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'stm32f4_binary', the error might have been caused by the macro implementation in /home/pedro/.cache/bazel/_bazel_pedro/3c6877b00a85c408a112e7fc3473f349/external/stm32/stm32f4/rules.bzl:42:16.
>
>
>
> I cannot create a cc_library with stm32f4xx_hal.c and the other files of the warning as they depend on the processor type and some other flags that will be defined by the user of the rule (or can ?!). Right now I have a filegroup listing those files, and my macro use it, but I get this awful warnings.
>
>
> The rules repo:
> https://github.com/pedrokiefer/rules_stm32
>
>
>
> Any ideas on how I should fix this is highly appreciated.
>
>
> Cheers,
> Pedro
--
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-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/bd98dd26-987d-4b6d-a5a1-6775a823cd1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--Marcel Hlopko | Software Engineer | hlo...@google.com |Google Germany GmbH | Erika-Mann-Str. 33 | 80636 München | Germany | Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle | Registergericht und -nummer: Hamburg, HRB 86891
--
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-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAFuL9GnMT0kUY2QeZMCeKDSfOyukk6gTOgBrxXVt9qy6EwXLVQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAMA%2B0V-ANDLysanApZ6tZ%2B_yzXDx__8dzs4B9osR_oC2Chvh5Q%40mail.gmail.com.