mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
modify alt-boot uf2 path to allow for updating of boot1 over uf2 serial
This commit is contained in:
parent
515dd586b3
commit
97b2d2b0da
1 changed files with 11 additions and 3 deletions
|
|
@ -143,9 +143,17 @@ impl Repl {
|
||||||
match general_purpose::STANDARD.decode(&args[0]) {
|
match general_purpose::STANDARD.decode(&args[0]) {
|
||||||
Ok(uf2_data) => {
|
Ok(uf2_data) => {
|
||||||
if let Some(record) = crate::uf2::Uf2Block::from_bytes(&uf2_data) {
|
if let Some(record) = crate::uf2::Uf2Block::from_bytes(&uf2_data) {
|
||||||
if record.address() as usize >= bao1x_api::BAREMETAL_START
|
#[cfg(not(feature = "alt-boot1"))]
|
||||||
&& (record.address() as usize)
|
let low_limit = bao1x_api::BAREMETAL_START;
|
||||||
< utralib::HW_RERAM_MEM + bao1x_api::RRAM_STORAGE_LEN
|
#[cfg(not(feature = "alt-boot1"))]
|
||||||
|
let high_limit = utralib::HW_RERAM_MEM + bao1x_api::RRAM_STORAGE_LEN;
|
||||||
|
#[cfg(feature = "alt-boot1")]
|
||||||
|
let low_limit = bao1x_api::BOOT1_START;
|
||||||
|
#[cfg(feature = "alt-boot1")]
|
||||||
|
let high_limit = bao1x_api::BAREMETAL_START;
|
||||||
|
|
||||||
|
if record.address() as usize >= low_limit
|
||||||
|
&& (record.address() as usize) < high_limit
|
||||||
&& record.family() == bao1x_api::BAOCHIP_1X_UF2_FAMILY
|
&& record.family() == bao1x_api::BAOCHIP_1X_UF2_FAMILY
|
||||||
{
|
{
|
||||||
let mut rram = bao1x_hal::rram::Reram::new();
|
let mut rram = bao1x_hal::rram::Reram::new();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue