diff --git a/src/fileio.c b/src/fileio.c index 888cf5e45..eb99d0276 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -771,7 +771,7 @@ static int elf_mem_limits(const AVRMEM *mem, const AVRPART *p, *lowbound = 0; *highbound = 0x7Fffff; // Max 8 MiB *fileoff = 0; - } else if (mem_is_sram(mem)) { // SRAM + } else if (mem_is_io(mem) || mem_is_sram(mem)) { // IO & SRAM in data space *lowbound = 0x800000 + mem->offset; *highbound = 0x80ffff; *fileoff = 0; diff --git a/src/jtag3.c b/src/jtag3.c index 2e41d5682..dbba89260 100644 --- a/src/jtag3.c +++ b/src/jtag3.c @@ -2168,7 +2168,7 @@ static int jtag3_read_byte(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM cmd[3] = MTYPE_OSCCAL_BYTE; if (pgm->flag & PGM_FL_IS_DW) unsupp = 1; - } else if (mem_is_io(mem)) { + } else if (mem_is_io(mem) || mem_is_sram(mem)) { cmd[3] = MTYPE_SRAM; } else if (mem_is_sib(mem)) { if(addr >= AVR_SIBLEN) { @@ -2325,7 +2325,7 @@ static int jtag3_write_byte(const PROGRAMMER *pgm, const AVRPART *p, const AVRME unsupp = 1; } else if (mem_is_userrow(mem)) { cmd[3] = MTYPE_USERSIG; - } else if (mem_is_io(mem)) + } else if (mem_is_io(mem) || mem_is_sram(mem)) cmd[3] = MTYPE_SRAM; // Read-only memories or unsupported by debugWire diff --git a/src/jtagmkII.c b/src/jtagmkII.c index bef2c71ce..c24d27cc5 100644 --- a/src/jtagmkII.c +++ b/src/jtagmkII.c @@ -2222,7 +2222,7 @@ static int jtagmkII_read_byte(const PROGRAMMER *pgm, const AVRPART *p, const AVR } else if ((p->prog_modes & (PM_PDI | PM_UPDI)) && mem_is_in_sigrow(mem)) { cmd[1] = MTYPE_PRODSIG; pmsg_notice2("in_sigrow addr 0x%05lx\n", addr); - } else if (mem_is_io(mem)) { + } else if (mem_is_io(mem) || mem_is_sram(mem)) { cmd[1] = MTYPE_FLASH; addr += avr_data_offset(p); } else { @@ -2346,7 +2346,7 @@ static int jtagmkII_write_byte(const PROGRAMMER *pgm, const AVRPART *p, const AV cmd[1] = MTYPE_LOCK_BITS; if (pgm->flag & PGM_FL_IS_DW) unsupp = 1; - } else if (mem_is_io(mem)) { + } else if (mem_is_io(mem) || mem_is_sram(mem)) { cmd[1] = MTYPE_FLASH; // Works with jtag2updi, does not work with any xmega addr += avr_data_offset(p); } else if(mem_is_readonly(mem)) { diff --git a/src/stk500v2.c b/src/stk500v2.c index b3bf62d82..6f7df2130 100644 --- a/src/stk500v2.c +++ b/src/stk500v2.c @@ -4270,7 +4270,7 @@ static int stk600_xprog_write_byte(const PROGRAMMER *pgm, const AVRPART *p, cons memcode = XPRG_MEM_TYPE_BOOT; } else if (mem_is_eeprom(mem)) { memcode = XPRG_MEM_TYPE_EEPROM; - } else if (mem_is_io(mem)) { + } else if (mem_is_io(mem) || mem_is_sram(mem)) { memcode = XPRG_MEM_TYPE_APPL; addr += avr_data_offset(p); } else if (mem_is_lock(mem)) { @@ -4347,7 +4347,7 @@ static int stk600_xprog_read_byte(const PROGRAMMER *pgm, const AVRPART *p, const b[1] = XPRG_MEM_TYPE_BOOT; } else if (mem_is_eeprom(mem)) { b[1] = XPRG_MEM_TYPE_EEPROM; - } else if (mem_is_io(mem)) { + } else if (mem_is_io(mem) || mem_is_sram(mem)) { b[1] = XPRG_MEM_TYPE_APPL; addr += avr_data_offset(p); } else if (mem_is_signature(mem)) { @@ -4421,7 +4421,7 @@ static int stk600_xprog_paged_load(const PROGRAMMER *pgm, const AVRPART *p, cons use_ext_addr = (1UL << 31); } else if (mem_is_eeprom(mem)) { mtype = XPRG_MEM_TYPE_EEPROM; - } else if (mem_is_io(mem)) { + } else if (mem_is_io(mem) || mem_is_sram(mem)) { mtype = XPRG_MEM_TYPE_APPL; addr += avr_data_offset(p); } else if (mem_is_signature(mem)) {