From f97a5318b063608aeccc4fb1d6af98c57cf26488 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Thu, 15 Jul 2021 00:37:23 +0800 Subject: [PATCH] FC option: support DDR3 loading. --- user_io.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/user_io.cpp b/user_io.cpp index c8cea82..bd5a3a1 100644 --- a/user_io.cpp +++ b/user_io.cpp @@ -626,12 +626,24 @@ static void parse_config() if (p[0] == 'F' && p[1] == 'C') { static char str[1024]; + uint32_t load_addr = 0; + if (substrcpy(str, p, 3)) + { + load_addr = strtoul(str, NULL, 16); + if (load_addr < 0x20000000 || load_addr >= 0x40000000) + { + printf("Loading address 0x%X is outside the supported range! Using normal load.\n", load_addr); + load_addr = 0; + } + } + sprintf(str, "%s.f%c", user_io_get_core_name(), p[2]); if (FileLoadConfig(str, str, sizeof(str)) && str[0]) { + int idx = p[2] - '0'; StoreIdx_F(idx, str); - user_io_file_tx(str, idx); + user_io_file_tx(str, idx, 0, 0, 0, load_addr); } } }