sunnypilot v2026.002.000
version: sunnypilot v2026.002.000 (staging) date: 2026-07-21T07:44:02 master commit: 2c334ede443d7391d27575af8c854a095ba702a8
This commit is contained in:
commit
de77c89cf6
3995 files changed
+1260688
No files matched your search
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
from panda import Panda, PandaDFU
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
from openpilot.system.hardware import HARDWARE
|
||||
HARDWARE.recover_internal_panda()
|
||||
Panda.wait_for_dfu(None, 5)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
p = PandaDFU(None)
|
||||
cfg = p.get_mcu_type().config
|
||||
|
||||
def readmem(addr, length, fn):
|
||||
print(f"reading {hex(addr)} {hex(length)} bytes to {fn}")
|
||||
max_size = 255
|
||||
with open(fn, "wb") as f:
|
||||
to_read = length
|
||||
while to_read > 0:
|
||||
l = min(to_read, max_size)
|
||||
dat = p._handle.read(addr, l)
|
||||
assert len(dat) == l
|
||||
f.write(dat)
|
||||
|
||||
to_read -= len(dat)
|
||||
addr += len(dat)
|
||||
|
||||
addr = cfg.bootstub_address
|
||||
for i, sector_size in enumerate(cfg.sector_sizes):
|
||||
readmem(addr, sector_size, f"sector_{i}.bin")
|
||||
addr += sector_size
|
||||
Reference in new issue
Block a user