Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: restructure examples folder #21135

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion dist/pythonlibs/riotctrl_ctrl/tests/test_native.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_reset():
application_directory=os.path.normpath(os.path.join(
os.path.abspath(__file__),
'..', '..', '..', '..', '..',
'examples', 'hello-world'
'examples', 'essentials', 'hello-world'
)),
env=env,
)
Expand Down
6 changes: 5 additions & 1 deletion dist/tools/examples_check/check_has_readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
EXAMPLES_DIR="$(dirname "$0")/../../../examples"

# Get a list of all directories in the examples directory
directories=$(find "$EXAMPLES_DIR" -maxdepth 1 -mindepth 1 -type d -exec basename {} \;)
directories=$(find "$EXAMPLES_DIR" -maxdepth 2 -mindepth 1 -type d -exec basename {} \;)

# Check each directory
missing_entries=()
for dir in $directories; do
if [ ! -f "$EXAMPLES_DIR/$dir/main.c" ]; then
continue
fi

if [ ! -f "$EXAMPLES_DIR/$dir/README.md" ]; then
missing_entries+=("$dir")
fi
Expand Down
2 changes: 1 addition & 1 deletion dist/tools/examples_check/check_in_readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ EXAMPLES_DIR="$(dirname "$0")/../../../examples"
README_FILE="$EXAMPLES_DIR/README.md"

# Get a list of all directories in the examples directory
directories=$(find "$EXAMPLES_DIR" -maxdepth 1 -mindepth 1 -type d -exec basename {} \;)
directories=$(find "$EXAMPLES_DIR" -maxdepth 2 -mindepth 1 -type d -exec basename {} \;)

# Check each directory
missing_entries=()
Expand Down
132 changes: 66 additions & 66 deletions examples/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = bindist
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BOARD ?= nrf52840dk
FEATURES_REQUIRED += cpu_nrf52

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Uncomment these lines if you want to use platform support from external
# repositories:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
APPLICATION = pio_blink
BOARD ?= rpi-pico
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..
# The board rpi-pico-w has no LED pin so you have to select the pin by hand with:
# PIO_BLINK_PIN=GPIO_PIN\(x,y\) make ...
PIO_BLINK_PIN ?= GPIO_UNDEF
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = posix_sockets_example
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Include packages that pull up and auto-init the link layer.
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

APPLICATION = example_psa_crypto

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = senml_saul_example
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# we want to use SAUL and SenML
USEMODULE += saul_default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = suit_update
BOARD ?= samr21-xpro

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

#
# Networking
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = thread_duel
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# This defaults to build with round_robin using ztimer
RR ?= 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ APPLICATION = twr-aloha
BOARD ?= dwm1001

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = usbus_minimal
BOARD ?= samr21-xpro

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = blinky
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = default
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Uncomment these lines if you want to use platform support from external
# repositories:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BOARD ?= native
FEATURES_BLACKLIST += arch_msp430

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = hello-world
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = ipc_pingpong
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = leds_shell
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../../
RIOTBASE ?= $(CURDIR)/../../../

# Uncomment this to enable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = saul_example
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# we want to use SAUL:
USEMODULE += saul_default
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = subfolders
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

# Add subfolders as modules
DIRS += module
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
APPLICATION = timer_periodic_wakeup
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../..

BOARD ?= native

Expand Down
1 change: 0 additions & 1 deletion examples/gcoap_dtls/Makefile.slip

This file was deleted.

1 change: 0 additions & 1 deletion examples/gcoap_dtls/client.c

This file was deleted.

1 change: 0 additions & 1 deletion examples/gcoap_dtls/gcoap_example.h

This file was deleted.

1 change: 0 additions & 1 deletion examples/gcoap_dtls/main.c

This file was deleted.

1 change: 0 additions & 1 deletion examples/gcoap_dtls/server.c

This file was deleted.

1 change: 0 additions & 1 deletion examples/gnrc_networking_subnets/main.c

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ APPLICATION = arduino_hello-world
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

USEMODULE += arduino
USEMODULE += stdin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = riot_javascript
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ APPLICATION = lua_repl
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ APPLICATION = lua_basic
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = micropython
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# select MicroPython package
USEPKG += micropython
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ APPLICATION = wasm-example
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

USEPKG += wamr

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = riot_and_cpp
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Uncomment these lines if you want to use platform support from external
# repositories:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = rust-async
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Some timers for the example
USEMODULE += ztimer_msec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = rust_gcoap
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Basic networking, and gcoap
USEMODULE += gcoap
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = hello-world
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = skald_eddystone
BOARD ?= nrf52dk

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# include Skald
USEMODULE += skald_eddystone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = skald_ibeacon
BOARD ?= nrf52dk

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# include Skald
USEMODULE += skald_ibeacon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = nimble_gatt
BOARD ?= nrf52dk

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Include NimBLE
USEPKG += nimble
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = nimble_heart_rate_sensor
BOARD ?= nrf52dk

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Some RIOT modules needed for this example
USEMODULE += event_timeout_ztimer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APPLICATION = nimble_scanner
BOARD ?= nrf52dk

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# We use the xtimer and the shell in this example
USEMODULE += shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ APPLICATION = gcoap_example
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Include packages that pull up and auto-init the link layer.
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ APPLICATION = gcoap
BOARD ?= samr21-xpro

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Redefine port, for example use 61616 for RFC 6282 UDP compression.
#GCOAP_PORT = 5683
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ APPLICATION = gcoap_example
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

## Uncomment to redefine port, for example use 61616 for RFC 6282 UDP compression.
#GCOAP_PORT = 5683
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ APPLICATION = gcoap_example
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
RIOTBASE ?= $(CURDIR)/../../../..

# Include packages that pull up and auto-init the link layer.
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
Expand Down
Loading
Loading