Fix usage of RAMEND
RAMEND is the last valid address, not one-past as I expected it to be...
This commit is contained in:
parent
f18d4757c6
commit
f7dc8dcaef
|
|
@ -278,7 +278,7 @@ void dcode_1()
|
||||||
*/
|
*/
|
||||||
void dcode_2()
|
void dcode_2()
|
||||||
{
|
{
|
||||||
dcode_core(RAMSTART, RAMEND, dcode_mem_t::sram, 2, _N("SRAM"));
|
dcode_core(RAMSTART, RAMEND+1, dcode_mem_t::sram, 2, _N("SRAM"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
|
||||||
#define RAMSIZE (RAMEND-RAMSTART)
|
#define RAMSIZE (RAMEND+1-RAMSTART)
|
||||||
#define boot_src_addr (*((uint32_t*)(RAMSIZE - 16)))
|
#define boot_src_addr (*((uint32_t*)(RAMSIZE - 16)))
|
||||||
#define boot_dst_addr (*((uint32_t*)(RAMSIZE - 12)))
|
#define boot_dst_addr (*((uint32_t*)(RAMSIZE - 12)))
|
||||||
#define boot_copy_size (*((uint16_t*)(RAMSIZE - 8)))
|
#define boot_copy_size (*((uint16_t*)(RAMSIZE - 8)))
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ static void xfdump_dump_core(dump_header_t& hdr, uint32_t addr, uint8_t* buf, ui
|
||||||
xflash_wait_busy();
|
xflash_wait_busy();
|
||||||
|
|
||||||
// write data
|
// write data
|
||||||
static_assert(sizeof(dump_t::data) <= RAMEND, "dump area size insufficient");
|
static_assert(sizeof(dump_t::data) <= RAMEND+1, "dump area size insufficient");
|
||||||
xflash_multipage_program(addr, buf, cnt);
|
xflash_multipage_program(addr, buf, cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -96,7 +96,7 @@ void xfdump_full_dump_and_reset(dump_crash_reason reason)
|
||||||
wdt_enable(WDTO_500MS);
|
wdt_enable(WDTO_500MS);
|
||||||
|
|
||||||
// write all addressable ranges (this will trash bidirectional registers)
|
// write all addressable ranges (this will trash bidirectional registers)
|
||||||
xfdump_dump_core(buf, DUMP_OFFSET + offsetof(dump_t, data), 0, RAMEND);
|
xfdump_dump_core(buf, DUMP_OFFSET + offsetof(dump_t, data), 0, RAMEND+1);
|
||||||
|
|
||||||
// force a reset even sooner
|
// force a reset even sooner
|
||||||
softReset();
|
softReset();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue