Skip to content

Commit e247de4

Browse files
authored
Merge pull request #6 from project-ocre/updating_quickstart_guide
Added virtual environment steps, as well as a success screenshot and …
2 parents 736e629 + 7024fd3 commit e247de4

3 files changed

Lines changed: 51 additions & 44 deletions

File tree

docs/quickstart/firmware/hardware.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,27 @@ Complete the [Install dependencies](https://docs.zephyrproject.org/3.7.0/develop
2222
{: .note}
2323
Currently the Ocre runtime is built on Zephyr `3.7.0`. As a result, the links in the above section reference `v3.7.0` documentation and not the *latest* documentation. It is advised to follow the links in this guide to ensure compatibility with your device.
2424

25-
### **2. Install WEST**
26-
27-
Install the [west](https://docs.zephyrproject.org/latest/develop/west/index.html) CLI tool, which is needed to build, run and manage Zephyr applications.
25+
### **2. Create a Virtual Python Environment (venv)**
26+
Create a [Python virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/) (venv) to isolate your Python project dependencies.
2827

2928
```
30-
pip install west
29+
mkdir runtime && cd runtime
30+
python3 -m venv .venv
31+
source .venv/bin/activate
3132
```
3233

33-
{: .note}
34-
We recommend using a Python virtual environment like [venv](https://docs.python.org/3/library/venv.html) to help manage pip dependencies for this project.
34+
{: .highlight}
35+
You *may* need to install the `python3-venv` package (or equivalent) on your host system beforehand.
3536

36-
### **3. Initialize the workspace**
37+
### **3. Install WEST**
3738

38-
Next, we will prepare the Zephyr workspace and checkout the project code.
39+
Install the [west](https://docs.zephyrproject.org/latest/develop/west/index.html) CLI tool, which is needed to build, run and manage Zephyr applications.
3940

40-
First, create the `runtime` directory in the location of your choosing.
4141
```
42-
mkdir runtime
42+
pip install west
4343
```
44-
Next, cd to the `runtime` directory.
4544

46-
```
47-
cd runtime
48-
```
45+
### **4. Initialize the workspace**
4946

5047
Now, initialize the `ocre-runtime` repo.
5148
```
@@ -58,35 +55,41 @@ Lastly, update the repo with the `west` utility.
5855
west update
5956
```
6057

61-
### **4. Install Additional Zephyr (pip) requirements**
58+
{: .note}
59+
`west update` may take 5-10 minutes as it pulls all Zephyr Project board sources.
60+
61+
### **5. Install Additional Zephyr (pip) requirements**
6262

6363
In order to build the Ocre runtime properly, you'll need to install a few remaining requirements for Zephyr.
6464

6565
```
6666
pip install -r zephyr/scripts/requirements.txt
6767
```
6868

69-
### **5. Build the Ocre Runtime**
69+
### **6. Build the Ocre Runtime**
7070

71-
To build and flash for a physical device, follow these steps:
71+
Build the application for your specific board, replacing `BOARD_NAME` with your board's name:
72+
```
73+
west build -b BOARD_NAME ./application -d build -- -DMODULE_EXT_ROOT=`pwd`/application
74+
```
7275

73-
1. Connect your board to your computer.
76+
{: .note}
77+
See the [Board Support](../../../board-support) section in your docs to see if your board is currently supported. If your board is listed, check the "Building and Flashing the Ocre Runtime" section for your `BOARD_NAME` and other relevant info for flashing the Ocre Runtime to your particular device.
7478

75-
2. Build the application for your specific board. Replace `BOARD_NAME` with your board's name:
76-
```
77-
west build -b BOARD_NAME ./application -d build -- -DMODULE_EXT_ROOT=`pwd`/application
78-
```
79+
### **7. Flash the Ocre Runtime to Your Device**
7980

80-
{: .note}
81-
You can also run the **West Build** task directly from the **Ocre Workspace** file as defined in the [Setting Up Your Development Environment](../dev-environment) section. If you do, be sure to select your board name as your build target. See the [Board Support](../../../board-support) section in your docs to see if your board is currently supported.
81+
To flash the Ocre Runtime to your device follow these steps:
8282

83-
### **6. Flash the Ocre Runtime to Your Device**
83+
1. Connect your board to your computer.
84+
2. Open your [serial console](../../quickstart/prerequisites/serial-console/index.md), and connect to your board.
8485
1. Flash the application to your device:
8586
```
8687
west flash
8788
```
8889

89-
After flashing, restart/reset your board to run the application.
90+
After flashing, restart/reset your board to run the application. If successful, you should see the following output on your console:
91+
92+
![](../success.png)
9093

9194
---
9295

docs/quickstart/firmware/simulated.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,27 @@ Complete the [Install dependencies](https://docs.zephyrproject.org/3.7.0/develop
3131
{: .note}
3232
Currently the Ocre runtime is built on Zephyr `3.7.0`. As a result, the links in the above section reference `v3.7.0` documentation and not the *latest* documentation. It is advised to follow the links in this guide to ensure compatibility with your device.
3333

34-
### **2. Install WEST**
35-
36-
Install the [west](https://docs.zephyrproject.org/latest/develop/west/index.html) CLI tool, which is needed to build, run and manage Zephyr applications.
34+
### **2. Create a Virtual Python Environment (venv)**
35+
Create a [Python virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/) (venv) to isolate your Python project dependencies.
3736

3837
```
39-
pip install west
38+
mkdir runtime && cd runtime
39+
python3 -m venv .venv
40+
source .venv/bin/activate
4041
```
4142

42-
{: .note}
43-
We recommend using a Python virtual environment like [venv](https://docs.python.org/3/library/venv.html) to help manage pip dependencies for this project.
43+
{: .highlight}
44+
You *may* need to install the `python3-venv` package (or equivalent) on your host system beforehand.
4445

45-
### **3. Initialize the workspace**
46+
### **3. Install WEST**
4647

47-
Next, we will prepare the Zephyr workspace and checkout the project code.
48+
Install the [west](https://docs.zephyrproject.org/latest/develop/west/index.html) CLI tool, which is needed to build, run and manage Zephyr applications.
4849

49-
First, create the `runtime` directory in the location of your choosing.
5050
```
51-
mkdir runtime
51+
pip install west
5252
```
53-
Next, cd to the `runtime` directory.
5453

55-
```
56-
cd runtime
57-
```
54+
### **4. Initialize the workspace**
5855

5956
Now, initialize the `ocre-runtime` repo.
6057
```
@@ -67,15 +64,18 @@ Lastly, update the repo with the `west` utility.
6764
west update
6865
```
6966

70-
### **4. Install Additional Zephyr (pip) requirements**
67+
{: .note}
68+
`west update` may take 5-10 minutes as it pulls all Zephyr Project board sources.
69+
70+
### **5. Install Additional Zephyr (pip) requirements**
7171

7272
In order to build the Ocre runtime properly, you'll need to install a few remaining requirements for Zephyr.
7373

7474
```
7575
pip install -r zephyr/scripts/requirements.txt
7676
```
7777

78-
### **5. Build the application**
78+
### **6. Build the application**
7979

8080
The following will build the firmware for the *virtual*, `native_sim` target which will allow you to run the Ocre runtime on a simulated device, rather than a physical board.
8181
```
@@ -85,9 +85,13 @@ west build -b native_sim ./application -d build -- -DMODULE_EXT_ROOT=`pwd`/appli
8585
{: .note}
8686
You can also run the **West Build** task directly from the **Ocre Workspace** file as defined in the [Setting Up Your Development Environment](../dev-environment) section. If you do, be sure to select `native_sim` as your build target.
8787

88-
### **6. Run the application**
88+
### **7. Run the application**
8989

9090
To run the application, simply run the following command:
9191
```
9292
./build/zephyr/zephyr.exe
93-
```
93+
```
94+
95+
If successful, you should see the following output:
96+
97+
![](../success.png)
117 KB
Loading

0 commit comments

Comments
 (0)