rp: add run-from-ram feature.

This commit is contained in:
Dario Nieuwenhuis 2023-06-06 00:06:32 +02:00
parent 162d485304
commit 4f03dff577
2 changed files with 9 additions and 1 deletions

View File

@ -41,6 +41,11 @@ boot2-ram-memcpy = []
boot2-w25q080 = []
boot2-w25x10cl = []
# Indicate code is running from RAM.
# Set this if all code is in RAM, and the cores never access memory-mapped flash memory through XIP.
# This allows the flash driver to not force pausing execution on both cores when doing flash operations.
run-from-ram = []
# Enable nightly-only features
nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-embedded-hal/nightly", "dep:embassy-usb-driver", "dep:embedded-io"]

View File

@ -10,7 +10,10 @@ use crate::pac;
use crate::peripherals::FLASH;
pub const FLASH_BASE: *const u32 = 0x10000000 as _;
pub const USE_BOOT2: bool = true;
// If running from RAM, we might have no boot2. Use bootrom `flash_enter_cmd_xip` instead.
// TODO: when run-from-ram is set, completely skip the "pause cores and jumpp to RAM" dance.
pub const USE_BOOT2: bool = !cfg!(feature = "run-from-ram");
// **NOTE**:
//