mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
* talk to spi bootloader * flashing bootstub * reset * get mcu type * little more * pull out low level panda comms * lint * program app --------- Co-authored-by: Comma Device <device@comma.ai>
24 lines
408 B
Python
Executable File
24 lines
408 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from panda.python.spi_dfu import PandaSpiDFU
|
|
|
|
if __name__ == "__main__":
|
|
p = PandaSpiDFU('')
|
|
|
|
print("Bootloader version", p.get_bootloader_version())
|
|
print("MCU ID", p.get_id())
|
|
|
|
print("erasing...")
|
|
p.global_erase()
|
|
print("done")
|
|
|
|
print("flashing bootstub")
|
|
p.program_bootstub()
|
|
|
|
print("flashing app")
|
|
p.program_app()
|
|
|
|
print("reset")
|
|
p.reset()
|
|
print("done")
|