Search found 2 matches

by JakcieLs
Tue May 24, 2022 1:50 am
Forum: ESP32 boards
Topic: Could Parttion.writeblocks write a Partition from a bin_file on flash?
Replies: 1
Views: 1003

Re: Could Parttion.writeblocks write a Partition from a bin_file on flash?

It's worked. Just because of the Thonny IDE doesn't work very well.When I use screen It's worked.
by JakcieLs
Thu May 19, 2022 5:57 am
Forum: ESP32 boards
Topic: Could Parttion.writeblocks write a Partition from a bin_file on flash?
Replies: 1
Views: 1003

Could Parttion.writeblocks write a Partition from a bin_file on flash?

The source code def update_by_file(file_path): p = getTargetPartition() addr = 0 with open(file_path, 'rb') as f: while True: if addr & 0xFFFF == 0: print(" ... 0x{:06x}".format(addr)) buff = f.read(BLOCK) if not buff: break buff = bytearray(buff) buff_size = len(buff) # pad_to FF if buff_size % BLO...