Alistair Francis | 103f80d | 2020-02-24 09:51:37 -0800 | [diff] [blame] | 1 | // This example just prints "Hello Tock World" to the terminal. |
JOE1994 | ec65991 | 2020-07-04 23:46:50 -0400 | [diff] [blame] | 2 | // Run `tockloader listen`, or use any serial program of your choice |
| 3 | // (e.g. `screen`, `minicom`) to view the message. |
Alistair Francis | 103f80d | 2020-02-24 09:51:37 -0800 | [diff] [blame] | 4 | |
| 5 | #![no_std] |
| 6 | |
Alistair Francis | e5f74c3 | 2020-09-11 15:21:14 -0700 | [diff] [blame] | 7 | use libtock::println; |
Alistair Francis | 103f80d | 2020-02-24 09:51:37 -0800 | [diff] [blame] | 8 | use libtock::result::TockResult; |
| 9 | |
Johnathan Van Why | 074fa7d | 2020-10-14 17:06:50 -0700 | [diff] [blame] | 10 | libtock_core::stack_size! {0x400} |
| 11 | |
Alistair Francis | 103f80d | 2020-02-24 09:51:37 -0800 | [diff] [blame] | 12 | #[libtock::main] |
| 13 | async fn main() -> TockResult<()> { |
| 14 | let drivers = libtock::retrieve_drivers()?; |
| 15 | |
Alistair Francis | e5f74c3 | 2020-09-11 15:21:14 -0700 | [diff] [blame] | 16 | drivers.console.create_console(); |
Alistair Francis | 103f80d | 2020-02-24 09:51:37 -0800 | [diff] [blame] | 17 | |
Alistair Francis | e5f74c3 | 2020-09-11 15:21:14 -0700 | [diff] [blame] | 18 | println!("Hello Tock World"); |
Alistair Francis | 103f80d | 2020-02-24 09:51:37 -0800 | [diff] [blame] | 19 | |
| 20 | Ok(()) |
| 21 | } |