API

openocd_flash

openocd_flash(name, device_configs, flash_offset, image, interface_configs, programmer_frequency,
              transport)

Used to flash a binary image to a microcontroller using openocd

Example:

openocd_flash(
    name = "main_flash",
    device_configs = [
        "target/stm32h7x_dual_bank.cfg",
    ],
    image = ":main",
    interface_configs = [
        "interface/stlink.cfg",
    ],
    transport = "hla_swd",
)

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
device_configsopenocd config path for chip/board, note that user defined configs are not suppported at this timeList of stringsoptional[]
flash_offsetThe starting point of the flash memoryStringoptional"0x8000000"
imageBinary image to flashLabelrequired
interface_configsopenocd config path for interface, note that user defined configs are not supported at this timeList of stringsoptional[]
programmer_frequencyThe programming frequency of the adapterStringoptional"24000"
transportDebugger transport interfaceStringoptional"hla_swd"

Edit this page on GitHub