Commit Graph

4 Commits

Author SHA1 Message Date
Stefan Rueger ff8f519a34 Fix PICKit2 ATmega2560 flash paged flash read
The paged read in pickit2.c has two errors:
  - It drops load extended address commands unless a paged read happens at a
    64k byte boundary; this is invalid when reading files with holes
  - It wrongly assumed that flash memory is byte addressed

The fix is to carry out a load extended address command, if needed, at the
beginning of each paged flash read with the correct word address. Although the
pickit2_paged_load() has independent parameters page_size, addr and n_bytes,
AVRDUDE only ever calls paged read/write functions with page_size and n_bytes
both set to mem->page_size and addr aligned with a page boundary. Therefore, it
is sufficient to set the load extended address at the beginning of each page
read.
2022-07-10 23:41:44 +01:00
Marius Greuel fc54ef5e59 Clean up legacy code 2022-01-07 17:57:02 +01:00
Marius Greuel c035c91db5 Add compatibility shim for MSVC 2022-01-07 17:54:36 +01:00
Marius Greuel 5633a6d88a Move source files to 'src' folder 2021-12-17 09:17:42 +01:00