diff --git a/artiq/firmware/libboard/config.rs b/artiq/firmware/libboard/config.rs index 665ccc462..443221d76 100644 --- a/artiq/firmware/libboard/config.rs +++ b/artiq/firmware/libboard/config.rs @@ -38,8 +38,8 @@ mod imp { use super::Error; // One flash sector immediately before the firmware. - const ADDR: usize = ::mem::FLASH_BOOT_ADDRESS - spiflash::PAGE_SIZE; - const SIZE: usize = spiflash::PAGE_SIZE; + const ADDR: usize = ::mem::FLASH_BOOT_ADDRESS - spiflash::SECTOR_SIZE; + const SIZE: usize = spiflash::SECTOR_SIZE; mod lock { use core::slice; diff --git a/artiq/firmware/libboard/spiflash.rs b/artiq/firmware/libboard/spiflash.rs index 2273185d5..3a4e7cb59 100644 --- a/artiq/firmware/libboard/spiflash.rs +++ b/artiq/firmware/libboard/spiflash.rs @@ -1,7 +1,8 @@ use core::cmp; use csr; -pub const PAGE_SIZE: usize = csr::CONFIG_SPIFLASH_PAGE_SIZE as usize; +pub const SECTOR_SIZE: usize = csr::CONFIG_SPIFLASH_SECTOR_SIZE as usize; +pub const PAGE_SIZE: usize = csr::CONFIG_SPIFLASH_PAGE_SIZE as usize; const PAGE_MASK: usize = PAGE_SIZE - 1;