first successful run of flasher program
Some checks failed
ci / Check build (push) Has been cancelled
ci / Check formatting (push) Has been cancelled
ci / Check Documentation Build (push) Has been cancelled
ci / Clippy (push) Has been cancelled
ci / Check build (pull_request) Has been cancelled
ci / Check formatting (pull_request) Has been cancelled
ci / Check Documentation Build (pull_request) Has been cancelled
ci / Clippy (pull_request) Has been cancelled
Some checks failed
ci / Check build (push) Has been cancelled
ci / Check formatting (push) Has been cancelled
ci / Check Documentation Build (push) Has been cancelled
ci / Clippy (push) Has been cancelled
ci / Check build (pull_request) Has been cancelled
ci / Check formatting (pull_request) Has been cancelled
ci / Check Documentation Build (pull_request) Has been cancelled
ci / Clippy (pull_request) Has been cancelled
This commit is contained in:
@@ -11,7 +11,8 @@ members = [
|
||||
"zynq-mmu",
|
||||
"zedboard-fsbl",
|
||||
"zedboard-bsp",
|
||||
"zynq-boot-image", "zedboard-qspi-flasher",
|
||||
"zynq-boot-image",
|
||||
"zedboard-qspi-flasher",
|
||||
]
|
||||
|
||||
exclude = [
|
||||
|
||||
@@ -13,3 +13,4 @@ zedboard-bsp = { path = "../zedboard-bsp" }
|
||||
embedded-io = "0.7"
|
||||
embedded-hal = "1"
|
||||
log = "0.4"
|
||||
libm = "0.2"
|
||||
|
||||
@@ -77,7 +77,7 @@ pub fn main() -> ! {
|
||||
unsafe {
|
||||
zynq7000_hal::log::uart_blocking::init_unsafe_single_core(
|
||||
uart,
|
||||
log::LevelFilter::Trace,
|
||||
log::LevelFilter::Info,
|
||||
false,
|
||||
)
|
||||
};
|
||||
@@ -85,7 +85,6 @@ pub fn main() -> ! {
|
||||
let boot_mode = BootMode::new_from_regs();
|
||||
info!("Boot mode: {:?}", boot_mode);
|
||||
|
||||
/*
|
||||
let qspi_clock_config =
|
||||
qspi::ClockConfig::calculate_with_loopback(qspi::SrcSelIo::IoPll, &clocks, 100.MHz())
|
||||
.expect("QSPI clock calculation failed");
|
||||
@@ -132,9 +131,10 @@ pub fn main() -> ! {
|
||||
|
||||
let mut current_addr = 0;
|
||||
let mut read_buf = [0u8; 256];
|
||||
let mut next_checkpoint = 0.05;
|
||||
while current_addr < boot_bin_size {
|
||||
if current_addr % 0x10000 == 0 {
|
||||
info!("Erasing sector at address {:#x}", current_addr);
|
||||
log::debug!("Erasing sector at address {:#x}", current_addr);
|
||||
match spansion_qspi.erase_sector(current_addr as u32) {
|
||||
Ok(()) => {}
|
||||
Err(e) => {
|
||||
@@ -148,13 +148,14 @@ pub fn main() -> ! {
|
||||
}
|
||||
let write_size = core::cmp::min(256, boot_bin_size - current_addr);
|
||||
let write_slice = &boot_bin_slice[current_addr..current_addr + write_size];
|
||||
info!("Programming address {:#x}", current_addr);
|
||||
log::debug!("Programming address {:#x}", current_addr);
|
||||
match spansion_qspi.program_page(current_addr as u32, write_slice) {
|
||||
Ok(()) => {}
|
||||
Err(e) => {
|
||||
error!(
|
||||
log::error!(
|
||||
"failed to write data to QSPI at address {:#x}: {:?}",
|
||||
current_addr, e
|
||||
current_addr,
|
||||
e
|
||||
);
|
||||
panic!("QSPI write failed");
|
||||
}
|
||||
@@ -176,9 +177,12 @@ pub fn main() -> ! {
|
||||
}
|
||||
}
|
||||
current_addr += write_size;
|
||||
if current_addr as f32 / boot_bin_size as f32 >= next_checkpoint {
|
||||
log::info!("Write progress {} %", libm::roundf(next_checkpoint * 100.0));
|
||||
next_checkpoint += 0.05;
|
||||
}
|
||||
}
|
||||
info!("flashing done");
|
||||
*/
|
||||
|
||||
let mut mio_led = gpio::Output::new_for_mio(gpio_pins.mio.mio7, gpio::PinState::Low);
|
||||
loop {
|
||||
|
||||
Reference in New Issue
Block a user