es-ude / EmbeddedSystemsBuildScripts

Bazel build scripts used for all projects of the embedded systems department
MIT License
4 stars 5 forks source link

changes creation of upload scripts to macros, adds platforms constrai… #28

Closed pixelboehm closed 3 years ago

pixelboehm commented 4 years ago

…nts for programmer and uploader

Unfortunately select() statements are evaluated after the macro evaluation. Because of that, we cannot assign the type of the uploader to a variable, before the creation of the upload script. Currently, both upload scripts are generated. The upload script that should be used can be chosen by adding

uploader = "dfu" or uploader = "avrdude"

to the default_embedded_binary macro.

In case that this this stays that way, we should raise a meaningful error, when no uploader is specified.