Skip to content

Commit 330a087

Browse files
committed
Improve documentation for plugin + better overall structure
1 parent 7379b18 commit 330a087

19 files changed

Lines changed: 291 additions & 191 deletions

File tree

warduino/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ config.local.js
1313
basement_dist
1414
.idea
1515
*.sh
16+
.obsidian

warduino/.vitepress/components/home.vue

Lines changed: 33 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -21,47 +21,14 @@ const {frontmatter: fm} = useData()
2121
</div>
2222
</div>
2323

24-
<!-- features -->
24+
<!-- projects -->
2525
<!--
2626
<div class="features">
2727
<div class="container">
28-
<div class="grid column-3">
29-
<div class="item">
30-
<feature icon="rocket_launch"
31-
header="Get started"
32-
tagline="Start developing programs with WARDuino."
33-
link="/guide/get-started"/>
34-
</div>
35-
<div class="item">
36-
<feature icon="terminal"
37-
header="IDE support"
38-
tagline="Manual for the WARDuino VS Code plugin."
39-
link="/guide/plugin"/>
40-
</div>
41-
<div class="item">
42-
<feature icon="check_box"
43-
header="Testing"
44-
tagline="Get started with the Latch testing framework."
45-
link="/guide/latch"/>
46-
</div>
47-
<div class="item">
48-
<feature icon="school"
49-
header="Examples & Tutorials"
50-
tagline="A selection of examples to get you started with WARDuino."
51-
link="/guide/examples/"/>
52-
</div>
53-
<div class="item">
54-
<feature icon="menu_book"
55-
header="Developer's guide"
56-
tagline="Documentation of the WARDuino virtual machine implementation."
57-
link="/reference/"/>
58-
</div>
59-
<div class="item">
60-
<feature icon="diversity_3"
61-
header="Research"
62-
tagline="Research articles published around the WARDuino project."
63-
link="/articles/"/>
64-
</div>
28+
<div class="grow divider">
29+
<h4 class="center">WARDuino</h4>
30+
<h4 class="center">EDWARD</h4>
31+
<h4 class="center">Latch</h4>
6532
</div>
6633
</div>
6734
</div>
@@ -71,6 +38,7 @@ const {frontmatter: fm} = useData()
7138
<div class="details">
7239
<div class="container">
7340
<div class="vp-doc grow">
41+
<!-- <h2></h2>-->
7442

7543
<div style="display: flex; flex-flow: column nowrap; gap: 24px; justify-content: space-between">
7644
<div class="grow divider">
@@ -85,8 +53,8 @@ const {frontmatter: fm} = useData()
8553
</div>
8654
<p><a href="./guide/get-started.html">-&gt; Get started</a></p>
8755
<p><a href="./guide/examples/index.html">-&gt; Examples</a></p>
56+
<p><a href="./guide/plugin/">-&gt; VS Code plugin</a></p>
8857
<p><a href="./guide/latch.html">-&gt; Automated testing</a></p>
89-
<p><a href="./guide/plugin.html">-&gt; Debugging in VS Code</a></p>
9058
</article>
9159
<article class="list">
9260
<div class="heading">
@@ -97,24 +65,24 @@ const {frontmatter: fm} = useData()
9765
<h4>References</h4>
9866
</div>
9967
</div>
100-
<p><a href="./reference/primitives.html">-&gt; WARDuino primitives</a></p>
101-
<p><a href="./reference/debug-protocol.html">-&gt; Debug protocol</a></p>
68+
<p><a href="./reference/architecture.html">-&gt; WARDuino architecture</a></p>
69+
<p><a href="./reference/primitives.html">-&gt; Built-in primitives</a></p>
70+
<p><a href="./reference/debug-protocol.html">-&gt; Remote debug protocol</a></p>
10271
<p><a href="./reference/edward/index.html">-&gt; EDWARD debugger</a></p>
103-
<p><a href="./latch/index.html">-&gt; Latch reference</a></p>
72+
<p><a href="./latch/index.html">-&gt; Latch testing</a></p>
10473
</article>
10574
<article class="list">
10675
<div class="heading">
10776
<div class="icon">
10877
<span class="material-symbols-rounded">school</span>
10978
</div>
11079
<div>
111-
<h4>Examples & Tutorials</h4>
80+
<h4>Tutorials</h4>
11281
</div>
11382
</div>
114-
<p><a href="./guide/examples/analog.html">-&gt; Analog Read Serial</a></p>
115-
<p><a href="./guide/examples/blink.html">-&gt; Blinking LED</a></p>
116-
<p><a href="./guide/examples/button.html">-&gt; Button</a></p>
117-
<p><a href="./guide/examples/index.html">-&gt; More ...</a></p>
83+
<p><a href="./guide/examples/index.html">-&gt; Example programs</a></p>
84+
<p><a href="./guide/plugin/tutorial.html">-&gt; Debugging with VS Code</a></p>
85+
<p><a href="./reference/edward/concurrency.html">-&gt; Debugging concurrency issues</a></p>
11886
</article>
11987

12088
</div>
@@ -129,8 +97,11 @@ const {frontmatter: fm} = useData()
12997
<h4>Developer's guide</h4>
13098
</div>
13199
</div>
132-
<p><a style="font-size: 14px" href="./reference/development.html">-&gt; Development</a></p>
100+
<p><a style="font-size: 14px" href="./reference/contributing.html">-&gt; Contributing</a></p>
101+
<p><a style="font-size: 14px" href="./reference/development.html">-&gt; Debugging the debugger</a></p>
133102
<p><a href="./reference/platforms.html">-&gt; Supported platforms</a></p>
103+
<p><a href="https://github.com/orgs/TOPLLab/projects/1" target="_blank">-&gt; Roadmap <span
104+
class="material-symbols-rounded">open_in_new</span></a></p>
134105
</article>
135106
<article class="list">
136107
<div class="heading">
@@ -141,7 +112,8 @@ const {frontmatter: fm} = useData()
141112
<h4>Templates</h4>
142113
</div>
143114
</div>
144-
<p><a href="https://github.com/TOPLLab/as-warduino-template">-&gt; AssemblyScript</a></p>
115+
<p><a href="https://github.com/TOPLLab/as-warduino-template" target="_blank">-&gt; AssemblyScript <span
116+
class="material-symbols-rounded">open_in_new</span></a></p>
145117
</article>
146118
<div></div>
147119
</div>
@@ -152,7 +124,8 @@ const {frontmatter: fm} = useData()
152124
<h4 class="center">Research</h4>
153125
<p class="center">
154126
WARDuino and the related projects documented here, are being developed as part of active research projects.
155-
The principle investigators at Ghent University and the VUB, maintain this documentation website and the associated software.
127+
The principle investigators at Ghent University and the VUB, maintain this documentation website and the
128+
associated software.
156129
You can find out more about the research on the <i>published articles</i> page.
157130
</p>
158131
<p class="center"><a href="./articles/index.html">-&gt; Published articles</a></p>
@@ -365,7 +338,7 @@ const {frontmatter: fm} = useData()
365338
.icon {
366339
box-sizing: border-box;
367340
margin-right: 8px;
368-
margin-top: 5px;
341+
vertical-align: text-bottom;
369342
}
370343
371344
.icon > span {
@@ -384,12 +357,14 @@ h4.center {
384357
385358
p.center {
386359
max-width: 688px;
387-
margin: 0 auto;
360+
margin: 0 auto;
388361
}
389362
390363
391364
@media (max-width: 640px) {
392-
max-width: 100%;
365+
p.center {
366+
max-width: 100%;
367+
}
393368
}
394369
395370
.divider {
@@ -422,4 +397,9 @@ p {
422397
line-height: 24px;
423398
font-weight: 400;
424399
}
400+
401+
a > span {
402+
font-size: inherit;
403+
font-weight: inherit;
404+
}
425405
</style>

warduino/.vitepress/config.ts

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,38 @@ export default defineConfig({
5959
{ text: 'MQTT Smartlamp', link: '/guide/examples/smartlamp' },
6060
]
6161
},
62-
{ text: 'VS Code Plugin', link: '/guide/plugin' },
62+
{ text: 'VS Code Plugin',
63+
collapsed: true,
64+
items: [
65+
{ text: 'Installation', link: '/guide/plugin/' },
66+
{ text: 'Getting Started', link: '/guide/plugin/get-started' },
67+
{ text: 'Debugging Hardware', link: '/guide/plugin/tutorial' },
68+
]
69+
},
6370
{ text: 'Testing on Hardware', link: '/guide/latch' }
6471
]
6572
},
6673

6774
{
68-
text: 'WARDuino Reference',
75+
text: "Developer's Guide",
6976
collapsed: true,
7077
items: [
71-
{ text: 'Overview', link: '/reference/' },
78+
{ text: 'Contributing', link: '/reference/contributing' },
7279
{ text: 'Development', link: '/reference/development' },
80+
{ text: 'Platform Support', link: '/reference/platforms' },
81+
]
82+
},
83+
84+
{
85+
text: 'Technical Reference',
86+
collapsed: true,
87+
items: [
88+
{ text: 'Overview', link: '/reference/' },
89+
{ text: 'Architecture', link: '/reference/architecture' },
7390
{ text: 'Primitives', link: '/reference/primitives' },
74-
{ text: 'Remote Debugger', link: '/reference/debugger' },
7591
{ text: 'Debug Protocol', link: '/reference/debug-protocol' },
7692
{
77-
text: 'EDWARD Reference',
93+
text: 'EDWARD',
7894
collapsed: true,
7995
items: [
8096
{ text: 'Overview', link: '/reference/edward/' },
@@ -87,21 +103,20 @@ export default defineConfig({
87103
},
88104
]
89105
},
90-
{ text: 'Platform Support', link: '/reference/platforms' }
91-
]
92-
},
93-
94-
{
95-
text: 'Latch Reference',
96-
collapsed: true,
97-
items: [
98-
{ text: 'Overview', link: '/latch/' },
99-
{ text: 'Latch API', link: '/latch/api' }
106+
{
107+
text: 'Latch',
108+
collapsed: true,
109+
items: [
110+
{ text: 'Overview', link: '/latch/' },
111+
{ text: 'Latch API', link: '/latch/api' },
112+
]
113+
},
114+
{ text: 'VS Code Plugin', link: '/reference/plugin' }
100115
]
101116
},
102117

103118
{
104-
text: 'Research Articles',
119+
text: 'Published Articles',
105120
collapsed: true,
106121
items: [
107122
{ text: 'Overview', link: '/articles/' },

warduino/articles/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import citation from '../.vitepress/components/citation.vue'
33
</script>
44

5-
# Research Articles
5+
# Published Articles
66

77
## EDWARD (2022)
88

warduino/guide/examples/smartlamp.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
next: VS Code Plugin
3+
---
14
# Smartlamp App with MQTT
25

36

warduino/guide/latch.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
---
22
title: Latch
3-
next: WARDuino Reference
3+
next: Developer's Guide
44
---
55
# Testing: Latch framework
66

77
**<span style="font-variant: small-caps;">Latch</span> (Large-scale Automated Testing on Constraint Hardware)** is a novel testing framework for running large scale unit and integration tests in constrained environments.
88

99
::: tip Open source
10-
1110
You can find the open source code on [github](https://github.com/TOPLLab/latch).
12-
1311
:::
1412

13+
## Getting Started
14+
15+
16+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Getting Started
2+
3+
## Launch the Plugin {#launch}
4+
5+
Open your local plugin repository (see [install step](./index.md)), and click on `Run Extension` under the _Run and Debug_ tab.
6+
This will launch the plugin in a new VS Code window.
7+
8+
In this new window, open your project folder.
9+
If you don't have a project yet, you can use the [AssemblyScript template](https://github.com/TOPLLab/as-warduino-template) for WARDuino to get started quickly.
10+
11+
## Project Configuration {#vscode-config}
12+
13+
::: tip Add `launch.json` file
14+
If you use any of our templates, you can skip this configuration step.
15+
The template contains the correct launch file.
16+
:::
17+
18+
To use the WARDuino plugin to debug your project, you need to create a `launch.json` file in the `.vscode` subfolder of your project root directory [<sup>\[1\]</sup>](https://code.visualstudio.com/docs/editor/debugging).
19+
The file should look like this:
20+
21+
```json
22+
{
23+
"version": "0.4.1",
24+
"configurations": [
25+
{
26+
"type": "WARDuinoDBG",
27+
"request": "launch",
28+
"name": "Debug WARDuino",
29+
"program": "${workspaceFolder}/src/main.ts",
30+
"stopOnEntry": true,
31+
"trace": false
32+
}
33+
]
34+
}
35+
```
36+
37+
The `program` key within the JSON file specifies the application's entry file that needs to be debugged.
38+
39+
Depending on the file extension pointed by the `program` entry, the plugin will load the required WebAssembly compiler and create source mappers accordingly.
40+
41+
## Start Debugging
42+
43+
By default, the plugin will debug using a local running instance of WARDuino (emulator).
44+
This means you don't need any further configuration.
45+
Navigate to the _Run and Debug_ tab, and click on `Debug WARDuino`.
46+
47+
The next tutorial goes through the steps needed to debug on real hardware.

warduino/guide/plugin/index.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# VS Code Plugin
2+
3+
::: tip WARDuino VS Code 0.4.1
4+
5+
This page describes the VS Code plugin [version 0.4.1](https://github.com/TOPLLab/WARDuino-VSCode/releases/tag/v0.4.1), which works with WARDuino [version 0.4.2](https://github.com/TOPLLab/WARDuino/releases/tag/v0.4.2).
6+
7+
:::
8+
9+
::: warning Unstable prerelease
10+
11+
The plugin is still in experimental phase.
12+
The following describes the current state of the VS Code plugin, which is not yet fully stable.
13+
Consequently, the plugin may crash unexpectedly or become unresponsive.
14+
15+
:::
16+
17+
The WARDuino plugin is a VS Code extension designed for debugging applications running on the WARDuino VM. The plugin offers two debugging techniques:
18+
19+
1. [remote debugging](/reference/architecture.md#classic) and
20+
2. [event-based out-of-place debugging](/reference/edward/index).
21+
22+
Noteworthy functionality of the plugin:
23+
24+
- On-demand switching from [remote debugging](/reference/architecture.md#classic) to [event-based out-of-place debugging](/reference/edward/index).
25+
- Access to classic debug operations: add a breakpoint, remove a breakpoint, step, step-over, run, and more.
26+
- Access to advanced debug operations: step back debug operations to view past state. (experimental)
27+
- A view on the whole debugging history to easily jump back to a previous state. (experimental)
28+
- Upload new source code on the device once a fault has been fixed.
29+
- Debug on a board
30+
- Debug on an emulator.
31+
- Control over interrupts (e.g., button press, incoming MQTT message) and the handling of it.
32+
33+
## Manual Installation {#installation}
34+
35+
::: warning Soon to be released!
36+
37+
The VS Code plugin has not been published yet. Look out for it in the VS Code Marketplace!
38+
:::
39+
40+
Before installing the plugin, make sure that you followed the [installation guide](/guide/get-started.md#installation) for the needed development software.
41+
42+
Once the installation is completed follow these steps:
43+
44+
- Install VS Code (version 1.63.2 or higher)
45+
46+
- (Optional) In case you plan to debug Textual WebAssembly source files make sure to install this [VS Code WebAssembly Syntax Highlight plugin](https://github.com/AlanCezarAraujo/vscode-webassembly-syntax-highlight).
47+
48+
- Change the VS Code settings to enable allow `Allow Breakpoints Everywhere`.
49+
For this, navigate to the VS Code settings and search for `Allow Breakpoints Everywhere` in the search bar.
50+
- Download the [WARDuino VS Code plugin](https://github.com/TOPLLab/WARDuino-VSCode) repo and execute the installation bash script named `install.sh`.
51+
This script downloads and builds the essential libraries such as the WARDuino VM.

0 commit comments

Comments
 (0)