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
The following is a simple guide for building the app for the OBC and flashing.
6
8
7
9
## Compiling for the OBC
10
+
<Steps>
8
11
1. From the root directory you can run the following commands
9
12
```shell
10
13
mkdir -p build_arm &&cd build_arm
@@ -22,11 +25,13 @@ The following is a simple guide for building the app for the OBC and flashing.
22
25
:::caution
23
26
Make sure to specify the `-DBOARD_TYPE=` option to avoid any unwanted behavior
24
27
:::
28
+
</Steps>
25
29
26
30
## Flashing to the OBC
27
31
There are two main ways to flash to the OBC: **using the bootloader** or **using UniFlash**. UniFlash is the more common way so let's go over that first.
28
32
29
33
### Flashing via UniFlash
34
+
<Steps>
30
35
1. When you open UniFlash you should be greeted with the following screen...
31
36
32
37

@@ -42,13 +47,15 @@ There are two main ways to flash to the OBC: **using the bootloader** or **using
42
47
:::note
43
48
UniFlash may get stuck sometimes and throw errors. In such cases, navigate to session on the top red bar and start a new session. You will have to reconfigure UniFlash but it should start working again.
44
49
:::
50
+
</Steps>
45
51
46
52
### Accessing UART
47
53
This is an important skill everyone should know just for debugging. We will go through the process for Windows and Linux.
48
54
49
55
#### Base setup
50
56
Both Linux and Windows have a program called `puTTY` available to download. `puTTY` is a great program to detect serial activity on ports so make sure you download this before proceeding!
51
57
58
+
<Steps>
52
59
1. Download and open `puTTY`. You should be greeted with the following screen...
53
60
54
61

@@ -59,26 +66,32 @@ Both Linux and Windows have a program called `puTTY` available to download. `puT
59
66
3. You can set the speed to `115200` which is the baud rate at the time of writing this tutorial (August, 2025). Update this rate if the baud rate of the board is increased!
60
67
4. If you know how to detect what USB port is connected to UART you can type that USB port into the `Serial line` field in `puTTY`. If you need help, read through the following sections!
61
68
5. You can then press the `Open` button and there should be a black screen that starts printing out text sent by the board!
69
+
</Steps>
62
70
63
71
#### Finding USB port on Linux
64
72
On Linux the port name will be in the form of `/dev/tty*`. For example the port could be named `/dev/ttyACM0` or `/dev/ttyUSB0`. To find the port connected to the board do the following...
73
+
<Steps>
65
74
1. Open up a terminal without the board connected and type in the following command that will list out all file paths starting with `/dev/tty`
66
75
```shell
67
76
ls /dev/tty*
68
77
```
69
78
2. Now connect the board and repeat the same command.
70
79
3. Look for differences in outputs between running the command before and after connecting the board. The `/dev/tty` file path that gets added the second time around is the port that your board is connected on!
71
80
4. You can type the name of the port you have determined to be going to the board in the `Serial line` field in `puTTY`. If you are using JTAG and have to connect two USBs to your Linux system, you will have to experiment and see which port outputs logs on puTTY.
81
+
</Steps>
72
82
73
83
#### Finding USB port on Windows
74
84
On Windows the port name will be in the form of `COMXX` with `XX` denoting numbers. For example possible port names are `COM1`, `COM12`, etc. To find the port connected to the board do the following...
85
+
<Steps>
75
86
1. Open `Device Manager` and you should be greeted with the following (the image is taken off the web so your window may look a bit different)...
2. Under `Ports` try to find the COM port labelled with `UART` somewhere in it's name. Once you have found it that is the COM port you will be using in `puTTY`.
89
+
</Steps>
78
90
79
91
### Working with USB on WSL (`usbipd`)
80
92
Unfortunately Windows does not pass-through USB ports by default to WSL. Thus, we have to use a utility called `usbipd` to handle USB device pass-through in WSL. The following are the steps needed to attach/detach USB devices from WSL.
81
93
94
+
<Steps>
82
95
1. Open a `PowerShell` window. Within the window type the following command to find the bus-id of the USB device that you want to attach.
83
96
84
97
```shell title="PowerShell"
@@ -100,9 +113,11 @@ Unfortunately Windows does not pass-through USB ports by default to WSL. Thus, w
100
113
```shell title="PowerShell"
101
114
usbipd detach --busid 1-1
102
115
```
116
+
</Steps>
103
117
104
118
105
119
### Flashing via the bootloader
120
+
<Steps>
106
121
1. Use UniFlash to flash the `OBC-bl.out` file, ensuring you have built it for the correct board using the right argument for the `-DBOARD_TYPE=` option.
107
122
2. From the root directory activate the python virtual environment with the following command
108
123
@@ -125,3 +140,4 @@ Unfortunately Windows does not pass-through USB ports by default to WSL. Thus, w
125
140
The bootloader sends messages through the UART port so if the first string that the script displays is not 'Erase Successful' or the script is takes more than 1 second to start, re-run the script. Hopefully this is addressed in the future!
126
141
:::
127
142
5. Wait for the script to flash and the board should jump to app within 2 seconds of when flashing is completed. If not check the error that is being logged to UART and try again!
UW Orbital's Firmware Repository is quite large. As a result the previous leads have constantly refactored it to where it is now. So let's go through it! This write-up will only provide a brief overview. Consult other places in the documentation for more detailed explanations.
8
+
9
+
## General File Structure
10
+
The following describes the general file structure of the repository
11
+
<FileTree>
12
+
- .github Github files
13
+
- ...
14
+
- cmake Custom CMake files
15
+
- ...
16
+
- gs Ground station files
17
+
- backend Ground station backend
18
+
- ...
19
+
- frontend Ground station frontends for MCC and ARO
20
+
- ...
21
+
- hil Hardware-in-loop folder
22
+
- ...
23
+
- interfaces Any code used to interface from satellite to ground station
24
+
- ...
25
+
- libs Any of the C libraries used throughout the codebase
0 commit comments