Skip to content

OSError on large files #9

Closed
Closed
@maholli

Description

@maholli

I've been using miniesptool with files on an SD card (too large for internal flash).

It usually works, but I've ran into:

Traceback (most recent call last):
  File "main.py", line 74, in <module>
  File "adafruit_miniesptool.py", line 423, in flash_file
  File "adafruit_miniesptool.py", line 410, in flash_file
OSError: [Errno 5] Input/output error

when the file is greater than ~1.5MB. The OSError: [Errno 5] appears to be generic. Line 410 where the error occurs is when CP tries to read file contents (after opening).

I've found that reducing the FLASH_WRITE_SIZE from 0x400 to 0x200 on

resolves my issue. I also tried adding a gc.collect() prior to the file.read() call, but that didn't seem to help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions