Austin Schuh | 8e17be9 | 2019-12-24 09:32:11 -0800 | [diff] [blame] | 1 | def hex_from_elf(name, restricted_to = None): |
2 | native.genrule( | ||||
3 | name = name, | ||||
4 | srcs = ["%s.elf" % name], | ||||
5 | outs = ["%s.hex" % name], | ||||
6 | cmd = "$(OBJCOPY) -O ihex $< $@", | ||||
7 | executable = True, | ||||
8 | output_to_bindir = True, | ||||
9 | restricted_to = restricted_to, | ||||
Philipp Schrader | 00e7834 | 2020-11-08 10:33:22 -0800 | [diff] [blame^] | 10 | toolchains = ["@bazel_tools//tools/cpp:current_cc_toolchain"], |
Austin Schuh | 8e17be9 | 2019-12-24 09:32:11 -0800 | [diff] [blame] | 11 | ) |