program offset back to 200k, picomite size increase to 880k (1080k in total)

This commit is contained in:
Yatao Li
2025-06-18 10:06:34 +08:00
parent eb3b15e188
commit 7ce75c9ee0
14 changed files with 18 additions and 16 deletions

View File

@@ -5490,6 +5490,7 @@ void SaveOptions(void)
enable_interrupts_pico();
uSec(10000);
disable_interrupts_pico();
// XXX @cuu erased 4K, but only write sizeof(option) back?
flash_range_program(FLASH_TARGET_OFFSET, (const uint8_t *)&Option, sizeof(struct option_s));
enable_interrupts_pico();
}

View File

@@ -4659,7 +4659,8 @@ tp = checkstring(cmdline, (unsigned char *)"HEARTBEAT");
enable_interrupts_pico();
uSec(10000);
disable_interrupts_pico();
flash_range_program(FLASH_TARGET_OFFSET, (const uint8_t *)&Option, 768);
// XXX @cuu not writing sizeof(option)?
flash_range_program(FLASH_TARGET_OFFSET, (const uint8_t *)&Option, sizeof(struct option_s));
enable_interrupts_pico();
_excep_code = RESET_COMMAND;
SoftReset();

View File

@@ -162,7 +162,7 @@ extern "C" {
#ifdef rp2350
#define HEAP_MEMORY_SIZE (288*1024)
#define MAXVARS 768 // 8 + MAXVARLEN + MAXDIM * 4 (ie, 64 bytes) - these do not incl array members
#define FLASH_TARGET_OFFSET (968 * 1024)
#define FLASH_TARGET_OFFSET (1080 * 1024) // 200k + 880k -- make sure PicoMite binary is under 880k! (currently ~780k, leave 100k for expansion)
#define MAX_CPU (rp2350a ? 396000 : 378000)
#define MAXSUBFUN 512 // each entry takes up 4 bytes
#ifdef USBKEYBOARD
@@ -175,7 +175,7 @@ extern "C" {
#else
#define HEAP_MEMORY_SIZE (128*1024)
#define MAXVARS 512 // 8 + MAXVARLEN + MAXDIM * 2 (ie, 56 bytes) - these do not incl array members
#define FLASH_TARGET_OFFSET (968 * 1024)
#define FLASH_TARGET_OFFSET (1080 * 1024) // 200k + 880k -- make sure PicoMite binary is under 880k! (currently ~780k, leave 100k for expansion)
#define MAX_CPU 420000
#define MAXSUBFUN 256 // each entry takes up 4 bytes
#ifdef USBKEYBOARD

View File

@@ -1,6 +1,6 @@
MEMORY
{
FLASH(rx) : ORIGIN = 0x10000000 + 188k, LENGTH = 2048k - 188k
FLASH(rx) : ORIGIN = 0x10000000 + 200k, LENGTH = 2048k - 200k
RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 256k
SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k
SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k

View File

@@ -23,7 +23,7 @@
MEMORY
{
FLASH(rx) : ORIGIN = 0x10000000 + 256k, LENGTH = 4096k - 256k
FLASH(rx) : ORIGIN = 0x10000000 + 200k, LENGTH = 4096k - 200k
RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 512k
SCRATCH_X(rwx) : ORIGIN = 0x20080000, LENGTH = 4k
SCRATCH_Y(rwx) : ORIGIN = 0x20081000, LENGTH = 4k