Summary
f469-disco/libs/unix/pyb.py is missing several class/function stubs that are available on hardware but not in the simulator:
LED — used by some firmware code for status indication
SDCard — needed if any code references SD card operations
hard_reset() — pyb.hard_reset() is called by HIL test code (TEST_RESET command) but not defined in simulator
Proposed additions to libs/unix/pyb.py
class LED:
def __init__(self, id):
self.id = id
def on(self):
pass
def off(self):
pass
def toggle(self):
pass
class SDCard:
def __init__(self, *args, **kwargs):
pass
def readblocks(self, *args, **kwargs):
pass
def writeblocks(self, *args, **kwargs):
pass
def ioctl(self, *args, **kwargs):
return 0
def hard_reset():
import sys
sys.exit()
Impact
Without hard_reset(), importing hil.py on the simulator fails because HILCommandHandler._process_line("TEST_RESET") calls pyb.hard_reset().
Status
- Changes were made locally but reverted to keep submodule clean
- Should be submitted as PR to
diybitcoinhardware/f469-disco
Summary
f469-disco/libs/unix/pyb.pyis missing several class/function stubs that are available on hardware but not in the simulator:LED— used by some firmware code for status indicationSDCard— needed if any code references SD card operationshard_reset()—pyb.hard_reset()is called by HIL test code (TEST_RESETcommand) but not defined in simulatorProposed additions to
libs/unix/pyb.pyImpact
Without
hard_reset(), importinghil.pyon the simulator fails becauseHILCommandHandler._process_line("TEST_RESET")callspyb.hard_reset().Status
diybitcoinhardware/f469-disco