You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds a NixOS VM alternative for Windows users or
user that don't want to follow the prerequisites. The text of
the workshop has been modified to reflect this addition.
Copy file name to clipboardExpand all lines: docs/tock_workshop/index.md
+27-9Lines changed: 27 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,18 @@
2
2
3
3
## Prerequisites
4
4
5
+
:::note Windows Users or participants that are willing to use a VM
6
+
This workshop will not work on Windows systems.
7
+
You can try following the guide using a Linux VM/WSL2,
8
+
or you can use the NixOS VM we provide [here](https://drive.google.com/file/d/1-jOsuWdSnOlmyupMWb3Vw4oG_t77BnwQ/view?usp=sharing) (only works on VirtualBox).
9
+
The username and password are both `ipwembedded`.
10
+
If you will be using the NixOS VM, you can skip the prerequisites.
11
+
:::
12
+
5
13
### Rust Toolchain
6
14
7
15
You will need to install the Rust toolchain. To do so, you can follow the instructions on the [Getting started](https://www.rust-lang.org/learn/get-started) page of the Rust Language website.
8
16
9
-
:::info Windows Install Tips
10
-
If you are using Windows, you may be prompted to install [Visual Studio C++ Build tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/). If so, follow the instructions from the previous link.
11
-
12
-
Even if Visual Studio is already on your machine, rustup will not verify if the required components are present. If you experience issues with the `rustup` installation on Windows, please follow [these instructions](https://rust-lang.github.io/rustup/installation/windows-msvc.html) to manually add the missing components.
13
-
:::
14
-
15
17
To verify that the installation, open a terminal and run `rustup --version`. If everything went well, you should see an output similar to this:
16
18
17
19
```shell
@@ -32,7 +34,7 @@ The simplest installation method involves using the `cargo` packet manager, but
You don't have to clone the Tock OS repository, it is already cloned in the home directory.
114
+
You will have to run `nix-shell` once you enter the `tock` directory.
115
+
:::
116
+
110
117
The configuration for the various boards supported can be found in the `boards` directory. To compile the kernel, you can use the `cargo flash` utility.
111
118
112
119
```shell
@@ -118,6 +125,11 @@ Alternatively, you can use the `cargo flash` while inside the board's directory.
118
125
119
126
If you did everything correctly, you should be able to use the `tockloader listen` command to interact with the kernel. When prompted to select a serial port, pick the one that ends with `KitProg3 CMSIS-DAP`.
120
127
128
+
:::note NixOS VM users
129
+
Currently, `tockloader` doesn't work on NixOS, but we have included the program `picocom`
130
+
which you can use with the following command: `picocom -b 115200 /dev/ttyACM0`. (use `sudo` if it gives an error about permissions)
131
+
:::
132
+
121
133
```shell
122
134
tockloader listen
123
135
[INFO ] No device name specified. Using default name "tock".
@@ -131,7 +143,7 @@ Which option? [0] 1
131
143
[INFO ] Using "/dev/cu.usbmodem1103 - KitProg3 CMSIS-DAP".
You don't have to clone the libtock-c repository, it is already cloned in the home directory.
160
+
You will have to run `nix-shell` once you enter the `libtock-c` directory.
161
+
Make sure you don't run that command if you already ran `nix-shell` inside another directory (either run `exit` before, or use another shell).
162
+
:::
163
+
146
164
Navigate to the `examples/blink` folder and take a look at the C application structure found in `main.c`. To compile the application, simply run `make`. This command will built the example applications for all target architectures supported by the library. Apps are compiled into TBFs (Tock Binary Format), and can be found in the `build/<arch>` sub-directories. Tock also generates an archive of the same app, compiled for multiple architectures, for ease of use and portability, called a TAB(Tock Application Bundle) which can be loaded using the `tockloader` utility.
147
165
148
166
### Flashing the application
@@ -168,7 +186,7 @@ Which option? [0] 1
168
186
[INFO ] Using "/dev/cu.usbmodem1103 - KitProg3 CMSIS-DAP".
169
187
[INFO ] Listening for serial output
170
188
171
-
$tock list
189
+
tock$ list
172
190
PID ShortID Name Quanta Syscalls Restarts Grants State
0 commit comments