returns an offset after copy
(ftr & SYS_REG_INFO_HAS_DRAM) &&
(failcnt == 0))
{
- copy_flash(spi_offs);
- return DRAM_BASE;
+ // identify ELF, copy if present, and get the offset/addr
+ unsigned long faddr = copy_flash(spi_offs);
+ if (faddr != -1ul) {
+ // jump to offset/addr relative to DRAM base
+ return DRAM_BASE + faddr;
+ }
}
return 0;
# System Configuration info
# offset executable ELF payload at 1 megabyte offset (1<<20)
spi_offset = 1<<20 if (spi_0_pins is not None) else None
+ dram_offset = ddr_addr if (ddr_pins is not None) else None
self.syscon = MicrowattSYSCON(sys_clk_freq=clk_freq,
has_uart=(uart_pins is not None),
spi_offset=spi_offset)