Skip to content

Commit bc55fe8

Browse files
committed
Refreshed ocre docs with updated steps for building and flashing the ocre runtime, as well as other various QOL improvements.
1 parent e247de4 commit bc55fe8

13 files changed

Lines changed: 115 additions & 105 deletions

File tree

docs/guides/aot.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Ahead of Time Compilation (AOT) For Ocre Containers
3+
layout: default
4+
parent: Guides
5+
nav_order: 0
6+
7+
# Update once guide is done
8+
nav_exclude: true
9+
search_exclude: true
10+
---
11+
12+
May need this for reference:
13+
14+
https://wasmedge.org/docs/start/build-and-run/aot/
15+
16+
{: .important}
17+
Steps to be updated soon

docs/guides/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
title: Guides
33
layout: default
44
nav_order: 5
5-
has_children: true
5+
has_children: true
6+
7+
# Update once pages are added/complete
8+
has_toc: false
69
---
710

811
# Guides

docs/guides/porting-c-code.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,12 @@
22
title: Port an Existing C Application
33
layout: default
44
parent: Guides
5-
nav_order: 0
6-
---
5+
nav_order: 0
6+
7+
# Update once guide is done
8+
nav_exclude: true
9+
search_exclude: true
10+
---
11+
12+
{: .important}
13+
Steps to be updated soon

docs/quickstart/firmware/hardware.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ nav_order: 2
99

1010
This guide covers building and flashing the Ocre runtime onto actual development boards. While simulated environments are great for initial testing, deploying to real hardware allows you to test your applications under authentic conditions and take advantage of board-specific features like sensors and networking capabilities.
1111

12-
Please refer to the board-specific documentation in our [Board Support](../../../board-support) section for detailed setup instructions and requirements for your board before attempting to flash Ocre.
12+
{: .note}
13+
Please refer to the "Building and Flashing the Ocre Runtime" section for your board in our in our [Board Support](../../../board-support) section for your boards name, as well as any additional setup instructions should you need them.
1314

1415
---
1516

@@ -74,7 +75,7 @@ west build -b BOARD_NAME ./application -d build -- -DMODULE_EXT_ROOT=`pwd`/appli
7475
```
7576

7677
{: .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.
78+
You can also run the **West Build** task directly from the **Ocre Workspace** file as defined in the [Ocre Workspace File](../../../reference/workspacefile) reference. If you do, be sure to select your board as your build target from the dropdown list of available boards.
7879

7980
### **7. Flash the Ocre Runtime to Your Device**
8081

docs/quickstart/firmware/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ title: Building and Flashing the Ocre Runtime
33
layout: default
44
parent: Quickstart
55
nav_order: 1
6-
has_children: true
6+
has_children: true
7+
has_toc: false
78
---
89

910
# Building and Flashing the Ocre Runtime
1011

11-
This section will guide you through the process of building the Ocre runtime from source. Whether you're using a simulated environment for testing or deploying to physical hardware, the initial setup and build steps are identical. The paths diverge only at the final stage: simulated devices simply run the runtime directly, while physical devices require an additional flashing step to load the runtime onto the board.
12-
13-
{: .note}
14-
To streamline your development workflow, check out our section on [Setting Up Your Development Environment](dev-environment) just before continuing. There, we walk you through using the "Ocre Workspace" file provided in our repository. This VS Code workspace file includes preconfigured `west` build commands for all supported boards, along with debugging utilities and other helpful settings to make building and flashing the Ocre runtime easier.
12+
Learn how to build and deploy the Ocre runtime on your chosen development environment. The runtime serves as the foundation for running containerized applications on your target device, whether simulated or physical.
1513

1614
---
1715

18-
## Sample App
16+
## Getting Started
17+
Choose your target platform to begin building and testing the Ocre runtime:
1918

20-
To help you get started, we've included a sample application (`./src/main.c`) that demonstrates basic Ocre runtime usage by writing a simple hello world application to flash and directing the runtime to load and execute it.
19+
> * [Using a Simulated Device](simulated) (Recommended for first-time users)
20+
> * [Using a Physical Hardware](hardware)

docs/quickstart/firmware/simulated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ west build -b native_sim ./application -d build -- -DMODULE_EXT_ROOT=`pwd`/appli
8383
```
8484

8585
{: .note}
86-
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.
86+
You can also run the **West Build** task directly from the **Ocre Workspace** file as defined in the [Ocre Workspace File](../../../reference/workspacefile) reference. If you do, be sure to select `native_sim` as your build target from the dropdown list of available boards.
8787

8888
### **7. Run the application**
8989

docs/quickstart/first-app/dev-environment/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ nav_order: 0
77

88
# Setting Up Your Development Environment
99

10-
The Ocre toolchain for C/C++ is provided as a Docker container image to ensure a consistent development environment for building containerzied applications with Ocre. You can utilize this container in two ways:
10+
The Ocre toolchain for C/C++ is provided as a Docker container image to ensure a consistent development environment for building containerized applications with Ocre. You can utilize this container in two ways:
1111

1212
1. [Using Visual Studio Code with Dev Containers](#developing-with-visual-studio-code): Provides an integrated development experience with full IDE support and container management.
1313

@@ -38,7 +38,7 @@ The dev container can also be run directly in GitHub via [CodeSpaces](https://do
3838
```bash
3939
git clone https://github.com/project-ocre/getting-started.git
4040
```
41-
3. **Open Visual Studio Code**: Launch VSCode on your machine.
41+
3. **Open Visual Studio Code**
4242
4. **Open Folder in Container**:
4343
- Run the command `Dev Containers: Open Folder in Container...` from the Command Palette (Cmd + Shift + P or Ctrl + Shift + P).
4444
- Select the folder containing the cloned repository.

docs/quickstart/first-app/first-container/index.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,40 @@ title: Building And Deploying Your First Container
33
layout: default
44
parent: Your First Container
55
nav_order: 1
6-
7-
nav_exclude: false
8-
search_exclude: true
96
---
107

118
# Building and Deploying Your First App
129

13-
Now that you have set up your development environment, you're ready to build and deploy your first container-based application with Ocre. This guide will walk you through the process of building a sample application from our getting-started repository.
10+
Now that you have set up your development environment, you're ready to build and deploy your first container-based application with Ocre.
1411

1512
---
1613

1714
## Prerequisites
1815

1916
Before proceeding, ensure you have:
2017
- Completed the [Setting Up Your Development Environment](../dev-environment) guide
21-
- Cloned the [`getting-started`](https://github.com/project-ocre/getting-started) repository
2218

2319
---
2420

2521
## Building Your First Container
2622

27-
Let's build your first Ocre container using one of our sample applications.
23+
Let's build your first Ocre container using the "*hello-world*" sample application.
2824

29-
1. **Navigate to the Samples Directory**
25+
1. **Navigate to *hello-world* sample in the *samples* directory**
3026
```
31-
cd getting-started/samples
27+
cd samples/hello-world
3228
```
33-
2. **Choose a Sample Application:** Browse through the available samples and choose one that interests you. Each sample demonstrates different capabilities of the Ocre platform.
34-
35-
3. **Create and Enter Build Directory:** Once you have jumped into the sample of your choosing, lets create the build directory.
36-
```
37-
mkdir build && cd build
38-
```
39-
40-
4. **Configure the Build**
41-
```
42-
cmake -DWASI_SDK_DIR=/opt/wasi-sdk \
43-
-DCMAKE_TOOLCHAIN_FILE=/opt/wamr-sdk/app-sdk/wamr_toolchain.cmake ..
44-
```
45-
46-
5. **Build the Container**
47-
```
48-
make
49-
```
5029

51-
After successful compilation, you'll find a `sample.nbx` file in your build directory (where "sample" matches your chosen sample name). This is your containerized application, ready for deployment.
30+
2. **Build the WASM Module**
31+
```
32+
mkdir build && cd build
33+
cmake -DWASI_SDK_DIR=/opt/wasi-sdk -DCMAKE_TOOLCHAIN_FILE=/opt/wamr-sdk/app-sdk/wamr_toolchain.cmake ..
34+
make
35+
```
5236

53-
{: .important}
54-
If the build fails, ensure you're running these commands within the dev container or interactive Docker environment, not on your host system.
37+
This step results in the creation of a file named `sample_name.wasm`, which will be used by the Ocre CLI to create an Ocre container in the next step.
5538

39+
---
5640

5741
## Deploying Your First Container
5842

docs/reference/ocre-runtime/index.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/quickstart/firmware/dev-environment.md renamed to docs/reference/workspacefile.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
---
2-
title: Setting Up Your Development Environment
2+
title: Ocre Workspace File
33
layout: default
4-
parent: Building and Flashing the Ocre Runtime
5-
nav_order: 0
4+
parent: Reference
65
---
76

8-
# Setting Up Your Development Environment
7+
# Ocre Workspace File
98

109
This page will guide you through setting up your development environment for the Ocre runtime using our preconfigured VS Code workspace file. The workspace file provides everything you need to build, flash, and debug the runtime with minimal configuration.
1110

1211
---
1312

1413
## What is a VS Code Workspace?
1514

16-
A Visual Studio Code workspace allows you to manage multiple folders, settings, and tasks as a single, cohesive environment. Workspaces can save you time by automatically loading recommended settings, extensions, and tasks suited for your project. If you're new to workspaces, we recommend reviewing the [VS Code Workspaces documentation](https://code.visualstudio.com/docs/editor/workspaces) to learn more about their features and usage.
15+
A Visual Studio Code workspace allows you to manage multiple folders, settings, and tasks as a single, cohesive environment. Workspaces can save you time by automatically loading recommended settings, extensions, and tasks suited for your project.
16+
17+
{: .note}
18+
If you're new to workspaces, we recommend reviewing the [VS Code Workspaces documentation](https://code.visualstudio.com/docs/editor/workspaces) to learn more about their features and usage.
1719

1820
---
1921

2022
## What’s in the "Ocre Workspace" File?
2123

22-
The Ocre runtime workspace file, [**`ocre.code-workspace`**](https://github.com/project-ocre/ocre-runtime/blob/main/ocre.code-workspace), is specifically tailored to help you set up and work with the Ocre runtime efficiently. Located in the root of the repository, this file includes:
24+
The Ocre runtime workspace file, [**`ocre.code-workspace`**](https://github.com/project-ocre/ocre-runtime/blob/main/ocre.code-workspace), located in the root of the `ocre-runtime` repo, is specifically tailored to help you set up and work with the Ocre runtime efficiently. This file includes:
2325

2426
1. **West Tasks:**
2527
The workspace file includes a predefined West tasks, which simplifies the process of building and flashing the Ocre runtime. These tasks support several board options, which can be selected directly within VS Code.
@@ -36,6 +38,15 @@ The workspace file also includes debugging profiles specifically for Ocre-compat
3638

3739
This section will guide you through running the essential pre-defined tasks in the Ocre workspace file, including build, flash, and debug operations. These tasks make it easy to quickly set up your development environment for various Ocre-compatible boards without needing to configure each setting manually.
3840

41+
### Loading the Workspace File
42+
43+
1. Navigate to the `application` folder in your `ocre-runtime` project directory.
44+
2. Locate `ocre.code-workspace`
45+
3. Double-click the file in your file explorer, then
46+
4. Click the blue "Open Workspace" button that appears in the bottom right of your editor.
47+
48+
Once loaded, you'll have access to all preconfigured tasks, debug profiles, and recommended extensions.
49+
3950
### Running Build and Flash Tasks
4051

4152
The workspace file includes tasks for both building and flashing the Ocre runtime. Follow these instructions to access and run these tasks:
@@ -54,13 +65,4 @@ The workspace also includes debugging profiles configured for Ocre-compatible bo
5465
2. In the dropdown menu, select the debug profile that matches your target board.
5566
3. Click "Start Debugging" or press `F5` to begin a session. The debugger will launch with the appropriate settings for your board, streamlining the process for testing and troubleshooting.
5667

57-
With these tasks, you can easily build, flash, and debug the Ocre runtime in a consistent and streamlined manner across different Ocre-compatible devices.
58-
59-
---
60-
61-
## Next Steps
62-
63-
With your development environment configured, you're ready to start building the Ocre runtime. Choose your development path below:
64-
65-
- [Build for a Simulated Device](../simulated)
66-
- [Build for a Physical Device](../hardware)
68+
With these tasks, you can easily build, flash, and debug the Ocre runtime in a consistent and streamlined manner across different Ocre-compatible devices.

0 commit comments

Comments
 (0)