class
Image
One firmware image, or what one memory chip holds, for Board.start.
from hardlabs_sdk import ImageImage(path, address=None, part=None, payload=None)A string does the same: Image("app.bin", 0x08010000) is "app.bin@0x08010000", and Image("config.bin", part="U7") is "config.bin@U7". Image.from_bytes takes the bytes themselves, for contents a test works out (settings, a calibration table).
Usage
from hardlabs_sdk import Image
board.start([Image("bootloader.bin", 0x08000000), Image("app.bin", 0x08010000),
Image("config.bin", part="U7")])Arguments
pathPath- The image file.
addressint | Nonedefault None- Where a raw
.binis flashed, as J-Link'sloadbintakes it.Nonefor ELF and Intel HEX files, which carry their own. Withpart, the offset within the chip (0 whenNone). partstr | Nonedefault None- The memory chip the image is for, by reference designator (
"U7") or slot.Nonefor the processor's flash. payloadbytes | Nonedefault None- The image's bytes when they come from
from_bytesrather than a file.
Attributes
pathPath- The image file.
addressint | None- Where a raw
.binis flashed, as J-Link'sloadbintakes it.Nonefor ELF and Intel HEX files, which carry their own. Withpart, the offset within the chip (0 whenNone). partstr | None- The memory chip the image is for, by reference designator (
"U7") or slot.Nonefor the processor's flash. payloadbytes | None- The image's bytes when they come from
from_bytesrather than a file.
Image.nameproperty
The file's name.
image.name -> strImage.dataproperty
The image's bytes: the file's contents, or the bytes given to from_bytes.
image.data -> bytesImage.offsetproperty
Where a memory chip's image goes within it.
image.offset -> intImage.kindproperty
elf, hex or bin, from the contents and extension; memory for a memory chip's image.
image.kind -> str