pytest-embedded-arduino

class pytest_embedded_arduino.app.ArduinoApp(**kwargs)

Bases: App

Arduino App class

sketch

Sketch name.

Type:

str

fqbn

Fully Qualified Board Name.

Type:

str

target

ESPxx chip.

Type:

str

flash_files

List of (offset, file path, encrypted) of files need to be flashed in.

Type:

List[Tuple[int, str, str]]

binary_offsets: ClassVar[Dict[str, List[int]]] = {'esp32': [4096, 32768, 65536], 'esp32c3': [0, 32768, 65536], 'esp32c6': [0, 32768, 65536], 'esp32h2': [0, 32768, 65536], 'esp32p4': [8192, 32768, 65536], 'esp32s2': [4096, 32768, 65536], 'esp32s3': [0, 32768, 65536]}

dict of binaries’ offset.

flash_settings: ClassVar[Dict[str, Dict[str, str]]] = {'esp32': {'flash_freq': '80m', 'flash_mode': 'dio', 'flash_size': 'detect'}, 'esp32c3': {'flash_freq': '80m', 'flash_mode': 'dio', 'flash_size': 'detect'}, 'esp32c6': {'flash_freq': '80m', 'flash_mode': 'dio', 'flash_size': 'detect'}, 'esp32h2': {'flash_freq': '48m', 'flash_mode': 'dio', 'flash_size': 'detect'}, 'esp32p4': {'flash_freq': '80m', 'flash_mode': 'dio', 'flash_size': 'detect'}, 'esp32s2': {'flash_freq': '80m', 'flash_mode': 'dio', 'flash_size': 'detect'}, 'esp32s3': {'flash_freq': '80m', 'flash_mode': 'dio', 'flash_size': 'detect'}}

dict of flash settings

class pytest_embedded_arduino.serial.ArduinoSerial(app: ArduinoApp, target: Optional[str] = None, **kwargs)

Bases: EspSerial

Arduino serial Dut class

Auto flash the app while starting test.

SUGGEST_FLASH_BAUDRATE = 921600
flash() None

Flash the binary files to the board.