pytest-embedded-nuttx
- class pytest_embedded_nuttx.app.NuttxApp(file_extension='.bin', **kwargs)
Bases:
App
NuttX App class for Espressif devices. Evaluates binary files (firmware and bootloader) and extract information required for flashing.
- class pytest_embedded_nuttx.dut.NuttxDut(*args, **kwargs)
Bases:
Dut
Generic DUT class for use with NuttX RTOS.
- PROMPT_NSH = 'nsh>'
- PROMPT_TIMEOUT_S = 30
- reset_to_nsh(ready_prompt: str = 'nsh>') None
Resets the board and waits until the Nuttshell prompt appears. Defaults to ‘nsh>’.
- Parameters:
ready_prompt (str) – string on prompt that signals completion.
- Returns:
None
- return_code(timeout: int = 30) int
Matches the ‘echo $?’ response and extracts the integer value corresponding to the last program return code.
The first regex option on expect is for serial interface, while the second will match QEMU.
- Returns:
return code.
- Return type:
- write(data: str) None
Write to NuttShell and sleep for a few hundred milliseconds to ensure there is time for Nuttshell prompt appear again.
- Parameters:
data (str) – data to be passed on to Nuttshell.
- Returns:
None.
- class pytest_embedded_nuttx.dut.NuttxSerialDut(*args, **kwargs)
-
DUT class for serial ports connected to generic boards running NuttX with NuttX RTOS.
- class pytest_embedded_nuttx.serial.NuttxEspDut(*args, **kwargs)
Bases:
NuttxSerialDut
DUT class for serial ports connected to Espressif boards which are flashed with NuttX RTOS.
- class pytest_embedded_nuttx.serial.NuttxSerial(app: NuttxApp, **kwargs)
Bases:
EspSerial
NuttX serial DUT class.
- MCUBOOT_PRIMARY_SLOT_OFFSET = 131072
- SERIAL_BAUDRATE = 115200
- VIRTUAL_EFUSE_OFFSET = 65536