mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
flashing speeeed (#2264)
* less sectors * why are we taking baby steps * revert * cleanup --------- Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
@@ -431,7 +431,7 @@ class Panda:
|
||||
handle.controlWrite(Panda.REQUEST_IN, 0xb2, i, 0, b'')
|
||||
|
||||
# flash over EP2
|
||||
STEP = 0x10
|
||||
STEP = 0x200
|
||||
logger.info("flash: flashing")
|
||||
for i in range(0, len(code), STEP):
|
||||
handle.bulkWrite(2, code[i:i + STEP])
|
||||
|
||||
@@ -116,10 +116,11 @@ class PandaDFU:
|
||||
def program_bootstub(self, code_bootstub):
|
||||
self._handle.clear_status()
|
||||
|
||||
# erase all sectors
|
||||
for i in range(len(self._mcu_type.config.sector_sizes)):
|
||||
# erase bootstub + app sectors
|
||||
for i in (0, 1):
|
||||
self._handle.erase_sector(i)
|
||||
|
||||
# write bootstub
|
||||
self._handle.program(self._mcu_type.config.bootstub_address, code_bootstub)
|
||||
|
||||
def recover(self):
|
||||
|
||||
Reference in New Issue
Block a user