Loaders
Loaders represent the interface for loading the test firmware onto the target platform. All loaders conform to the interface and can be extended to include customer loaders if needed to integrate into the cli tool.
Pyetta provides a set of built-in loaders for common scenarios.
- class pyetta.loaders.Loader
- abstract load_to_device(progress: Optional[Callable[[int], None]] = None) None
Loads the target data into the device. Optionally can report progress to a callback if one is given.
- Parameters
progress – Callback to allow progress to be reported. Callback should take in a single int representing the percentage completion [0-100].
Implementations
The pyetta library comes with some default loaders for use to upload test runners to devices.
- class pyetta.loaders.PyOCDDeviceLoader(firmware_path: pathlib.Path, target: Optional[str] = None, probe: Optional[str] = None)
Bases:
pyetta.loaders.LoaderBasic built-in pyOCD loader with minimal configurations. Superclass this if you need to override the calls with extra functions.
- __init__(firmware_path: pathlib.Path, target: Optional[str] = None, probe: Optional[str] = None)