Next-generation FPGA SoC toolkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.rs 302B

123456789101112131415161718192021
  1. #![no_std]
  2. #![no_main]
  3. extern crate riscv_rt;
  4. extern crate panic_halt;
  5. use riscv_rt::entry;
  6. fn print(string: &str) {
  7. for c in string.chars() {
  8. let mem = 0x00400000 as *mut u8;
  9. unsafe { *mem = c as u8 }
  10. }
  11. }
  12. #[entry]
  13. fn main() -> ! {
  14. loop {
  15. print("hello2");
  16. }
  17. }