stlink_binary1 = rule(
implementation = _stlink_flash_impl,
attrs = {
"device_sn": attr.string(
doc = "Device serial number",
mandatory = False,
),
"transport": attr.string(
doc = "Debugger transport interface",
default = "SWD",
mandatory = False,
),
"srcs": attr.label(
doc = "Binary image to flash",
mandatory = True,
allow_single_file = True,
),
"flash_offset": attr.string(
doc = "The starting point of the flash memory",
mandatory = False,
default = "0x8000000",
),
# "deps" : attr.label_list(mandatory=False, providers=["files"]),
},
executable = True,
)