Skip to content

Why are firmware images extended to nearest flash sector boundary with 0x00 value? #57

Open
@basilhussain

Description

@basilhussain

Is there a specific reason why, when a firmware image is being written to flash (or verified), and the firmware image needs to be extended in size to the nearest 1K sector boundary (in function extend_firmware_to_sector_boundary()), is the extended space filled with 0x00 bytes and not 0xFF?

Is it done this way simply to replicate what the official WCH ISP software tools do?

I believe it would be better to fill the extended space with 0xFF because using any other value (i.e. one that differs from flash memory's erased state) will unnecessarily wear the flash memory.

While I appreciate that this is a minor concern in the grand scheme of things, I do think it would help if development tools such as wchisp do not unnecessarily do things that risk quicker degradation of the user's hardware than there would otherwise be.

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