bootloader addr corrections
All checks were successful
Rust/va108xx-rs/pipeline/pr-main This commit looks good
All checks were successful
Rust/va108xx-rs/pipeline/pr-main This commit looks good
This commit is contained in:
parent
784a6d7146
commit
ce7a8665a3
@ -35,23 +35,30 @@ const CLOCK_FREQ: Hertz = Hertz::from_raw(50_000_000);
|
|||||||
|
|
||||||
// Important bootloader addresses and offsets, vector table information.
|
// Important bootloader addresses and offsets, vector table information.
|
||||||
|
|
||||||
|
const NVM_SIZE: u32 = 0x20000;
|
||||||
const BOOTLOADER_START_ADDR: u32 = 0x0;
|
const BOOTLOADER_START_ADDR: u32 = 0x0;
|
||||||
const BOOTLOADER_CRC_ADDR: u32 = BOOTLOADER_END_ADDR - 2;
|
const BOOTLOADER_CRC_ADDR: u32 = BOOTLOADER_END_ADDR - 2;
|
||||||
// This is also the maximum size of the bootloader.
|
// This is also the maximum size of the bootloader.
|
||||||
const BOOTLOADER_END_ADDR: u32 = 0x3000;
|
const BOOTLOADER_END_ADDR: u32 = 0x3000;
|
||||||
const APP_A_START_ADDR: u32 = BOOTLOADER_END_ADDR;
|
const APP_A_START_ADDR: u32 = BOOTLOADER_END_ADDR;
|
||||||
const APP_A_SIZE_ADDR: u32 = APP_A_END_ADDR - 8; // 0x117F8
|
// 0x117F8
|
||||||
// Four bytes reserved, even when only 2 byte CRC is used. Leaves flexibility to switch to CRC32.
|
const APP_A_SIZE_ADDR: u32 = APP_A_END_ADDR - 8;
|
||||||
const APP_A_CRC_ADDR: u32 = APP_A_END_ADDR - 4; // 0x117FC
|
// Four bytes reserved, even when only 2 byte CRC is used. Leaves flexibility to switch to CRC32.
|
||||||
pub const APP_A_END_ADDR: u32 = APP_B_END_ADDR - BOOTLOADER_END_ADDR / 2; // 0x11800
|
// 0x117FC
|
||||||
// The actual size of the image which is relevant for CRC calculation.
|
const APP_A_CRC_ADDR: u32 = APP_A_END_ADDR - 4;
|
||||||
|
// 0x11800
|
||||||
|
pub const APP_A_END_ADDR: u32 = APP_B_END_ADDR - BOOTLOADER_END_ADDR / 2;
|
||||||
|
// The actual size of the image which is relevant for CRC calculation.
|
||||||
const APP_B_START_ADDR: u32 = APP_A_END_ADDR;
|
const APP_B_START_ADDR: u32 = APP_A_END_ADDR;
|
||||||
// The actual size of the image which is relevant for CRC calculation.
|
// The actual size of the image which is relevant for CRC calculation.
|
||||||
const APP_B_SIZE_ADDR: u32 = APP_B_END_ADDR - 8; // 0x1FFF8
|
// 0x1FFF8
|
||||||
// Four bytes reserved, even when only 2 byte CRC is used. Leaves flexibility to switch to CRC32.
|
const APP_B_SIZE_ADDR: u32 = APP_B_END_ADDR - 8;
|
||||||
const APP_B_CRC_ADDR: u32 = APP_B_END_ADDR - 4; // 0x1FFFC
|
// Four bytes reserved, even when only 2 byte CRC is used. Leaves flexibility to switch to CRC32.
|
||||||
pub const APP_B_END_ADDR: u32 = 0x20000;
|
// 0x1FFFC
|
||||||
pub const APP_IMG_SZ: u32 = APP_B_END_ADDR - APP_A_END_ADDR / 2;
|
const APP_B_CRC_ADDR: u32 = APP_B_END_ADDR - 4;
|
||||||
|
// 0x20000
|
||||||
|
pub const APP_B_END_ADDR: u32 = NVM_SIZE;
|
||||||
|
pub const APP_IMG_SZ: u32 = (APP_B_END_ADDR - APP_A_START_ADDR) / 2;
|
||||||
|
|
||||||
static_assertions::const_assert!((APP_B_END_ADDR - BOOTLOADER_END_ADDR) % 2 == 0);
|
static_assertions::const_assert!((APP_B_END_ADDR - BOOTLOADER_END_ADDR) % 2 == 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user