SDK docs menu

reference

Functions

Functions the package exports.

from hardlabs_sdk import memory_images

memory_imagesfunction

Returns the memory chips' contents a run saved, as images to start the next board from.

memory_images(directory) -> list[Image]

A run saves them with Board.save_memory, Board.stop(save_memory=...) or pytest's --hardlabs-save-memory.

Usage

from hardlabs_sdk import memory_images

board.start(["app.elf", *memory_images("nvm/")])

Arguments

directoryUnion[str, Path]
The folder the run saved into.

Returns

list[Image] — One image per memory chip.

Raises

  • FileNotFoundError — The folder has no memory.json.