Skip to content

Commit 7d2c9d1

Browse files
authored
Merge pull request #21568 from krzysztof-cabaj/doc_starlight_fix_examples_dir
doc/guides: fix examples directories
2 parents 3f49868 + 39f1933 commit 7d2c9d1

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

doc/guides/build-system/build-in-docker.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ When building in docker one might want for the command ran in docker to inherit
3535
variables that might have been set in the command line. e.g.:
3636

3737
```shell
38-
BOARD=samr21-xpro USEMODULE=xtimer make -C examples/hello-world
38+
BOARD=samr21-xpro USEMODULE=xtimer make -C examples/basic/hello-world
3939
```
4040

4141
In `docker.ink.mk` the origin of a variable listed in `DOCKER_ENV_VARS` is checked
@@ -46,11 +46,11 @@ You can also set in `DOCKER_ENV_VARS` in the environment to add variables to the
4646
list, e.g.:
4747

4848
```shell
49-
DOCKER_ENV_VARS=BEER_TYPE BEER_TYPE="imperial stout" BUILD_IN_DOCKER=1 make -C examples/hello-world/
49+
DOCKER_ENV_VARS=BEER_TYPE BEER_TYPE="imperial stout" BUILD_IN_DOCKER=1 make -C examples/basic/hello-world/
5050
docker run --rm -t -u "$(id -u)" \
5151
...
5252
-e 'BEER_TYPE=imperial stout' \
53-
-w '/data/riotbuild/riotbase/examples/hello-world/' \
53+
-w '/data/riotbuild/riotbase/examples/basic/hello-world/' \
5454
'riot/riotbuild:latest' make
5555
```
5656

@@ -64,11 +64,11 @@ but will need to be prefixed with `-e` (see [option-summary]).
6464
e.g.:
6565

6666
```
67-
DOCKER_ENVIRONMENT_CMDLINE='-e BEER_TYPE="imperial stout"' BUILD_IN_DOCKER=1 make -C examples/hello-world/
67+
DOCKER_ENVIRONMENT_CMDLINE='-e BEER_TYPE="imperial stout"' BUILD_IN_DOCKER=1 make -C examples/basic/hello-world/
6868
docker run --rm -t -u "$(id -u)" \
6969
...
7070
-e 'BEER_TYPE=imperial stout' \
71-
-w '/data/riotbuild/riotbase/examples/hello-world/' \
71+
-w '/data/riotbuild/riotbase/examples/basic/hello-world/' \
7272
'riot/riotbuild:latest' make
7373
```
7474

doc/guides/getting-started/building_example.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ with the name of your board.
1616

1717
RIOT provides a number of examples in the `examples/` directory. Every example
1818
has a README that documents its usage and its purpose. You can build them by
19-
opening a shell, navigating to an example (e.g. `examples/default`), and
19+
opening a shell, navigating to an example (e.g. `examples/basic/default`), and
2020
running:
2121

2222
```bash
@@ -67,7 +67,7 @@ the `dist/tools/pyterm/` directory. If you choose to use another terminal
6767
program you can set `TERMPROG` (and if need be the `TERMFLAGS`) macros:
6868

6969
```bash
70-
make -C examples/gnrc_networking/ term \
70+
make -C examples/networking/gnrc/gnrc_networking/ term \
7171
BOARD=samr21-xpro \
7272
TERMPROG=gtkterm \
7373
TERMFLAGS="-s 115200 -p /dev/ttyACM0 -e"
@@ -97,5 +97,5 @@ To create a bridge and two (or `count` at your option) tap interfaces:
9797
sudo ./dist/tools/tapsetup/tapsetup [-c [<count>]]
9898
```
9999
100-
A detailed example can be found in `examples/gnrc_networking`.
100+
A detailed example can be found in `examples/networking/gnrc/gnrc_networking`.
101101
:::

doc/guides/getting-started/flashing.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ board. The guide should mostly apply to all other boards as well.
2626
![VS Code in WSL](img/08-Flash_Real_Hardware-03.png)
2727

2828
1. Open the `examples` folder
29-
2. Open the `default` folder within `examples`
30-
3. Open the `main.c` file in the `default` folder
31-
4. Select the "Terminal" tab at the bottom
32-
5. Enter `cd ~/RIOT/examples/default` to enter the `default` folder also in the terminal
33-
6. Run `make BOARD=esp32-mh-et-live-minikit compile-commands`
29+
2. Open the `basic` folder within `examples`
30+
3. Open the `default` folder within `basic`
31+
4. Open the `main.c` file in the `default` folder
32+
5. Select the "Terminal" tab at the bottom
33+
6. Enter `cd ~/RIOT/examples/basic/default` to enter the `default` folder also in the terminal
34+
7. Run `make BOARD=esp32-mh-et-live-minikit compile-commands`
3435
- You can replace `esp32-mh-et-live-minikit` with the name of any other supported board
3536

3637
:::note

doc/guides/getting-started/installing.mdx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ You will still need a "clone" of the RIOT Repository to work with.
8181
- Open the terminal.
8282
- Type `git clone https://github.com/RIOT-OS/RIOT` and confirm with the return-key
8383
- This may take some time. Eventually, it will print `done.` when it completed
84-
- Type `cd RIOT/examples/hello-world` and confirm with the return-key to enter
84+
- Type `cd RIOT/examples/basic/hello-world` and confirm with the return-key to enter
8585
the folder `hello-world` example app in the RIOT repo
8686
- Type `make` and confirm with the return key to build the app for the board
8787
`native`
@@ -112,12 +112,12 @@ The app should behave the same when run on real hardware.
112112
![Ubuntu terminal running `make compile-commands` in the `hello-world` app](img/06-Use_VS_Code-00.png)
113113

114114
- If not already open, open the terminal
115-
- Confirm that the terminal is pointed to the folder `~/RIOT/examples/hello-world`
115+
- Confirm that the terminal is pointed to the folder `~/RIOT/examples/basic/hello-world`
116116
- The blue part left of the prompt (the `$` sign in the terminal) shows
117117
the current working directory for the terminal
118-
- If the blue string is not `~/RIOT/examples/hello-world`, type
119-
`cd ~/RIOT/examples/hello-world` to enter that path
120-
- Inside `~/RIOT/examples/hello-world` run the command `make compile-commands`
118+
- If the blue string is not `~/RIOT/examples/basic/hello-world`, type
119+
`cd ~/RIOT/examples/basic/hello-world` to enter that path
120+
- Inside `~/RIOT/examples/basic/hello-world` run the command `make compile-commands`
121121
- The output should look like above
122122

123123
![Launching VS Code from Ubuntu](img/06-Use_VS_Code-01.png)
@@ -132,7 +132,8 @@ The app should behave the same when run on real hardware.
132132
1. Click on "Yes, I trust the authors"
133133

134134
- Now, use the tree view in the left and open the `examples` folder
135-
- Open the `hello-world` folder inside the `examples` folder
135+
- Open the `basic` folder inside the `examples` folder
136+
- Open the `hello-world` folder inside the `basic` folder
136137
- Open the `main.c` file in the `hello-world` folder within `examples`
137138
- The file should open and look like this:
138139

@@ -182,7 +183,7 @@ Re-run `make compile-commands` when:
182183
in the source code
183184
- Save the modified source code (e.g. `Ctrl`+`S`)
184185
- Open the integrated terminal by clicking on the terminal tab at the bottom
185-
- Navigate to `~/RIOT/examples/hello-world` using `cd ~/RIOT/examples/hello-world`
186+
- Navigate to `~/RIOT/examples/basic/hello-world` using `cd ~/RIOT/examples/basic/hello-world`
186187
- Run the `make` command to build the code
187188
- Run make `make term` to launch the application
188189
- The result should look like:

0 commit comments

Comments
 (0)