Skip to content
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

Bazel Support #6860

Open
jeremyje opened this issue Oct 26, 2017 · 7 comments
Open

Bazel Support #6860

jeremyje opened this issue Oct 26, 2017 · 7 comments
Labels
feature request A request to make an enhancement (not a bug fix)

Comments

@jeremyje
Copy link

It'd be nice if the Arduino compile had Bazel (http://bazel.build) integration.

Something like:

arduino_cc_binary(
  name = "example",
  srcs = ["example.ino"],
  board = "@io_github_arduino_arduino//boards:esp8266",
  libraries = ["rs232"],
)

This would download the board definition, arduino compiler, and required libraries and build them to bazel-bin/example.bin

@hblok
Copy link

hblok commented Jun 15, 2018

This might be relevant:
https://opensource.google.com/projects/platformio_rules

@Kernald
Copy link

Kernald commented Mar 29, 2019

These PlatformIO rules are working fine (I opened a few issues this past month, and the developer has been reactivate to fix them, that's nice), but have a few issues inherent to the way they're built: they're using PlatformIO as a kind of middleware, which isn't the way it's meant to be used. You cannot leverage any standard C/C++ feature that Bazel have, re-using modules with other code means writing a build target using cc_library, and a second one using platformio_library (for the same source set), it also requires to have PlatformIO in your path, which makes reproducibility hit-and-miss. In addition to that, PlatformIO's dependency management is great... for simple cases. It's a mess with nested folders.

While it's great to have those rules (they aren't perfect, but they work), I would love to see some board-specific C/C++ toolchains, native definition of Arduino libraries (Wire...), and a simple rule to manage the upload.

@per1234 per1234 added Type: Improvement This proposal is considered to be especially beneficial feature request A request to make an enhancement (not a bug fix) and removed Proposal Type: Improvement This proposal is considered to be especially beneficial labels Apr 2, 2019
@sascha1337
Copy link

pump this up ! when bazel ?

@victorromeo
Copy link

Agreed. Love to see Bazel supported here in a more independent way. Arduino's linker isn't great when referencing libraries outside Arduino IDE paths.

@simonhorlick
Copy link

I spent a bit of time adding a Bazel toolchain that works for the ESP32. It's a bit rough around the edges, but it might be useful: https://github.com/simonhorlick/bazel_esp32

@sascha1337
Copy link

hah mate, been a while since askin, but better late than never right ? Thanks mate.

@henriksod
Copy link

Bump! Currently looking for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request to make an enhancement (not a bug fix)
Projects
None yet
Development

No branches or pull requests

9 participants