Last active
September 19, 2025 14:07
-
-
Save agrif/84148dcb7da5618fedd81d97aa4c58bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![no_std] | |
| #![no_main] | |
| use rtt_target::rprintln; | |
| extern crate panic_halt; | |
| #[riscv_rt::entry] | |
| fn main() -> ! { | |
| rtt_target::rtt_init_print!(); | |
| rprintln!("Hello, rust!"); | |
| let mut counter = 0; | |
| loop { | |
| riscv::asm::delay(27_000_000); | |
| rprintln!("Counter: {}", counter); | |
| counter += 1; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ python -m alegria.tools.bridge /dev/ttyUSB1 program --attach target/riscv32i-unknown-none-elf/release/rustgram | |
| 0x00000000 - 0x00001430 ... | |
| 0x00001430 - 0x00001998 ... | |
| 0x000019a0 - 0x000019a0 ... | |
| Hello, rust! | |
| Counter: 0 | |
| Counter: 1 | |
| Counter: 2 | |
| Counter: 3 | |
| Counter: 4 | |
| Counter: 5 | |
| ^C | |
| Aborted! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment