Skip to content

Commit 0d95616

Browse files
committed
fix(wokwi): pass flash size while simulating
1 parent 672e95d commit 0d95616

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • pytest-embedded-wokwi/pytest_embedded_wokwi

pytest-embedded-wokwi/pytest_embedded_wokwi/wokwi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@ def _setup_simulation(self, diagram: str, firmware_path: str, elf_path: str):
8484
self.client.upload_file('pytest.elf', Path(elf_path))
8585
if firmware_path.endswith('flasher_args.json'):
8686
firmware = self.client.upload_idf_firmware(firmware_path)
87-
self.client.start_simulation(firmware.firmware, elf='pytest.elf')
87+
kwargs = {'firmware': firmware.firmware, 'elf': 'pytest.elf', 'flash_size': firmware.flash_size}
8888
else:
8989
firmware = self.client.upload_file('pytest.bin', Path(firmware_path))
90-
self.client.start_simulation(firmware, elf='pytest.elf')
90+
kwargs = {'firmware': firmware, 'elf': 'pytest.elf'}
9191

9292
logging.info('Uploaded diagram and firmware to Wokwi. Starting simulation...')
93+
self.client.start_simulation(**kwargs)
9394

9495
def _start_serial_monitoring(self):
9596
"""Start monitoring serial output and forward to stdout and message queue."""

0 commit comments

Comments
 (0)