diff --git a/buildpush.sh b/buildpush.sh index 200637a15..c13a34fa4 100755 --- a/buildpush.sh +++ b/buildpush.sh @@ -7,7 +7,7 @@ UPDATE_KERNEL=1 USE_USB=1 FPGA_IMAGE=../betrusted-soc/build/gateware/encrypted.bin KERNEL_IMAGE=target/riscv32imac-unknown-none-elf/release/xous.img -CSR_CSV=../betrusted-soc/build/csr.csv.1 # always use the previous version for the current update! +CSR_CSV=../betrusted-soc/build/csr.csv.1 USE_IDENITY=0 POSITIONAL=() @@ -35,8 +35,12 @@ do shift shift ;; + --current-csr) + CSR_CSV=../betrusted-soc/build/csr.csv + shift + ;; -h|--help) - echo "$0 provisions betrusted. --kernel-skip skips the kernel, --fpga-skip skips the FPGA." + echo "$0 provisions betrusted. --kernel-skip skips the kernel, --fpga-skip skips the FPGA. --current-csr indicates to use the CSR for the new FPGA image to do the update (normally you want to use the one corresponding to the older, currently installed version)." echo "Alternatively, using --copy-to copies the files to a remote host and skips provisioning." echo " --identity supplies an identity file to the scp command." echo " Copying assumes betrusted-scripts repo is cloned on ssh-target at ~/code/betrused-scripts/" diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index f87c73480..6bb7cc32f 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -21,7 +21,8 @@ riscv = "0.5.6" debug-print = [] print-panics = [] report-memory = ["stats_alloc"] -default = ["print-panics", "debug-print"] +#default = ["print-panics", "debug-print"] +default = [] [target.'cfg(any(windows, unix))'.dependencies] lazy_static = "1.4" diff --git a/loader/Cargo.toml b/loader/Cargo.toml index 587c12fcd..c33ab911f 100644 --- a/loader/Cargo.toml +++ b/loader/Cargo.toml @@ -14,7 +14,8 @@ rand = "0.7.3" [features] debug-print = [] earlyprintk = [] -default = ["debug-print"] +#default = ["debug-print"] +default = [] [profile.release] codegen-units = 1 # 1 better optimizations diff --git a/services/graphics-server/src/op.rs b/services/graphics-server/src/op.rs index c20fc73cc..2fac527fb 100644 --- a/services/graphics-server/src/op.rs +++ b/services/graphics-server/src/op.rs @@ -411,7 +411,7 @@ pub fn circle(fb: &mut LcdFB, x: usize, y: usize, r: usize, stroke_width: usize, center: Point{x: x as i16, y: y as i16}, radius: r as u16, style: Style{ fill_color: Some(color), stroke_color: Some(color), stroke_width: stroke_width as i16}, - p: Point::zero(), + p: Point::new(-(r as i16), -(r as i16)), }; for pixel in c { diff --git a/services/shell/src/main.rs b/services/shell/src/main.rs index b5241bae6..3804813ea 100644 --- a/services/shell/src/main.rs +++ b/services/shell/src/main.rs @@ -162,6 +162,7 @@ fn shell_main() -> ! { let mut bouncyball = Bounce::new(14, Rectangle::new(Point::new(0, 18 * 21), Point::new(336, 536-1))); // TODO: make API call to get screen size + bouncyball.update(); #[cfg(baremetal)] { @@ -219,6 +220,22 @@ fn shell_main() -> ! { error!("error requesting ticktimer!") } + string_buffer.clear(); + write!(&mut string_buffer, "Elapsed time: {}ms", last_time).expect("Can't write"); + graphics_server::clear_region(graphics_conn, 0, 0, 300, 40) + .expect("unable to clear region"); + info!("drawing string: {}", string_buffer); + graphics_server::draw_string(graphics_conn, &string_buffer).expect("unable to draw string"); + + //ticktimer_server::sleep_ms(ticktimer_conn, 2000 + loops).expect("couldn't sleep"); + loops += 1; + + // draw the ball + bouncyball.update(); + graphics_server::clear_region(graphics_conn, + bouncyball.bounds.top_left().x as _, bouncyball.bounds.top_left().y as _, + bouncyball.bounds.bottom_right().x as _, bouncyball.bounds.bottom_right().y as _) + .expect("unable to clear region"); graphics_server::draw_circle( graphics_conn, bouncyball.loc, @@ -226,16 +243,6 @@ fn shell_main() -> ! { ) .expect("unable to draw to screen"); - string_buffer.clear(); - write!(&mut string_buffer, "Elapsed time: {}ms", last_time).expect("Can't write"); - graphics_server::clear_region(graphics_conn, 0, 0, 300, 40) - .expect("unable to clear region"); - info!("drawing string: {}", string_buffer); - graphics_server::draw_string(graphics_conn, &string_buffer).expect("unable to draw string"); graphics_server::flush(graphics_conn).expect("unable to draw to screen"); - - ticktimer_server::sleep_ms(ticktimer_conn, 2000 + loops).expect("couldn't sleep"); - loops += 1; - bouncyball.update(); } }