diff --git a/dist/pythonlibs/riotctrl_ctrl/tests/test_native.py b/dist/pythonlibs/riotctrl_ctrl/tests/test_native.py index 190834b67857..dd8a43f2f2f5 100644 --- a/dist/pythonlibs/riotctrl_ctrl/tests/test_native.py +++ b/dist/pythonlibs/riotctrl_ctrl/tests/test_native.py @@ -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, ) diff --git a/dist/tools/examples_check/check_has_readme.sh b/dist/tools/examples_check/check_has_readme.sh index dfd396b4cc5e..3f782ed98697 100755 --- a/dist/tools/examples_check/check_has_readme.sh +++ b/dist/tools/examples_check/check_has_readme.sh @@ -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 diff --git a/dist/tools/examples_check/check_in_readme.sh b/dist/tools/examples_check/check_in_readme.sh index f238b02accb8..9397cc03e539 100755 --- a/dist/tools/examples_check/check_in_readme.sh +++ b/dist/tools/examples_check/check_in_readme.sh @@ -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=() diff --git a/examples/README.md b/examples/README.md index 030edface304..fb4178b6a696 100644 --- a/examples/README.md +++ b/examples/README.md @@ -10,17 +10,17 @@ Here is a quick overview of the examples available in the RIOT: | Example | Description | |---------|-------------| -| [default](./default/README.md) | This application is a showcase for RIOT's hardware support. Using it for your board, you should be able to interactively use any hardware that is supported. | -| [hello-world](./hello-world/README.md) | A simple "Hello World" that shows the basic structure of a RIOT application. | -| [blinky](./blinky/README.md) | The classic "Hello World" example for embedded systems: blinking an LED (or printing "Blink!" via stdio when none are available). | -| [leds_shell](./leds_shell/README.md) | The application `leds_shell` is a basic example, which allows easy, interactive control of internal board LEDs, and basic GPIO for externally connected simple devices (for e.g. additional LEDs, relay, motors - via dedicated drivers, etc.) via the shell. | -| [saul](./saul/README.md) | This example demonstrates the usage of the SAUL (Sensor Actuator Uber Layer) module. | -| [timer_periodic_wakeup](./timer_periodic_wakeup/README.md) | How to set up a periodic wakeup timer using the RIOT operating system. | -| [ipc_pingpong](./ipc_pingpong/README.md) | This example is to illustrate the usage of RIOTs IPC messaging system. | -| [filesystem](./filesystem/README.md) | This example showcases ways to interact/manage the filesystem in RIOT. | -| [subfolders](./subfolders/README.md) | This example demonstrates how to use subfolders in RIOT applications. | - -### RIOT Language Bindings +| [default](./essentials/default/README.md) | This application is a showcase for RIOT's hardware support. Using it for your board, you should be able to interactively use any hardware that is supported. | +| [hello-world](./essentials/hello-world/README.md) | A simple "Hello World" that shows the basic structure of a RIOT application. | +| [blinky](./essentials/blinky/README.md) | The classic "Hello World" example for embedded systems: blinking an LED (or printing "Blink!" via stdio when none are available). | +| [leds_shell](./essentials/leds_shell/README.md) | The application `leds_shell` is a basic example, which allows easy, interactive control of internal board LEDs, and basic GPIO for externally connected simple devices (for e.g. additional LEDs, relay, motors - via dedicated drivers, etc.) via the shell. | +| [saul](./essentials/saul/README.md) | This example demonstrates the usage of the SAUL (Sensor Actuator Uber Layer) module. | +| [timer_periodic_wakeup](./essentials/timer_periodic_wakeup/README.md) | How to set up a periodic wakeup timer using the RIOT operating system. | +| [ipc_pingpong](./essentials/ipc_pingpong/README.md) | This example is to illustrate the usage of RIOTs IPC messaging system. | +| [filesystem](./essentials/filesystem/README.md) | This example showcases ways to interact/manage the filesystem in RIOT. | +| [subfolders](./essentials/subfolders/README.md) | This example demonstrates how to use subfolders in RIOT applications. | + +## RIOT Language Bindings #### Officially Supported/Targeted @@ -28,26 +28,26 @@ Here is a quick overview of the examples available in the RIOT: | Example | Description | |---------|-------------| -| [rust-hello-world](./rust-hello-world/README.md) | This example demonstrates how to write a simple RIOT application in Rust. | -| [rust-gcoap](./rust-gcoap/README.md) | This example demonstrates how to write a coap server application in Rust using the RIOTs gcoap module. | -| [rust-async](./rust-async/README.md) | This example demonstrates how to use Rusts async/await syntax in a RIOT application. | +| [rust-hello-world](./language_bindings/officially_supported/rust-hello-world/README.md) | This example demonstrates how to write a simple RIOT application in Rust. | +| [rust-gcoap](./language_bindings/officially_supported/rust-gcoap/README.md) | This example demonstrates how to write a coap server application in Rust using the RIOTs gcoap module. | +| [rust-async](./language_bindings/officially_supported/rust-async/README.md) | This example demonstrates how to use Rusts async/await syntax in a RIOT application. | ##### _C++_ | Example | Description | |---------|-------------| -| [riot_and_cpp](./riot_and_cpp/README.md) | Example of using C++ in RIOT applications. | +| [riot_and_cpp](./language_bindings/officially_supported/riot_and_cpp/README.md) | Example of using C++ in RIOT applications. | #### Community Supported | Example | Description | |---------|-------------| -| [javascript](./javascript/README.md) | How to write IoT applications using javascript using JerryScript. | -| [lua_basic](./lua_basic/README.md) | How to write IoT applications using Lua. | -| [lua_REPL](./lua_REPL/README.md) | This example demonstrates how to use the Lua Read-Eval-Print Loop (REPL) in RIOT. | -| [micropython](./micropython/README.md) | How to use the MicroPython port for RIOT. | -| [wasm](./wasm/README.md) | How to use WebAssembly in RIOT. | -| [arduino_hello-world](./arduino_hello-world/README.md) | This application demonstrates the usage of Arduino sketches in RIOT. | +| [javascript](./language_bindings/community_supported/javascript/README.md) | How to write IoT applications using javascript using JerryScript. | +| [lua_basic](./language_bindings/community_supported/lua_basic/README.md) | How to write IoT applications using Lua. | +| [lua_REPL](./language_bindings/community_supported/lua_REPL/README.md) | This example demonstrates how to use the Lua Read-Eval-Print Loop (REPL) in RIOT. | +| [micropython](./language_bindings/community_supported/micropython/README.md) | How to use the MicroPython port for RIOT. | +| [wasm](./language_bindings/community_supported/wasm/README.md) | How to use WebAssembly in RIOT. | +| [arduino_hello-world](./language_bindings/community_supported/arduino_hello-world/README.md) | This application demonstrates the usage of Arduino sketches in RIOT. | ## Networking @@ -55,11 +55,11 @@ Here is a quick overview of the examples available in the RIOT: | Example | Description | |---------|-------------| -| [gcoap](./gcoap/README.md) | This example demonstrates the usage of the `gcoap` module, a high-level API for CoAP (Constrained Application Protocol) messaging. | -| [gcoap_block_server](./gcoap_block_server/README.md) | CoAP server handling for Block requests, build with gcoap using nanocoap block handling functions. | -| [gcoap_fileserver](./gcoap_fileserver/README.md) | This example demonstrates the usage of the `gcoap` module to serve files over CoAP. | -| [gcoap_dtls](./gcoap_dtls/README.md) | This example demonstrates the usage of the `gcoap` module with DTLS. | -| [nanocoap_server](./nanocoap_server/README.md) | This example demonstrates the usage of the `nanocoap` module, a high-level API for CoAP (Constrained Application Protocol) messaging. | +| [gcoap](./networking/coap/gcoap/README.md) | This example demonstrates the usage of the `gcoap` module, a high-level API for CoAP (Constrained Application Protocol) messaging. | +| [gcoap_block_server](./networking/coap/gcoap_block_server/README.md) | CoAP server handling for Block requests, build with gcoap using nanocoap block handling functions. | +| [gcoap_fileserver](./networking/coap/gcoap_fileserver/README.md) | This example demonstrates the usage of the `gcoap` module to serve files over CoAP. | +| [gcoap_dtls](./networking/coap/gcoap_dtls/README.md) | This example demonstrates the usage of the `gcoap` module with DTLS. | +| [nanocoap_server](./networking/coap/nanocoap_server/README.md) | This example demonstrates the usage of the `nanocoap` module, a high-level API for CoAP (Constrained Application Protocol) messaging. | ### Bluetooth Low Energy (BLE) @@ -67,78 +67,78 @@ Here is a quick overview of the examples available in the RIOT: | Example | Description | |---------|-------------| -| [nimble_scanner](./nimble_scanner/README.md) | This example showcases the usage of the `NimBLE` BLE stack as a scanner. | -| [nimble_gatt](./nimble_gatt/README.md) | This example application configures and runs the NimBLE BLE stack as simple GATT server. | -| [nimble_heart_rate_sensor](./nimble_heart_rate_sensor/README.md) | This example demonstrates how to implement asynchronous data transfer using GATT notifications by implementing a mock-up BLE heart rate sensor. | +| [nimble_scanner](./networking/bluetooth_low_energy/nimble/nimble_scanner/README.md) | This example showcases the usage of the `NimBLE` BLE stack as a scanner. | +| [nimble_gatt](./networking/bluetooth_low_energy/nimble/nimble_gatt/README.md) | This example application configures and runs the NimBLE BLE stack as simple GATT server. | +| [nimble_heart_rate_sensor](./networking/bluetooth_low_energy/nimble/nimble_heart_rate_sensor/README.md) | This example demonstrates how to implement asynchronous data transfer using GATT notifications by implementing a mock-up BLE heart rate sensor. | #### Misc BLE Examples | Example | Description | |---------|-------------| -| [skald_eddystone](./skald_eddystone/README.md) | This example demonstrates the usage of `Skald` for creating an Google `Eddystone` beacon. | -| [skald_ibeacon](./skald_ibeacon/README.md) | This example demonstrates the usage of `Skald` for creating an Apple `iBeacon`. | +| [skald_eddystone](./networking/bluetooth_low_energy/misc_ble_examples/skald_eddystone/README.md) | This example demonstrates the usage of `Skald` for creating an Google `Eddystone` beacon. | +| [skald_ibeacon](./networking/bluetooth_low_energy/misc_ble_examples/skald_ibeacon/README.md) | This example demonstrates the usage of `Skald` for creating an Apple `iBeacon`. | ### MQTT | Example | Description | |---------|-------------| -| [asymcute_mqttsn](./asymcute_mqttsn/README.md) | This application demonstrates the usage of the Asymcute (MQTT-SN) module in RIOT. | -| [emcute_mqttsn](./emcute_mqttsn/README.md) | This application demonstrates the usage of the emCute (MQTT-SN) module in RIOT. | -| [paho-mqtt](./paho-mqtt/README.md) | This example demonstrates the usage of the Paho MQTT client library in RIOT. | +| [asymcute_mqttsn](./networking/mqtt/asymcute_mqttsn/README.md) | This application demonstrates the usage of the Asymcute (MQTT-SN) module in RIOT. | +| [emcute_mqttsn](./networking/mqtt/emcute_mqttsn/README.md) | This application demonstrates the usage of the emCute (MQTT-SN) module in RIOT. | +| [paho-mqtt](./networking/mqtt/paho-mqtt/README.md) | This example demonstrates the usage of the Paho MQTT client library in RIOT. | ### CoRE Resource Directory | Example | Description | |---------|-------------| -| [cord_ep](./cord_ep/README.md) | Example of RIOT's Resource Directory (RD) endpoint module, called `cord_ep` | -| [cord_lc](./cord_lc/README.md) | Example of RIOT's Resource Directory (RD) lookup module, called `cord_lc` | -| [cord_epsim](./cord_epsim/README.md) | This example shows how a node can register with a CoRE resource directory | +| [cord_ep](./networking/core_resource_directory/cord_ep/README.md) | Example of RIOT's Resource Directory (RD) endpoint module, called `cord_ep` | +| [cord_lc](./networking/core_resource_directory/cord_lc/README.md) | Example of RIOT's Resource Directory (RD) lookup module, called `cord_lc` | +| [cord_epsim](./networking/core_resource_directory/cord_epsim/README.md) | This example shows how a node can register with a CoRE resource directory | ### GNRC Networking | Example | Description | |---------|-------------| -| [gnrc_minimal](./gnrc_minimal/README.md) | This is a minimalistic example for RIOT's gnrc network stack. | -| [gnrc_networking](./gnrc_networking/README.md) | This example demonstrates the usage of the GNRC network stack in RIOT. | -| [gnrc_networking_subnets](./gnrc_networking_subnets/README.md) | This example demonstrates IPv6 subnet auto-configuration for networks on a tree topology. | -| [gnrc_border_router](./gnrc_border_router/README.md) | Example of `gnrc_border_router` using automatic configuration | -| [gnrc_lorawan](./gnrc_lorawan/README.md) | Send and receive LoRaWAN packets and perform basic LoRaWAN commands | -| [gnrc_networking_mac](./gnrc_networking_mac/README.md) | This example shows you how to try out communications between RIOT instances with duty-cycled MAC layer protocols | +| [gnrc_minimal](./networking/gnrc_networking/gnrc_minimal/README.md) | This is a minimalistic example for RIOT's gnrc network stack. | +| [gnrc_networking](./networking/gnrc_networking/gnrc_networking/README.md) | This example demonstrates the usage of the GNRC network stack in RIOT. | +| [gnrc_networking_subnets](./networking/gnrc_networking/gnrc_networking_subnets/README.md) | This example demonstrates IPv6 subnet auto-configuration for networks on a tree topology. | +| [gnrc_border_router](./networking/gnrc_networking/gnrc_border_router/README.md) | Example of `gnrc_border_router` using automatic configuration | +| [gnrc_lorawan](./networking/gnrc_networking/gnrc_lorawan/README.md) | Send and receive LoRaWAN packets and perform basic LoRaWAN commands | +| [gnrc_networking_mac](./networking/gnrc_networking/gnrc_networking_mac/README.md) | This example shows you how to try out communications between RIOT instances with duty-cycled MAC layer protocols | ### DTLS | Example | Description | |---------|-------------| -| [dtls-sock](./dtls-sock/README.md) | This example shows how to use DTLS sock `sock_dtls_t` | -| [dtls-echo](./dtls-echo/README.md) | This example shows how to use TinyDTLS with sock_udp. | -| [dtls-wolfssl](./dtls-wolfssl/README.md) | This example demonstrates the usage of the DTLS module with the wolfSSL library. | +| [dtls-sock](./networking/dtls/dtls-sock/README.md) | This example shows how to use DTLS sock `sock_dtls_t` | +| [dtls-echo](./networking/dtls/dtls-echo/README.md) | This example shows how to use TinyDTLS with sock_udp. | +| [dtls-wolfssl](./networking/dtls/dtls-wolfssl/README.md) | This example demonstrates the usage of the DTLS module with the wolfSSL library. | ### Misc | Example | Description | |---------|-------------| -| [lorawan](./lorawan/README.md) | This application shows a basic LoRaWAN use-case with RIOT. | -| [openthread](./openthread/README.md) | This example demonstrates the usage of the OpenThread stack in RIOT. | -| [lwm2m](./lwm2m/README.md) | Example of a LWM2M client on RIOT | -| [ccn-lite-relay](./ccn-lite-relay/README.md) | This application demonstrates how to use the Content-Centric Networking stack from [CCN-Lite](http://www.ccn-lite.net/) on RIOT | -| [telnet_server](./telnet_server/README.md) | Simple telnet server that listens on port 23 over IPv6. | -| [posix_sockets](./posix_sockets/README.md) | Showcase for RIOT's POSIX socket support | -| [spectrum-scanner](./spectrum-scanner/README.md) | This example demonstrates how to monitor energy levels on all available wireless channels | -| [sniffer](./sniffer/README.md) | This application is built to run together with the script `./tools/sniffer.py` as a sniffer for (wireless) data traffic. | -| [benckmark_udp](./benchmark_udp/README.md) | This example uses the `benchmark_udp` module to create a stress-test for the RIOT network stack. | -| [sock_tcp_echo](./sock_tcp_echo/README.md) | This is a simple TCP echo server / client that uses the SOCK API. | +| [lorawan](./networking/misc/lorawan/README.md) | This application shows a basic LoRaWAN use-case with RIOT. | +| [openthread](./networking/misc/openthread/README.md) | This example demonstrates the usage of the OpenThread stack in RIOT. | +| [lwm2m](./networking/misc/lwm2m/README.md) | Example of a LWM2M client on RIOT | +| [ccn-lite-relay](./networking/misc/ccn-lite-relay/README.md) | This application demonstrates how to use the Content-Centric Networking stack from [CCN-Lite](http://www.ccn-lite.net/) on RIOT | +| [telnet_server](./networking/misc/telnet_server/README.md) | Simple telnet server that listens on port 23 over IPv6. | +| [posix_sockets](./networking/misc/posix_sockets/README.md) | Showcase for RIOT's POSIX socket support | +| [spectrum-scanner](./networking/misc/spectrum-scanner/README.md) | This example demonstrates how to monitor energy levels on all available wireless channels | +| [sniffer](./networking/misc/sniffer/README.md) | This application is built to run together with the script `./tools/sniffer.py` as a sniffer for (wireless) data traffic. | +| [benckmark_udp](./networking/misc/benchmark_udp/README.md) | This example uses the `benchmark_udp` module to create a stress-test for the RIOT network stack. | +| [sock_tcp_echo](./networking/misc/sock_tcp_echo/README.md) | This is a simple TCP echo server / client that uses the SOCK API. | ## Advanced Examples | Example | Description | |---------|-------------| -| [bindist](./bindist/README.md) | RIOT allows for creating a "binary distribution", which can be used to ship proprietary, compiled objects in a way that makes it possible to re-link them against a freshly compiled RIOT. This application serves as a simple example. | -| [usbus_minimal](./usbus_minimal/README.md) | This is a minimalistic example for RIOT's USB stack. | -| [suit_update](./suit_update/README.md) | This example shows how to integrate SUIT-compliant firmware updates into a RIOT application. | -| [thread_duel](./thread_duel/README.md) | This is a thread duel application to show RIOTs abilities to run multiple-threads concurrently, even if they are neither cooperative nor dividable into different scheduler priorities, by using the optional round-robin scheduler module. | -| [posix_select](./posix_select/README.md) | This example is a showcase for RIOT's POSIX select support | -| [psa_crypto](./psa_crypto) | Basic functions of the PSA Crypto API | -| [pio_blink](./pio_blink/README.md) | How to use the PIO peripheral on the RaspberryPi Pico to blink an LED. | -| [twr_aloha](./twr_aloha/README.md) | This example allows testing different two-way ranging algorithms between two boards supporting a dw1000 device. This makes use of the uwb-core pkg. | -| [senml_saul](./senml_saul/README.md) | This example demonstrates the usage of the SAUL (Sensor Actuator Uber Layer) module with the SenML (Sensor Measurement Lists) format. | -| [opendsme](./opendsme/README.md) | This example demonstrates the usage of the OpenDSME module in RIOT. | +| [bindist](./advanced_examples/bindist/README.md) | RIOT allows for creating a "binary distribution", which can be used to ship proprietary, compiled objects in a way that makes it possible to re-link them against a freshly compiled RIOT. This application serves as a simple example. | +| [usbus_minimal](./advanced_examples/usbus_minimal/README.md) | This is a minimalistic example for RIOT's USB stack. | +| [suit_update](./advanced_examples/suit_update/README.md) | This example shows how to integrate SUIT-compliant firmware updates into a RIOT application. | +| [thread_duel](./advanced_examples/thread_duel/README.md) | This is a thread duel application to show RIOTs abilities to run multiple-threads concurrently, even if they are neither cooperative nor dividable into different scheduler priorities, by using the optional round-robin scheduler module. | +| [posix_select](./advanced_examples/posix_select/README.md) | This example is a showcase for RIOT's POSIX select support | +| [psa_crypto](./advanced_examples/psa_crypto/README.md) | Basic functions of the PSA Crypto API | +| [pio_blink](./advanced_examples/pio_blink/README.md) | How to use the PIO peripheral on the RaspberryPi Pico to blink an LED. | +| [twr_aloha](./advanced_examples/twr_aloha/README.md) | This example allows testing different two-way ranging algorithms between two boards supporting a dw1000 device. This makes use of the uwb-core pkg. | +| [senml_saul](./advanced_examples/senml_saul/README.md) | This example demonstrates the usage of the SAUL (Sensor Actuator Uber Layer) module with the SenML (Sensor Measurement Lists) format. | +| [opendsme](./advanced_examples/opendsme/README.md) | This example demonstrates the usage of the OpenDSME module in RIOT. | diff --git a/examples/bindist/Makefile b/examples/advanced_examples/bindist/Makefile similarity index 96% rename from examples/bindist/Makefile rename to examples/advanced_examples/bindist/Makefile index bcde8afa0da2..a50f9c24747c 100644 --- a/examples/bindist/Makefile +++ b/examples/advanced_examples/bindist/Makefile @@ -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 diff --git a/examples/bindist/README.md b/examples/advanced_examples/bindist/README.md similarity index 100% rename from examples/bindist/README.md rename to examples/advanced_examples/bindist/README.md diff --git a/examples/bindist/abc/Makefile b/examples/advanced_examples/bindist/abc/Makefile similarity index 100% rename from examples/bindist/abc/Makefile rename to examples/advanced_examples/bindist/abc/Makefile diff --git a/examples/bindist/abc/abc.c b/examples/advanced_examples/bindist/abc/abc.c similarity index 100% rename from examples/bindist/abc/abc.c rename to examples/advanced_examples/bindist/abc/abc.c diff --git a/examples/bindist/main.c b/examples/advanced_examples/bindist/main.c similarity index 100% rename from examples/bindist/main.c rename to examples/advanced_examples/bindist/main.c diff --git a/examples/opendsme/Makefile b/examples/advanced_examples/opendsme/Makefile similarity index 98% rename from examples/opendsme/Makefile rename to examples/advanced_examples/opendsme/Makefile index 467e76c6d3d8..e8d3367a81ce 100644 --- a/examples/opendsme/Makefile +++ b/examples/advanced_examples/opendsme/Makefile @@ -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: diff --git a/examples/opendsme/Makefile.ci b/examples/advanced_examples/opendsme/Makefile.ci similarity index 100% rename from examples/opendsme/Makefile.ci rename to examples/advanced_examples/opendsme/Makefile.ci diff --git a/examples/opendsme/README.md b/examples/advanced_examples/opendsme/README.md similarity index 100% rename from examples/opendsme/README.md rename to examples/advanced_examples/opendsme/README.md diff --git a/examples/opendsme/main.c b/examples/advanced_examples/opendsme/main.c similarity index 100% rename from examples/opendsme/main.c rename to examples/advanced_examples/opendsme/main.c diff --git a/examples/pio_blink/Makefile b/examples/advanced_examples/pio_blink/Makefile similarity index 92% rename from examples/pio_blink/Makefile rename to examples/advanced_examples/pio_blink/Makefile index 7e41658c1d63..22d522436418 100644 --- a/examples/pio_blink/Makefile +++ b/examples/advanced_examples/pio_blink/Makefile @@ -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 diff --git a/examples/pio_blink/README.md b/examples/advanced_examples/pio_blink/README.md similarity index 100% rename from examples/pio_blink/README.md rename to examples/advanced_examples/pio_blink/README.md diff --git a/examples/pio_blink/main.c b/examples/advanced_examples/pio_blink/main.c similarity index 100% rename from examples/pio_blink/main.c rename to examples/advanced_examples/pio_blink/main.c diff --git a/examples/pio_blink/rpx0xx_pio_blink/Makefile b/examples/advanced_examples/pio_blink/rpx0xx_pio_blink/Makefile similarity index 100% rename from examples/pio_blink/rpx0xx_pio_blink/Makefile rename to examples/advanced_examples/pio_blink/rpx0xx_pio_blink/Makefile diff --git a/examples/pio_blink/rpx0xx_pio_blink/blink.c b/examples/advanced_examples/pio_blink/rpx0xx_pio_blink/blink.c similarity index 100% rename from examples/pio_blink/rpx0xx_pio_blink/blink.c rename to examples/advanced_examples/pio_blink/rpx0xx_pio_blink/blink.c diff --git a/examples/pio_blink/rpx0xx_pio_blink/blink.pio b/examples/advanced_examples/pio_blink/rpx0xx_pio_blink/blink.pio similarity index 100% rename from examples/pio_blink/rpx0xx_pio_blink/blink.pio rename to examples/advanced_examples/pio_blink/rpx0xx_pio_blink/blink.pio diff --git a/examples/posix_select/Makefile b/examples/advanced_examples/posix_select/Makefile similarity index 96% rename from examples/posix_select/Makefile rename to examples/advanced_examples/posix_select/Makefile index 3be13efb152e..e7e78dff46e6 100644 --- a/examples/posix_select/Makefile +++ b/examples/advanced_examples/posix_select/Makefile @@ -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 diff --git a/examples/posix_select/Makefile.ci b/examples/advanced_examples/posix_select/Makefile.ci similarity index 100% rename from examples/posix_select/Makefile.ci rename to examples/advanced_examples/posix_select/Makefile.ci diff --git a/examples/posix_select/README.md b/examples/advanced_examples/posix_select/README.md similarity index 100% rename from examples/posix_select/README.md rename to examples/advanced_examples/posix_select/README.md diff --git a/examples/posix_select/main.c b/examples/advanced_examples/posix_select/main.c similarity index 100% rename from examples/posix_select/main.c rename to examples/advanced_examples/posix_select/main.c diff --git a/examples/psa_crypto/Makefile b/examples/advanced_examples/psa_crypto/Makefile similarity index 99% rename from examples/psa_crypto/Makefile rename to examples/advanced_examples/psa_crypto/Makefile index 4086cccd55e4..d3528c566a78 100644 --- a/examples/psa_crypto/Makefile +++ b/examples/advanced_examples/psa_crypto/Makefile @@ -1,5 +1,5 @@ # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../.. APPLICATION = example_psa_crypto diff --git a/examples/psa_crypto/Makefile.ci b/examples/advanced_examples/psa_crypto/Makefile.ci similarity index 100% rename from examples/psa_crypto/Makefile.ci rename to examples/advanced_examples/psa_crypto/Makefile.ci diff --git a/examples/psa_crypto/README.md b/examples/advanced_examples/psa_crypto/README.md similarity index 100% rename from examples/psa_crypto/README.md rename to examples/advanced_examples/psa_crypto/README.md diff --git a/examples/psa_crypto/app.config.base b/examples/advanced_examples/psa_crypto/app.config.base similarity index 100% rename from examples/psa_crypto/app.config.base rename to examples/advanced_examples/psa_crypto/app.config.base diff --git a/examples/psa_crypto/app.config.multi_se b/examples/advanced_examples/psa_crypto/app.config.multi_se similarity index 100% rename from examples/psa_crypto/app.config.multi_se rename to examples/advanced_examples/psa_crypto/app.config.multi_se diff --git a/examples/psa_crypto/app.config.se b/examples/advanced_examples/psa_crypto/app.config.se similarity index 100% rename from examples/psa_crypto/app.config.se rename to examples/advanced_examples/psa_crypto/app.config.se diff --git a/examples/psa_crypto/custom_atca_params.h b/examples/advanced_examples/psa_crypto/custom_atca_params.h similarity index 100% rename from examples/psa_crypto/custom_atca_params.h rename to examples/advanced_examples/psa_crypto/custom_atca_params.h diff --git a/examples/psa_crypto/example_cipher_aes_128.c b/examples/advanced_examples/psa_crypto/example_cipher_aes_128.c similarity index 100% rename from examples/psa_crypto/example_cipher_aes_128.c rename to examples/advanced_examples/psa_crypto/example_cipher_aes_128.c diff --git a/examples/psa_crypto/example_ecdsa_p256.c b/examples/advanced_examples/psa_crypto/example_ecdsa_p256.c similarity index 100% rename from examples/psa_crypto/example_ecdsa_p256.c rename to examples/advanced_examples/psa_crypto/example_ecdsa_p256.c diff --git a/examples/psa_crypto/example_eddsa.c b/examples/advanced_examples/psa_crypto/example_eddsa.c similarity index 100% rename from examples/psa_crypto/example_eddsa.c rename to examples/advanced_examples/psa_crypto/example_eddsa.c diff --git a/examples/psa_crypto/example_hash.c b/examples/advanced_examples/psa_crypto/example_hash.c similarity index 100% rename from examples/psa_crypto/example_hash.c rename to examples/advanced_examples/psa_crypto/example_hash.c diff --git a/examples/psa_crypto/example_hmac_sha256.c b/examples/advanced_examples/psa_crypto/example_hmac_sha256.c similarity index 100% rename from examples/psa_crypto/example_hmac_sha256.c rename to examples/advanced_examples/psa_crypto/example_hmac_sha256.c diff --git a/examples/psa_crypto/main.c b/examples/advanced_examples/psa_crypto/main.c similarity index 100% rename from examples/psa_crypto/main.c rename to examples/advanced_examples/psa_crypto/main.c diff --git a/examples/psa_crypto/tests/01-run.py b/examples/advanced_examples/psa_crypto/tests/01-run.py similarity index 100% rename from examples/psa_crypto/tests/01-run.py rename to examples/advanced_examples/psa_crypto/tests/01-run.py diff --git a/examples/senml_saul/Makefile b/examples/advanced_examples/senml_saul/Makefile similarity index 95% rename from examples/senml_saul/Makefile rename to examples/advanced_examples/senml_saul/Makefile index d6fd68d83d04..2f72b61dcdd8 100644 --- a/examples/senml_saul/Makefile +++ b/examples/advanced_examples/senml_saul/Makefile @@ -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 diff --git a/examples/senml_saul/Makefile.ci b/examples/advanced_examples/senml_saul/Makefile.ci similarity index 100% rename from examples/senml_saul/Makefile.ci rename to examples/advanced_examples/senml_saul/Makefile.ci diff --git a/examples/senml_saul/README.md b/examples/advanced_examples/senml_saul/README.md similarity index 100% rename from examples/senml_saul/README.md rename to examples/advanced_examples/senml_saul/README.md diff --git a/examples/senml_saul/main.c b/examples/advanced_examples/senml_saul/main.c similarity index 100% rename from examples/senml_saul/main.c rename to examples/advanced_examples/senml_saul/main.c diff --git a/examples/suit_update/Makefile b/examples/advanced_examples/suit_update/Makefile similarity index 99% rename from examples/suit_update/Makefile rename to examples/advanced_examples/suit_update/Makefile index 9ceef160040d..7c731fa2132e 100644 --- a/examples/suit_update/Makefile +++ b/examples/advanced_examples/suit_update/Makefile @@ -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 diff --git a/examples/suit_update/Makefile.board.dep b/examples/advanced_examples/suit_update/Makefile.board.dep similarity index 100% rename from examples/suit_update/Makefile.board.dep rename to examples/advanced_examples/suit_update/Makefile.board.dep diff --git a/examples/suit_update/Makefile.ci b/examples/advanced_examples/suit_update/Makefile.ci similarity index 100% rename from examples/suit_update/Makefile.ci rename to examples/advanced_examples/suit_update/Makefile.ci diff --git a/examples/suit_update/Makefile.suit.custom b/examples/advanced_examples/suit_update/Makefile.suit.custom similarity index 100% rename from examples/suit_update/Makefile.suit.custom rename to examples/advanced_examples/suit_update/Makefile.suit.custom diff --git a/examples/suit_update/README.hardware.md b/examples/advanced_examples/suit_update/README.hardware.md similarity index 100% rename from examples/suit_update/README.hardware.md rename to examples/advanced_examples/suit_update/README.hardware.md diff --git a/examples/suit_update/README.md b/examples/advanced_examples/suit_update/README.md similarity index 100% rename from examples/suit_update/README.md rename to examples/advanced_examples/suit_update/README.md diff --git a/examples/suit_update/README.native.md b/examples/advanced_examples/suit_update/README.native.md similarity index 100% rename from examples/suit_update/README.native.md rename to examples/advanced_examples/suit_update/README.native.md diff --git a/examples/suit_update/coap_handler.c b/examples/advanced_examples/suit_update/coap_handler.c similarity index 100% rename from examples/suit_update/coap_handler.c rename to examples/advanced_examples/suit_update/coap_handler.c diff --git a/examples/suit_update/main.c b/examples/advanced_examples/suit_update/main.c similarity index 100% rename from examples/suit_update/main.c rename to examples/advanced_examples/suit_update/main.c diff --git a/examples/suit_update/native_steps.svg b/examples/advanced_examples/suit_update/native_steps.svg similarity index 100% rename from examples/suit_update/native_steps.svg rename to examples/advanced_examples/suit_update/native_steps.svg diff --git a/examples/suit_update/tests-with-config/01-run.py b/examples/advanced_examples/suit_update/tests-with-config/01-run.py similarity index 100% rename from examples/suit_update/tests-with-config/01-run.py rename to examples/advanced_examples/suit_update/tests-with-config/01-run.py diff --git a/examples/suit_update/tests-with-config/check-config.sh b/examples/advanced_examples/suit_update/tests-with-config/check-config.sh similarity index 100% rename from examples/suit_update/tests-with-config/check-config.sh rename to examples/advanced_examples/suit_update/tests-with-config/check-config.sh diff --git a/examples/thread_duel/Makefile b/examples/advanced_examples/thread_duel/Makefile similarity index 95% rename from examples/thread_duel/Makefile rename to examples/advanced_examples/thread_duel/Makefile index c9d82ad41ea7..aa4f60c5a0ed 100644 --- a/examples/thread_duel/Makefile +++ b/examples/advanced_examples/thread_duel/Makefile @@ -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 diff --git a/examples/thread_duel/Makefile.ci b/examples/advanced_examples/thread_duel/Makefile.ci similarity index 100% rename from examples/thread_duel/Makefile.ci rename to examples/advanced_examples/thread_duel/Makefile.ci diff --git a/examples/thread_duel/README.md b/examples/advanced_examples/thread_duel/README.md similarity index 100% rename from examples/thread_duel/README.md rename to examples/advanced_examples/thread_duel/README.md diff --git a/examples/thread_duel/main.c b/examples/advanced_examples/thread_duel/main.c similarity index 100% rename from examples/thread_duel/main.c rename to examples/advanced_examples/thread_duel/main.c diff --git a/examples/twr_aloha/Makefile b/examples/advanced_examples/twr_aloha/Makefile similarity index 97% rename from examples/twr_aloha/Makefile rename to examples/advanced_examples/twr_aloha/Makefile index d9d4e161850e..5ec0ba8c7ab8 100644 --- a/examples/twr_aloha/Makefile +++ b/examples/advanced_examples/twr_aloha/Makefile @@ -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 diff --git a/examples/twr_aloha/Makefile.ci b/examples/advanced_examples/twr_aloha/Makefile.ci similarity index 100% rename from examples/twr_aloha/Makefile.ci rename to examples/advanced_examples/twr_aloha/Makefile.ci diff --git a/examples/twr_aloha/README.md b/examples/advanced_examples/twr_aloha/README.md similarity index 100% rename from examples/twr_aloha/README.md rename to examples/advanced_examples/twr_aloha/README.md diff --git a/examples/twr_aloha/control.c b/examples/advanced_examples/twr_aloha/control.c similarity index 100% rename from examples/twr_aloha/control.c rename to examples/advanced_examples/twr_aloha/control.c diff --git a/examples/twr_aloha/control.h b/examples/advanced_examples/twr_aloha/control.h similarity index 100% rename from examples/twr_aloha/control.h rename to examples/advanced_examples/twr_aloha/control.h diff --git a/examples/twr_aloha/main.c b/examples/advanced_examples/twr_aloha/main.c similarity index 100% rename from examples/twr_aloha/main.c rename to examples/advanced_examples/twr_aloha/main.c diff --git a/examples/twr_aloha/tests-with-config/01-run.py b/examples/advanced_examples/twr_aloha/tests-with-config/01-run.py similarity index 100% rename from examples/twr_aloha/tests-with-config/01-run.py rename to examples/advanced_examples/twr_aloha/tests-with-config/01-run.py diff --git a/examples/twr_aloha/twr_shell.c b/examples/advanced_examples/twr_aloha/twr_shell.c similarity index 100% rename from examples/twr_aloha/twr_shell.c rename to examples/advanced_examples/twr_aloha/twr_shell.c diff --git a/examples/twr_aloha/twr_shell.py b/examples/advanced_examples/twr_aloha/twr_shell.py similarity index 100% rename from examples/twr_aloha/twr_shell.py rename to examples/advanced_examples/twr_aloha/twr_shell.py diff --git a/examples/usbus_minimal/Makefile b/examples/advanced_examples/usbus_minimal/Makefile similarity index 95% rename from examples/usbus_minimal/Makefile rename to examples/advanced_examples/usbus_minimal/Makefile index 86730d06343c..074bbe09bab8 100644 --- a/examples/usbus_minimal/Makefile +++ b/examples/advanced_examples/usbus_minimal/Makefile @@ -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 diff --git a/examples/usbus_minimal/README.md b/examples/advanced_examples/usbus_minimal/README.md similarity index 100% rename from examples/usbus_minimal/README.md rename to examples/advanced_examples/usbus_minimal/README.md diff --git a/examples/usbus_minimal/main.c b/examples/advanced_examples/usbus_minimal/main.c similarity index 100% rename from examples/usbus_minimal/main.c rename to examples/advanced_examples/usbus_minimal/main.c diff --git a/examples/blinky/Makefile b/examples/essentials/blinky/Makefile similarity index 94% rename from examples/blinky/Makefile rename to examples/essentials/blinky/Makefile index 2d58be2d6b90..efff486b3d42 100644 --- a/examples/blinky/Makefile +++ b/examples/essentials/blinky/Makefile @@ -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 diff --git a/examples/blinky/Makefile.board.dep b/examples/essentials/blinky/Makefile.board.dep similarity index 100% rename from examples/blinky/Makefile.board.dep rename to examples/essentials/blinky/Makefile.board.dep diff --git a/examples/blinky/Makefile.ci b/examples/essentials/blinky/Makefile.ci similarity index 100% rename from examples/blinky/Makefile.ci rename to examples/essentials/blinky/Makefile.ci diff --git a/examples/blinky/README.md b/examples/essentials/blinky/README.md similarity index 100% rename from examples/blinky/README.md rename to examples/essentials/blinky/README.md diff --git a/examples/blinky/main.c b/examples/essentials/blinky/main.c similarity index 100% rename from examples/blinky/main.c rename to examples/essentials/blinky/main.c diff --git a/examples/default/Makefile b/examples/essentials/default/Makefile similarity index 97% rename from examples/default/Makefile rename to examples/essentials/default/Makefile index 81dbbe614c6d..0030a4e97bfb 100644 --- a/examples/default/Makefile +++ b/examples/essentials/default/Makefile @@ -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: diff --git a/examples/default/Makefile.board.dep b/examples/essentials/default/Makefile.board.dep similarity index 100% rename from examples/default/Makefile.board.dep rename to examples/essentials/default/Makefile.board.dep diff --git a/examples/default/Makefile.ci b/examples/essentials/default/Makefile.ci similarity index 100% rename from examples/default/Makefile.ci rename to examples/essentials/default/Makefile.ci diff --git a/examples/default/README.md b/examples/essentials/default/README.md similarity index 100% rename from examples/default/README.md rename to examples/essentials/default/README.md diff --git a/examples/default/main.c b/examples/essentials/default/main.c similarity index 100% rename from examples/default/main.c rename to examples/essentials/default/main.c diff --git a/examples/filesystem/Makefile b/examples/essentials/filesystem/Makefile similarity index 96% rename from examples/filesystem/Makefile rename to examples/essentials/filesystem/Makefile index ca82326dac0f..8016d6de1122 100644 --- a/examples/filesystem/Makefile +++ b/examples/essentials/filesystem/Makefile @@ -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 diff --git a/examples/filesystem/Makefile.ci b/examples/essentials/filesystem/Makefile.ci similarity index 100% rename from examples/filesystem/Makefile.ci rename to examples/essentials/filesystem/Makefile.ci diff --git a/examples/filesystem/README.md b/examples/essentials/filesystem/README.md similarity index 100% rename from examples/filesystem/README.md rename to examples/essentials/filesystem/README.md diff --git a/examples/filesystem/main.c b/examples/essentials/filesystem/main.c similarity index 100% rename from examples/filesystem/main.c rename to examples/essentials/filesystem/main.c diff --git a/examples/hello-world/Makefile b/examples/essentials/hello-world/Makefile similarity index 93% rename from examples/hello-world/Makefile rename to examples/essentials/hello-world/Makefile index 258d8e9bafba..ad1fa6fdcb74 100644 --- a/examples/hello-world/Makefile +++ b/examples/essentials/hello-world/Makefile @@ -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 diff --git a/examples/hello-world/README.md b/examples/essentials/hello-world/README.md similarity index 100% rename from examples/hello-world/README.md rename to examples/essentials/hello-world/README.md diff --git a/examples/hello-world/main.c b/examples/essentials/hello-world/main.c similarity index 100% rename from examples/hello-world/main.c rename to examples/essentials/hello-world/main.c diff --git a/examples/ipc_pingpong/Makefile b/examples/essentials/ipc_pingpong/Makefile similarity index 93% rename from examples/ipc_pingpong/Makefile rename to examples/essentials/ipc_pingpong/Makefile index 834f29186177..e4a8906feed0 100644 --- a/examples/ipc_pingpong/Makefile +++ b/examples/essentials/ipc_pingpong/Makefile @@ -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 diff --git a/examples/ipc_pingpong/Makefile.ci b/examples/essentials/ipc_pingpong/Makefile.ci similarity index 100% rename from examples/ipc_pingpong/Makefile.ci rename to examples/essentials/ipc_pingpong/Makefile.ci diff --git a/examples/ipc_pingpong/README.md b/examples/essentials/ipc_pingpong/README.md similarity index 100% rename from examples/ipc_pingpong/README.md rename to examples/essentials/ipc_pingpong/README.md diff --git a/examples/ipc_pingpong/main.c b/examples/essentials/ipc_pingpong/main.c similarity index 100% rename from examples/ipc_pingpong/main.c rename to examples/essentials/ipc_pingpong/main.c diff --git a/examples/leds_shell/Makefile b/examples/essentials/leds_shell/Makefile similarity index 95% rename from examples/leds_shell/Makefile rename to examples/essentials/leds_shell/Makefile index 70b9ef240022..71aaa5efaf3b 100644 --- a/examples/leds_shell/Makefile +++ b/examples/essentials/leds_shell/Makefile @@ -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 diff --git a/examples/leds_shell/Makefile.ci b/examples/essentials/leds_shell/Makefile.ci similarity index 100% rename from examples/leds_shell/Makefile.ci rename to examples/essentials/leds_shell/Makefile.ci diff --git a/examples/leds_shell/README.md b/examples/essentials/leds_shell/README.md similarity index 100% rename from examples/leds_shell/README.md rename to examples/essentials/leds_shell/README.md diff --git a/examples/leds_shell/main.c b/examples/essentials/leds_shell/main.c similarity index 100% rename from examples/leds_shell/main.c rename to examples/essentials/leds_shell/main.c diff --git a/examples/saul/Makefile b/examples/essentials/saul/Makefile similarity index 95% rename from examples/saul/Makefile rename to examples/essentials/saul/Makefile index 58a8b51dc320..be40c8ca57fe 100644 --- a/examples/saul/Makefile +++ b/examples/essentials/saul/Makefile @@ -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 diff --git a/examples/saul/Makefile.ci b/examples/essentials/saul/Makefile.ci similarity index 100% rename from examples/saul/Makefile.ci rename to examples/essentials/saul/Makefile.ci diff --git a/examples/saul/README.md b/examples/essentials/saul/README.md similarity index 100% rename from examples/saul/README.md rename to examples/essentials/saul/README.md diff --git a/examples/saul/main.c b/examples/essentials/saul/main.c similarity index 100% rename from examples/saul/main.c rename to examples/essentials/saul/main.c diff --git a/examples/subfolders/Makefile b/examples/essentials/subfolders/Makefile similarity index 96% rename from examples/subfolders/Makefile rename to examples/essentials/subfolders/Makefile index c3c983985350..858d09a71d33 100644 --- a/examples/subfolders/Makefile +++ b/examples/essentials/subfolders/Makefile @@ -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 diff --git a/examples/subfolders/README.md b/examples/essentials/subfolders/README.md similarity index 100% rename from examples/subfolders/README.md rename to examples/essentials/subfolders/README.md diff --git a/examples/subfolders/folder/a.c b/examples/essentials/subfolders/folder/a.c similarity index 100% rename from examples/subfolders/folder/a.c rename to examples/essentials/subfolders/folder/a.c diff --git a/examples/subfolders/folder/subfolder/b.c b/examples/essentials/subfolders/folder/subfolder/b.c similarity index 100% rename from examples/subfolders/folder/subfolder/b.c rename to examples/essentials/subfolders/folder/subfolder/b.c diff --git a/examples/subfolders/folder/subfolder/c.c b/examples/essentials/subfolders/folder/subfolder/c.c similarity index 100% rename from examples/subfolders/folder/subfolder/c.c rename to examples/essentials/subfolders/folder/subfolder/c.c diff --git a/examples/subfolders/main.c b/examples/essentials/subfolders/main.c similarity index 100% rename from examples/subfolders/main.c rename to examples/essentials/subfolders/main.c diff --git a/examples/subfolders/module/Makefile b/examples/essentials/subfolders/module/Makefile similarity index 100% rename from examples/subfolders/module/Makefile rename to examples/essentials/subfolders/module/Makefile diff --git a/examples/subfolders/module/a.c b/examples/essentials/subfolders/module/a.c similarity index 100% rename from examples/subfolders/module/a.c rename to examples/essentials/subfolders/module/a.c diff --git a/examples/subfolders/module/b.c b/examples/essentials/subfolders/module/b.c similarity index 100% rename from examples/subfolders/module/b.c rename to examples/essentials/subfolders/module/b.c diff --git a/examples/timer_periodic_wakeup/Makefile b/examples/essentials/timer_periodic_wakeup/Makefile similarity index 90% rename from examples/timer_periodic_wakeup/Makefile rename to examples/essentials/timer_periodic_wakeup/Makefile index b3a507334bdd..70b53c7ae89b 100644 --- a/examples/timer_periodic_wakeup/Makefile +++ b/examples/essentials/timer_periodic_wakeup/Makefile @@ -1,5 +1,5 @@ APPLICATION = timer_periodic_wakeup -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../.. BOARD ?= native diff --git a/examples/timer_periodic_wakeup/Makefile.ci b/examples/essentials/timer_periodic_wakeup/Makefile.ci similarity index 100% rename from examples/timer_periodic_wakeup/Makefile.ci rename to examples/essentials/timer_periodic_wakeup/Makefile.ci diff --git a/examples/timer_periodic_wakeup/README.md b/examples/essentials/timer_periodic_wakeup/README.md similarity index 100% rename from examples/timer_periodic_wakeup/README.md rename to examples/essentials/timer_periodic_wakeup/README.md diff --git a/examples/timer_periodic_wakeup/main.c b/examples/essentials/timer_periodic_wakeup/main.c similarity index 100% rename from examples/timer_periodic_wakeup/main.c rename to examples/essentials/timer_periodic_wakeup/main.c diff --git a/examples/gcoap_dtls/Makefile.slip b/examples/gcoap_dtls/Makefile.slip deleted file mode 120000 index 4caf7a08c3f0..000000000000 --- a/examples/gcoap_dtls/Makefile.slip +++ /dev/null @@ -1 +0,0 @@ -../gcoap/Makefile.slip \ No newline at end of file diff --git a/examples/gcoap_dtls/client.c b/examples/gcoap_dtls/client.c deleted file mode 120000 index c6a81dc61710..000000000000 --- a/examples/gcoap_dtls/client.c +++ /dev/null @@ -1 +0,0 @@ -../gcoap/client.c \ No newline at end of file diff --git a/examples/gcoap_dtls/gcoap_example.h b/examples/gcoap_dtls/gcoap_example.h deleted file mode 120000 index 2862a8e533a4..000000000000 --- a/examples/gcoap_dtls/gcoap_example.h +++ /dev/null @@ -1 +0,0 @@ -../gcoap/gcoap_example.h \ No newline at end of file diff --git a/examples/gcoap_dtls/main.c b/examples/gcoap_dtls/main.c deleted file mode 120000 index 2710302f571a..000000000000 --- a/examples/gcoap_dtls/main.c +++ /dev/null @@ -1 +0,0 @@ -../gcoap/main.c \ No newline at end of file diff --git a/examples/gcoap_dtls/server.c b/examples/gcoap_dtls/server.c deleted file mode 120000 index a082f6e616c0..000000000000 --- a/examples/gcoap_dtls/server.c +++ /dev/null @@ -1 +0,0 @@ -../gcoap/server.c \ No newline at end of file diff --git a/examples/gnrc_networking_subnets/main.c b/examples/gnrc_networking_subnets/main.c deleted file mode 120000 index f6a0e7f50872..000000000000 --- a/examples/gnrc_networking_subnets/main.c +++ /dev/null @@ -1 +0,0 @@ -../gnrc_networking/main.c \ No newline at end of file diff --git a/examples/arduino_hello-world/Makefile b/examples/language_bindings/community_supported/arduino_hello-world/Makefile similarity index 94% rename from examples/arduino_hello-world/Makefile rename to examples/language_bindings/community_supported/arduino_hello-world/Makefile index c101c7e83362..3d3f2d45e8a7 100644 --- a/examples/arduino_hello-world/Makefile +++ b/examples/language_bindings/community_supported/arduino_hello-world/Makefile @@ -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 diff --git a/examples/arduino_hello-world/Makefile.ci b/examples/language_bindings/community_supported/arduino_hello-world/Makefile.ci similarity index 100% rename from examples/arduino_hello-world/Makefile.ci rename to examples/language_bindings/community_supported/arduino_hello-world/Makefile.ci diff --git a/examples/arduino_hello-world/README.md b/examples/language_bindings/community_supported/arduino_hello-world/README.md similarity index 100% rename from examples/arduino_hello-world/README.md rename to examples/language_bindings/community_supported/arduino_hello-world/README.md diff --git a/examples/arduino_hello-world/hello-world.sketch b/examples/language_bindings/community_supported/arduino_hello-world/hello-world.sketch similarity index 100% rename from examples/arduino_hello-world/hello-world.sketch rename to examples/language_bindings/community_supported/arduino_hello-world/hello-world.sketch diff --git a/examples/javascript/Makefile b/examples/language_bindings/community_supported/javascript/Makefile similarity index 94% rename from examples/javascript/Makefile rename to examples/language_bindings/community_supported/javascript/Makefile index 9d774f7a3d7f..1698bd8b63ef 100644 --- a/examples/javascript/Makefile +++ b/examples/language_bindings/community_supported/javascript/Makefile @@ -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 diff --git a/examples/javascript/Makefile.ci b/examples/language_bindings/community_supported/javascript/Makefile.ci similarity index 100% rename from examples/javascript/Makefile.ci rename to examples/language_bindings/community_supported/javascript/Makefile.ci diff --git a/examples/javascript/README.md b/examples/language_bindings/community_supported/javascript/README.md similarity index 100% rename from examples/javascript/README.md rename to examples/language_bindings/community_supported/javascript/README.md diff --git a/examples/javascript/main.c b/examples/language_bindings/community_supported/javascript/main.c similarity index 100% rename from examples/javascript/main.c rename to examples/language_bindings/community_supported/javascript/main.c diff --git a/examples/javascript/main.js b/examples/language_bindings/community_supported/javascript/main.js similarity index 100% rename from examples/javascript/main.js rename to examples/language_bindings/community_supported/javascript/main.js diff --git a/examples/lua_REPL/Makefile b/examples/language_bindings/community_supported/lua_REPL/Makefile similarity index 96% rename from examples/lua_REPL/Makefile rename to examples/language_bindings/community_supported/lua_REPL/Makefile index 4aab7dff8467..dc04dfdbc9c2 100644 --- a/examples/lua_REPL/Makefile +++ b/examples/language_bindings/community_supported/lua_REPL/Makefile @@ -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 diff --git a/examples/lua_REPL/Makefile.ci b/examples/language_bindings/community_supported/lua_REPL/Makefile.ci similarity index 100% rename from examples/lua_REPL/Makefile.ci rename to examples/language_bindings/community_supported/lua_REPL/Makefile.ci diff --git a/examples/lua_REPL/README.md b/examples/language_bindings/community_supported/lua_REPL/README.md similarity index 100% rename from examples/lua_REPL/README.md rename to examples/language_bindings/community_supported/lua_REPL/README.md diff --git a/examples/lua_REPL/main.c b/examples/language_bindings/community_supported/lua_REPL/main.c similarity index 100% rename from examples/lua_REPL/main.c rename to examples/language_bindings/community_supported/lua_REPL/main.c diff --git a/examples/lua_REPL/repl.lua b/examples/language_bindings/community_supported/lua_REPL/repl.lua similarity index 100% rename from examples/lua_REPL/repl.lua rename to examples/language_bindings/community_supported/lua_REPL/repl.lua diff --git a/examples/lua_basic/Makefile b/examples/language_bindings/community_supported/lua_basic/Makefile similarity index 95% rename from examples/lua_basic/Makefile rename to examples/language_bindings/community_supported/lua_basic/Makefile index 3f15545268cc..0272896be5a1 100644 --- a/examples/lua_basic/Makefile +++ b/examples/language_bindings/community_supported/lua_basic/Makefile @@ -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 diff --git a/examples/lua_basic/Makefile.ci b/examples/language_bindings/community_supported/lua_basic/Makefile.ci similarity index 100% rename from examples/lua_basic/Makefile.ci rename to examples/language_bindings/community_supported/lua_basic/Makefile.ci diff --git a/examples/lua_basic/README.md b/examples/language_bindings/community_supported/lua_basic/README.md similarity index 100% rename from examples/lua_basic/README.md rename to examples/language_bindings/community_supported/lua_basic/README.md diff --git a/examples/lua_basic/main.c b/examples/language_bindings/community_supported/lua_basic/main.c similarity index 100% rename from examples/lua_basic/main.c rename to examples/language_bindings/community_supported/lua_basic/main.c diff --git a/examples/lua_basic/main.lua b/examples/language_bindings/community_supported/lua_basic/main.lua similarity index 100% rename from examples/lua_basic/main.lua rename to examples/language_bindings/community_supported/lua_basic/main.lua diff --git a/examples/micropython/Makefile b/examples/language_bindings/community_supported/micropython/Makefile similarity index 96% rename from examples/micropython/Makefile rename to examples/language_bindings/community_supported/micropython/Makefile index f337823456a9..a7026ea1b7a0 100644 --- a/examples/micropython/Makefile +++ b/examples/language_bindings/community_supported/micropython/Makefile @@ -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 diff --git a/examples/micropython/Makefile.ci b/examples/language_bindings/community_supported/micropython/Makefile.ci similarity index 100% rename from examples/micropython/Makefile.ci rename to examples/language_bindings/community_supported/micropython/Makefile.ci diff --git a/examples/micropython/README.md b/examples/language_bindings/community_supported/micropython/README.md similarity index 100% rename from examples/micropython/README.md rename to examples/language_bindings/community_supported/micropython/README.md diff --git a/examples/micropython/boot.py b/examples/language_bindings/community_supported/micropython/boot.py similarity index 100% rename from examples/micropython/boot.py rename to examples/language_bindings/community_supported/micropython/boot.py diff --git a/examples/micropython/main.c b/examples/language_bindings/community_supported/micropython/main.c similarity index 100% rename from examples/micropython/main.c rename to examples/language_bindings/community_supported/micropython/main.c diff --git a/examples/micropython/tests/01-run.py b/examples/language_bindings/community_supported/micropython/tests/01-run.py similarity index 100% rename from examples/micropython/tests/01-run.py rename to examples/language_bindings/community_supported/micropython/tests/01-run.py diff --git a/examples/wasm/.gitignore b/examples/language_bindings/community_supported/wasm/.gitignore similarity index 100% rename from examples/wasm/.gitignore rename to examples/language_bindings/community_supported/wasm/.gitignore diff --git a/examples/wasm/Makefile b/examples/language_bindings/community_supported/wasm/Makefile similarity index 96% rename from examples/wasm/Makefile rename to examples/language_bindings/community_supported/wasm/Makefile index abfc41070927..57636b778a53 100644 --- a/examples/wasm/Makefile +++ b/examples/language_bindings/community_supported/wasm/Makefile @@ -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 diff --git a/examples/wasm/Makefile.ci b/examples/language_bindings/community_supported/wasm/Makefile.ci similarity index 100% rename from examples/wasm/Makefile.ci rename to examples/language_bindings/community_supported/wasm/Makefile.ci diff --git a/examples/wasm/README.md b/examples/language_bindings/community_supported/wasm/README.md similarity index 100% rename from examples/wasm/README.md rename to examples/language_bindings/community_supported/wasm/README.md diff --git a/examples/wasm/config.cmake b/examples/language_bindings/community_supported/wasm/config.cmake similarity index 100% rename from examples/wasm/config.cmake rename to examples/language_bindings/community_supported/wasm/config.cmake diff --git a/examples/wasm/iwasmt.c b/examples/language_bindings/community_supported/wasm/iwasmt.c similarity index 100% rename from examples/wasm/iwasmt.c rename to examples/language_bindings/community_supported/wasm/iwasmt.c diff --git a/examples/wasm/test.wasm b/examples/language_bindings/community_supported/wasm/test.wasm similarity index 100% rename from examples/wasm/test.wasm rename to examples/language_bindings/community_supported/wasm/test.wasm diff --git a/examples/wasm/wasm-main.c b/examples/language_bindings/community_supported/wasm/wasm-main.c similarity index 100% rename from examples/wasm/wasm-main.c rename to examples/language_bindings/community_supported/wasm/wasm-main.c diff --git a/examples/wasm/wasm_sample/Makefile b/examples/language_bindings/community_supported/wasm/wasm_sample/Makefile similarity index 100% rename from examples/wasm/wasm_sample/Makefile rename to examples/language_bindings/community_supported/wasm/wasm_sample/Makefile diff --git a/examples/wasm/wasm_sample/hello.c b/examples/language_bindings/community_supported/wasm/wasm_sample/hello.c similarity index 100% rename from examples/wasm/wasm_sample/hello.c rename to examples/language_bindings/community_supported/wasm/wasm_sample/hello.c diff --git a/examples/wasm/wasm_sample/hello_prebuild.wasm b/examples/language_bindings/community_supported/wasm/wasm_sample/hello_prebuild.wasm similarity index 100% rename from examples/wasm/wasm_sample/hello_prebuild.wasm rename to examples/language_bindings/community_supported/wasm/wasm_sample/hello_prebuild.wasm diff --git a/examples/riot_and_cpp/Makefile b/examples/language_bindings/officially_supported/riot_and_cpp/Makefile similarity index 97% rename from examples/riot_and_cpp/Makefile rename to examples/language_bindings/officially_supported/riot_and_cpp/Makefile index e367cf1fbda3..639a862c453e 100644 --- a/examples/riot_and_cpp/Makefile +++ b/examples/language_bindings/officially_supported/riot_and_cpp/Makefile @@ -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: diff --git a/examples/riot_and_cpp/Makefile.ci b/examples/language_bindings/officially_supported/riot_and_cpp/Makefile.ci similarity index 100% rename from examples/riot_and_cpp/Makefile.ci rename to examples/language_bindings/officially_supported/riot_and_cpp/Makefile.ci diff --git a/examples/riot_and_cpp/README.md b/examples/language_bindings/officially_supported/riot_and_cpp/README.md similarity index 100% rename from examples/riot_and_cpp/README.md rename to examples/language_bindings/officially_supported/riot_and_cpp/README.md diff --git a/examples/riot_and_cpp/c_functions.c b/examples/language_bindings/officially_supported/riot_and_cpp/c_functions.c similarity index 100% rename from examples/riot_and_cpp/c_functions.c rename to examples/language_bindings/officially_supported/riot_and_cpp/c_functions.c diff --git a/examples/riot_and_cpp/c_functions.h b/examples/language_bindings/officially_supported/riot_and_cpp/c_functions.h similarity index 100% rename from examples/riot_and_cpp/c_functions.h rename to examples/language_bindings/officially_supported/riot_and_cpp/c_functions.h diff --git a/examples/riot_and_cpp/cpp_class.cpp b/examples/language_bindings/officially_supported/riot_and_cpp/cpp_class.cpp similarity index 100% rename from examples/riot_and_cpp/cpp_class.cpp rename to examples/language_bindings/officially_supported/riot_and_cpp/cpp_class.cpp diff --git a/examples/riot_and_cpp/cpp_class.hpp b/examples/language_bindings/officially_supported/riot_and_cpp/cpp_class.hpp similarity index 100% rename from examples/riot_and_cpp/cpp_class.hpp rename to examples/language_bindings/officially_supported/riot_and_cpp/cpp_class.hpp diff --git a/examples/riot_and_cpp/main.cpp b/examples/language_bindings/officially_supported/riot_and_cpp/main.cpp similarity index 100% rename from examples/riot_and_cpp/main.cpp rename to examples/language_bindings/officially_supported/riot_and_cpp/main.cpp diff --git a/examples/rust-async/Cargo.lock b/examples/language_bindings/officially_supported/rust-async/Cargo.lock similarity index 100% rename from examples/rust-async/Cargo.lock rename to examples/language_bindings/officially_supported/rust-async/Cargo.lock diff --git a/examples/rust-async/Cargo.toml b/examples/language_bindings/officially_supported/rust-async/Cargo.toml similarity index 100% rename from examples/rust-async/Cargo.toml rename to examples/language_bindings/officially_supported/rust-async/Cargo.toml diff --git a/examples/rust-async/Makefile b/examples/language_bindings/officially_supported/rust-async/Makefile similarity index 95% rename from examples/rust-async/Makefile rename to examples/language_bindings/officially_supported/rust-async/Makefile index f782dac8441b..927211e71e1f 100644 --- a/examples/rust-async/Makefile +++ b/examples/language_bindings/officially_supported/rust-async/Makefile @@ -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 diff --git a/examples/rust-async/Makefile.ci b/examples/language_bindings/officially_supported/rust-async/Makefile.ci similarity index 100% rename from examples/rust-async/Makefile.ci rename to examples/language_bindings/officially_supported/rust-async/Makefile.ci diff --git a/examples/rust-async/README.md b/examples/language_bindings/officially_supported/rust-async/README.md similarity index 100% rename from examples/rust-async/README.md rename to examples/language_bindings/officially_supported/rust-async/README.md diff --git a/examples/rust-async/src/lib.rs b/examples/language_bindings/officially_supported/rust-async/src/lib.rs similarity index 100% rename from examples/rust-async/src/lib.rs rename to examples/language_bindings/officially_supported/rust-async/src/lib.rs diff --git a/examples/rust-gcoap/Cargo.lock b/examples/language_bindings/officially_supported/rust-gcoap/Cargo.lock similarity index 100% rename from examples/rust-gcoap/Cargo.lock rename to examples/language_bindings/officially_supported/rust-gcoap/Cargo.lock diff --git a/examples/rust-gcoap/Cargo.toml b/examples/language_bindings/officially_supported/rust-gcoap/Cargo.toml similarity index 100% rename from examples/rust-gcoap/Cargo.toml rename to examples/language_bindings/officially_supported/rust-gcoap/Cargo.toml diff --git a/examples/rust-gcoap/Makefile b/examples/language_bindings/officially_supported/rust-gcoap/Makefile similarity index 97% rename from examples/rust-gcoap/Makefile rename to examples/language_bindings/officially_supported/rust-gcoap/Makefile index e610f585cd8f..1f63ad27ad56 100644 --- a/examples/rust-gcoap/Makefile +++ b/examples/language_bindings/officially_supported/rust-gcoap/Makefile @@ -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 diff --git a/examples/rust-gcoap/Makefile.ci b/examples/language_bindings/officially_supported/rust-gcoap/Makefile.ci similarity index 100% rename from examples/rust-gcoap/Makefile.ci rename to examples/language_bindings/officially_supported/rust-gcoap/Makefile.ci diff --git a/examples/rust-gcoap/README.md b/examples/language_bindings/officially_supported/rust-gcoap/README.md similarity index 100% rename from examples/rust-gcoap/README.md rename to examples/language_bindings/officially_supported/rust-gcoap/README.md diff --git a/examples/rust-gcoap/src/lib.rs b/examples/language_bindings/officially_supported/rust-gcoap/src/lib.rs similarity index 100% rename from examples/rust-gcoap/src/lib.rs rename to examples/language_bindings/officially_supported/rust-gcoap/src/lib.rs diff --git a/examples/rust-gcoap/vfs.c b/examples/language_bindings/officially_supported/rust-gcoap/vfs.c similarity index 100% rename from examples/rust-gcoap/vfs.c rename to examples/language_bindings/officially_supported/rust-gcoap/vfs.c diff --git a/examples/rust-hello-world/Cargo.lock b/examples/language_bindings/officially_supported/rust-hello-world/Cargo.lock similarity index 100% rename from examples/rust-hello-world/Cargo.lock rename to examples/language_bindings/officially_supported/rust-hello-world/Cargo.lock diff --git a/examples/rust-hello-world/Cargo.toml b/examples/language_bindings/officially_supported/rust-hello-world/Cargo.toml similarity index 100% rename from examples/rust-hello-world/Cargo.toml rename to examples/language_bindings/officially_supported/rust-hello-world/Cargo.toml diff --git a/examples/rust-hello-world/Makefile b/examples/language_bindings/officially_supported/rust-hello-world/Makefile similarity index 95% rename from examples/rust-hello-world/Makefile rename to examples/language_bindings/officially_supported/rust-hello-world/Makefile index c411d26d268b..941dd6069192 100644 --- a/examples/rust-hello-world/Makefile +++ b/examples/language_bindings/officially_supported/rust-hello-world/Makefile @@ -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 diff --git a/examples/rust-hello-world/README.md b/examples/language_bindings/officially_supported/rust-hello-world/README.md similarity index 100% rename from examples/rust-hello-world/README.md rename to examples/language_bindings/officially_supported/rust-hello-world/README.md diff --git a/examples/rust-hello-world/src/lib.rs b/examples/language_bindings/officially_supported/rust-hello-world/src/lib.rs similarity index 100% rename from examples/rust-hello-world/src/lib.rs rename to examples/language_bindings/officially_supported/rust-hello-world/src/lib.rs diff --git a/examples/skald_eddystone/Makefile b/examples/networking/bluetooth_low_energy/misc_ble_examples/skald_eddystone/Makefile similarity index 94% rename from examples/skald_eddystone/Makefile rename to examples/networking/bluetooth_low_energy/misc_ble_examples/skald_eddystone/Makefile index a452cae29213..69fb96bf99d8 100644 --- a/examples/skald_eddystone/Makefile +++ b/examples/networking/bluetooth_low_energy/misc_ble_examples/skald_eddystone/Makefile @@ -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 diff --git a/examples/skald_eddystone/README.md b/examples/networking/bluetooth_low_energy/misc_ble_examples/skald_eddystone/README.md similarity index 100% rename from examples/skald_eddystone/README.md rename to examples/networking/bluetooth_low_energy/misc_ble_examples/skald_eddystone/README.md diff --git a/examples/skald_eddystone/main.c b/examples/networking/bluetooth_low_energy/misc_ble_examples/skald_eddystone/main.c similarity index 100% rename from examples/skald_eddystone/main.c rename to examples/networking/bluetooth_low_energy/misc_ble_examples/skald_eddystone/main.c diff --git a/examples/skald_ibeacon/Makefile b/examples/networking/bluetooth_low_energy/misc_ble_examples/skald_ibeacon/Makefile similarity index 94% rename from examples/skald_ibeacon/Makefile rename to examples/networking/bluetooth_low_energy/misc_ble_examples/skald_ibeacon/Makefile index da517defcfcf..f6353a9f71da 100644 --- a/examples/skald_ibeacon/Makefile +++ b/examples/networking/bluetooth_low_energy/misc_ble_examples/skald_ibeacon/Makefile @@ -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 diff --git a/examples/skald_ibeacon/README.md b/examples/networking/bluetooth_low_energy/misc_ble_examples/skald_ibeacon/README.md similarity index 100% rename from examples/skald_ibeacon/README.md rename to examples/networking/bluetooth_low_energy/misc_ble_examples/skald_ibeacon/README.md diff --git a/examples/skald_ibeacon/main.c b/examples/networking/bluetooth_low_energy/misc_ble_examples/skald_ibeacon/main.c similarity index 100% rename from examples/skald_ibeacon/main.c rename to examples/networking/bluetooth_low_energy/misc_ble_examples/skald_ibeacon/main.c diff --git a/examples/nimble_gatt/Makefile b/examples/networking/bluetooth_low_energy/nimble/nimble_gatt/Makefile similarity index 95% rename from examples/nimble_gatt/Makefile rename to examples/networking/bluetooth_low_energy/nimble/nimble_gatt/Makefile index 529b6d3d0d40..1440490f5036 100644 --- a/examples/nimble_gatt/Makefile +++ b/examples/networking/bluetooth_low_energy/nimble/nimble_gatt/Makefile @@ -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 diff --git a/examples/nimble_gatt/README.md b/examples/networking/bluetooth_low_energy/nimble/nimble_gatt/README.md similarity index 100% rename from examples/nimble_gatt/README.md rename to examples/networking/bluetooth_low_energy/nimble/nimble_gatt/README.md diff --git a/examples/nimble_gatt/main.c b/examples/networking/bluetooth_low_energy/nimble/nimble_gatt/main.c similarity index 100% rename from examples/nimble_gatt/main.c rename to examples/networking/bluetooth_low_energy/nimble/nimble_gatt/main.c diff --git a/examples/nimble_heart_rate_sensor/Makefile b/examples/networking/bluetooth_low_energy/nimble/nimble_heart_rate_sensor/Makefile similarity index 96% rename from examples/nimble_heart_rate_sensor/Makefile rename to examples/networking/bluetooth_low_energy/nimble/nimble_heart_rate_sensor/Makefile index 79be50df56e3..e5c4a6f825b5 100644 --- a/examples/nimble_heart_rate_sensor/Makefile +++ b/examples/networking/bluetooth_low_energy/nimble/nimble_heart_rate_sensor/Makefile @@ -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 diff --git a/examples/nimble_heart_rate_sensor/README.md b/examples/networking/bluetooth_low_energy/nimble/nimble_heart_rate_sensor/README.md similarity index 100% rename from examples/nimble_heart_rate_sensor/README.md rename to examples/networking/bluetooth_low_energy/nimble/nimble_heart_rate_sensor/README.md diff --git a/examples/nimble_heart_rate_sensor/main.c b/examples/networking/bluetooth_low_energy/nimble/nimble_heart_rate_sensor/main.c similarity index 100% rename from examples/nimble_heart_rate_sensor/main.c rename to examples/networking/bluetooth_low_energy/nimble/nimble_heart_rate_sensor/main.c diff --git a/examples/nimble_scanner/Makefile b/examples/networking/bluetooth_low_energy/nimble/nimble_scanner/Makefile similarity index 95% rename from examples/nimble_scanner/Makefile rename to examples/networking/bluetooth_low_energy/nimble/nimble_scanner/Makefile index 3bda95e19b41..f4e6c1ea1044 100644 --- a/examples/nimble_scanner/Makefile +++ b/examples/networking/bluetooth_low_energy/nimble/nimble_scanner/Makefile @@ -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 diff --git a/examples/nimble_scanner/README.md b/examples/networking/bluetooth_low_energy/nimble/nimble_scanner/README.md similarity index 100% rename from examples/nimble_scanner/README.md rename to examples/networking/bluetooth_low_energy/nimble/nimble_scanner/README.md diff --git a/examples/nimble_scanner/main.c b/examples/networking/bluetooth_low_energy/nimble/nimble_scanner/main.c similarity index 100% rename from examples/nimble_scanner/main.c rename to examples/networking/bluetooth_low_energy/nimble/nimble_scanner/main.c diff --git a/examples/gcoap/Makefile b/examples/networking/coap/gcoap/Makefile similarity index 98% rename from examples/gcoap/Makefile rename to examples/networking/coap/gcoap/Makefile index 9ab3fe331761..63f06b38f848 100644 --- a/examples/gcoap/Makefile +++ b/examples/networking/coap/gcoap/Makefile @@ -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 diff --git a/examples/gcoap/Makefile.ci b/examples/networking/coap/gcoap/Makefile.ci similarity index 100% rename from examples/gcoap/Makefile.ci rename to examples/networking/coap/gcoap/Makefile.ci diff --git a/examples/gcoap/Makefile.slip b/examples/networking/coap/gcoap/Makefile.slip similarity index 98% rename from examples/gcoap/Makefile.slip rename to examples/networking/coap/gcoap/Makefile.slip index cbef8accf335..010581fbc6f5 100644 --- a/examples/gcoap/Makefile.slip +++ b/examples/networking/coap/gcoap/Makefile.slip @@ -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 diff --git a/examples/gcoap/README-slip.md b/examples/networking/coap/gcoap/README-slip.md similarity index 100% rename from examples/gcoap/README-slip.md rename to examples/networking/coap/gcoap/README-slip.md diff --git a/examples/gcoap/README.md b/examples/networking/coap/gcoap/README.md similarity index 100% rename from examples/gcoap/README.md rename to examples/networking/coap/gcoap/README.md diff --git a/examples/gcoap/client.c b/examples/networking/coap/gcoap/client.c similarity index 100% rename from examples/gcoap/client.c rename to examples/networking/coap/gcoap/client.c diff --git a/examples/gcoap/gcoap_example.h b/examples/networking/coap/gcoap/gcoap_example.h similarity index 100% rename from examples/gcoap/gcoap_example.h rename to examples/networking/coap/gcoap/gcoap_example.h diff --git a/examples/gcoap/main.c b/examples/networking/coap/gcoap/main.c similarity index 100% rename from examples/gcoap/main.c rename to examples/networking/coap/gcoap/main.c diff --git a/examples/gcoap/server.c b/examples/networking/coap/gcoap/server.c similarity index 100% rename from examples/gcoap/server.c rename to examples/networking/coap/gcoap/server.c diff --git a/examples/gcoap_block_server/Makefile b/examples/networking/coap/gcoap_block_server/Makefile similarity index 97% rename from examples/gcoap_block_server/Makefile rename to examples/networking/coap/gcoap_block_server/Makefile index f54a91b7df5a..d71ae9c6cdd9 100644 --- a/examples/gcoap_block_server/Makefile +++ b/examples/networking/coap/gcoap_block_server/Makefile @@ -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 diff --git a/examples/gcoap_block_server/Makefile.ci b/examples/networking/coap/gcoap_block_server/Makefile.ci similarity index 100% rename from examples/gcoap_block_server/Makefile.ci rename to examples/networking/coap/gcoap_block_server/Makefile.ci diff --git a/examples/gcoap_block_server/README.md b/examples/networking/coap/gcoap_block_server/README.md similarity index 100% rename from examples/gcoap_block_server/README.md rename to examples/networking/coap/gcoap_block_server/README.md diff --git a/examples/gcoap_block_server/gcoap_block.c b/examples/networking/coap/gcoap_block_server/gcoap_block.c similarity index 100% rename from examples/gcoap_block_server/gcoap_block.c rename to examples/networking/coap/gcoap_block_server/gcoap_block.c diff --git a/examples/gcoap_block_server/main.c b/examples/networking/coap/gcoap_block_server/main.c similarity index 100% rename from examples/gcoap_block_server/main.c rename to examples/networking/coap/gcoap_block_server/main.c diff --git a/examples/gcoap_dtls/Makefile b/examples/networking/coap/gcoap_dtls/Makefile similarity index 98% rename from examples/gcoap_dtls/Makefile rename to examples/networking/coap/gcoap_dtls/Makefile index 8e06e8f5d357..092e1c6a1dd7 100644 --- a/examples/gcoap_dtls/Makefile +++ b/examples/networking/coap/gcoap_dtls/Makefile @@ -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 diff --git a/examples/gcoap_dtls/Makefile.ci b/examples/networking/coap/gcoap_dtls/Makefile.ci similarity index 100% rename from examples/gcoap_dtls/Makefile.ci rename to examples/networking/coap/gcoap_dtls/Makefile.ci diff --git a/examples/networking/coap/gcoap_dtls/Makefile.slip b/examples/networking/coap/gcoap_dtls/Makefile.slip new file mode 100644 index 000000000000..010581fbc6f5 --- /dev/null +++ b/examples/networking/coap/gcoap_dtls/Makefile.slip @@ -0,0 +1,67 @@ +# Border router Makefile for GNRC and SLIP based networking +# Assumes use of SAMR21 board + +# name of your application +APPLICATION = gcoap + +# If no BOARD is found in the environment, use this default: +BOARD ?= samr21-xpro + +# This has to be the absolute path to the RIOT base directory: +RIOTBASE ?= $(CURDIR)/../../../.. + +# Redefine port, for example use 61616 for RFC 6282 UDP compression. +#GCOAP_PORT = 5683 +#CFLAGS += -DCONFIG_GCOAP_PORT=$(GCOAP_PORT) + +# Redefine request token length, max 8. +#GCOAP_TOKENLEN = 2 +#CFLAGS += -DCONFIG_GCOAP_TOKENLEN=$(GCOAP_TOKENLEN) + +# Border router requirements +ifeq (,$(SLIP_UART)) + # set default (last available UART) + SLIP_UART="(UART_NUMOF-1)" +endif +ifeq (,$(SLIP_BAUDRATE)) + # set default + SLIP_BAUDRATE=115200 +endif + +CFLAGS += -DSLIPDEV_PARAM_UART=$(SLIP_UART) +CFLAGS += -DSLIPDEV_PARAM_BAUDRATE=$(SLIP_BAUDRATE) + +# Include packages that pull up and auto-init the link layer. +# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present +USEMODULE += netdev_default +USEMODULE += auto_init_gnrc_netif +# Specify the mandatory networking modules +USEMODULE += gcoap +# Add a routing protocol +USEMODULE += gnrc_rpl + +# Border router requirements +# Include SLIP package for IP over Serial communication +USEMODULE += slipdev +# Specify the mandatory networking modules for 6LoWPAN border router +USEMODULE += gnrc_sixlowpan_border_router_default +# Additional networking modules that can be dropped if not needed +USEMODULE += gnrc_icmpv6_echo + +# Required by gcoap example +USEMODULE += od +USEMODULE += fmt +# Add also the shell, some shell commands +USEMODULE += shell +USEMODULE += shell_cmds_default +USEMODULE += ps + +# Comment this out to disable code in RIOT that does safety checking +# which is not needed in a production environment but helps in the +# development process: +CFLAGS += -DDEVELHELP + +# Change this to 0 show compiler invocation lines by default: +QUIET ?= 1 + +include $(RIOTBASE)/Makefile.include diff --git a/examples/gcoap_dtls/README.md b/examples/networking/coap/gcoap_dtls/README.md similarity index 100% rename from examples/gcoap_dtls/README.md rename to examples/networking/coap/gcoap_dtls/README.md diff --git a/examples/networking/coap/gcoap_dtls/client.c b/examples/networking/coap/gcoap_dtls/client.c new file mode 100644 index 000000000000..a2b31ff04082 --- /dev/null +++ b/examples/networking/coap/gcoap_dtls/client.c @@ -0,0 +1,399 @@ +/* + * Copyright (c) 2015-2017 Ken Bannister. All rights reserved. + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup examples + * @{ + * + * @file + * @brief gcoap CLI support + * + * @author Ken Bannister + * @author Hauke Petersen + * @author Hendrik van Essen + * @author Fabian Hüßler + * + * @} + */ + +#include +#include +#include +#include +#include + +#include "net/gcoap.h" +#include "net/sock/udp.h" +#include "net/sock/util.h" +#include "od.h" +#include "uri_parser.h" + +#include "gcoap_example.h" + +#define ENABLE_DEBUG 0 +#include "debug.h" + +#if IS_USED(MODULE_GCOAP_DTLS) +#include "net/dsm.h" +#endif + +#ifndef CONFIG_URI_MAX +#define CONFIG_URI_MAX 128 +#endif + +static sock_udp_ep_t _proxy_remote; +static char _proxy_uri[CONFIG_URI_MAX]; + +/* Retain request URI to re-request if response includes block. User must not + * start a new request (with a new path) until any blockwise transfer + * completes or times out. */ +static char _last_req_uri[CONFIG_URI_MAX]; + +/* Last remote endpoint where an Observe request has been sent to */ +static sock_udp_ep_t obs_remote; + +/* the token used for observing a remote resource */ +static uint8_t obs_req_token[GCOAP_TOKENLEN_MAX]; + +/* actual length of above token */ +static size_t obs_req_tkl = 0; + +uint16_t req_count = 0; + +static gcoap_socket_type_t _get_tl(const char *uri); +static ssize_t _send(uint8_t *buf, size_t len, const sock_udp_ep_t *remote, + void *ctx, gcoap_socket_type_t tl); + +/* + * Response callback. + */ +static void _resp_handler(const gcoap_request_memo_t *memo, coap_pkt_t* pdu, + const sock_udp_ep_t *remote) +{ + (void)remote; /* not interested in the source currently */ + + if (memo->state == GCOAP_MEMO_TIMEOUT) { + printf("gcoap: timeout for msg ID %02u\n", coap_get_id(pdu)); + return; + } + else if (memo->state == GCOAP_MEMO_RESP_TRUNC) { + /* The right thing to do here would be to look into whether at least + * the options are complete, then to mentally trim the payload to the + * next block boundary and pretend it was sent as a Block2 of that + * size. */ + printf("gcoap: warning, incomplete response; continuing with the truncated payload\n"); + } + else if (memo->state != GCOAP_MEMO_RESP) { + printf("gcoap: error in response\n"); + return; + } + + coap_block1_t block; + if (coap_get_block2(pdu, &block) && block.blknum == 0) { + puts("--- blockwise start ---"); + } + + char *class_str = (coap_get_code_class(pdu) == COAP_CLASS_SUCCESS) + ? "Success" : "Error"; + printf("gcoap: response %s, code %1u.%02u", class_str, + coap_get_code_class(pdu), + coap_get_code_detail(pdu)); + if (pdu->payload_len) { + unsigned content_type = coap_get_content_type(pdu); + if (content_type == COAP_FORMAT_TEXT + || content_type == COAP_FORMAT_LINK + || coap_get_code_class(pdu) == COAP_CLASS_CLIENT_FAILURE + || coap_get_code_class(pdu) == COAP_CLASS_SERVER_FAILURE) { + /* Expecting diagnostic payload in failure cases */ + printf(", %u bytes\n%.*s\n", pdu->payload_len, pdu->payload_len, + (char *)pdu->payload); + } + else { + printf(", %u bytes\n", pdu->payload_len); + od_hex_dump(pdu->payload, pdu->payload_len, OD_WIDTH_DEFAULT); + } + } + else { + printf(", empty payload\n"); + } + + /* ask for next block if present */ + if (coap_get_block2(pdu, &block)) { + if (block.more) { + unsigned msg_type = coap_get_type(pdu); + if (block.blknum == 0 && !strlen(_last_req_uri)) { + puts("Path too long; can't complete blockwise"); + return; + } + uri_parser_result_t urip; + uri_parser_process(&urip, _last_req_uri, strlen(_last_req_uri)); + if (*_proxy_uri) { + gcoap_req_init(pdu, (uint8_t *)pdu->hdr, CONFIG_GCOAP_PDU_BUF_SIZE, + COAP_METHOD_GET, NULL); + } + else { + gcoap_req_init(pdu, (uint8_t *)pdu->hdr, CONFIG_GCOAP_PDU_BUF_SIZE, + COAP_METHOD_GET, urip.path); + } + + if (msg_type == COAP_TYPE_ACK) { + coap_hdr_set_type(pdu->hdr, COAP_TYPE_CON); + } + block.blknum++; + coap_opt_add_block2_control(pdu, &block); + + if (*_proxy_uri) { + coap_opt_add_proxy_uri(pdu, urip.scheme); + } + + int len = coap_opt_finish(pdu, COAP_OPT_FINISH_NONE); + gcoap_socket_type_t tl = _get_tl(*_proxy_uri ? _proxy_uri : _last_req_uri); + _send((uint8_t *)pdu->hdr, len, remote, memo->context, tl); + } + else { + puts("--- blockwise complete ---"); + } + } +} + +static gcoap_socket_type_t _get_tl(const char *uri) +{ + if (!strncmp(uri, "coaps", 5)) { + return GCOAP_SOCKET_TYPE_DTLS; + } + else if (!strncmp(uri, "coap", 4)) { + return GCOAP_SOCKET_TYPE_UDP; + } + return GCOAP_SOCKET_TYPE_UNDEF; +} + +static ssize_t _send(uint8_t *buf, size_t len, const sock_udp_ep_t *remote, + void *ctx, gcoap_socket_type_t tl) +{ + ssize_t bytes_sent = gcoap_req_send(buf, len, remote, NULL, _resp_handler, ctx, tl); + if (bytes_sent > 0) { + req_count++; + } + return bytes_sent; +} + +static int _print_usage(char **argv) +{ + printf("usage: %s [-c] [data]\n", argv[0]); + printf(" %s ping ://[:port]\n", argv[0]); + printf(" %s info\n", argv[0]); + printf(" %s proxy set ://[:port]\n", argv[0]); + printf(" %s proxy unset\n", argv[0]); + printf("Options\n"); + printf(" -c Send confirmably (defaults to non-confirmable)\n"); + printf(" -o include Observe registration option\n"); + printf(" -d include Observe deregistration option\n"); + return 1; +} + +static int _uristr2remote(const char *uri, sock_udp_ep_t *remote, const char **path, + char *buf, size_t buf_len) +{ + if (strlen(uri) >= buf_len) { + DEBUG_PUTS("URI too long"); + return 1; + } + uri_parser_result_t urip; + if (uri_parser_process(&urip, uri, strlen(uri))) { + DEBUG("'%s' is not a valid URI\n", uri); + return 1; + } + memcpy(buf, urip.host, urip.host_len); + buf[urip.host_len] = '\0'; + if (urip.port_str_len) { + strcat(buf, ":"); + strncat(buf, urip.port_str, urip.port_str_len); + buf[urip.host_len + 1 + urip.port_str_len] = '\0'; + } + if (sock_udp_name2ep(remote, buf) != 0) { + DEBUG("Could not resolve address '%s'\n", buf); + return -1; + } + if (remote->port == 0) { + remote->port = !strncmp("coaps", urip.scheme, 5) ? CONFIG_GCOAPS_PORT : CONFIG_GCOAP_PORT; + } + if (path) { + *path = urip.path; + } + strcpy(buf, uri); + return 0; +} + +int gcoap_cli_cmd(int argc, char **argv) +{ + /* Ordered like the RFC method code numbers, but off by 1. GET is code 0. */ + char *method_codes[] = {"ping", "get", "post", "put"}; + uint8_t buf[CONFIG_GCOAP_PDU_BUF_SIZE]; + coap_pkt_t pdu; + size_t len; + unsigned observe = false; + uint32_t obs_value = COAP_OBS_REGISTER; + sock_udp_ep_t remote; + + if (argc == 1) { + goto help; + } + + if (strcmp(argv[1], "info") == 0) { + uint8_t open_reqs = gcoap_op_state(); + + if (IS_USED(MODULE_GCOAP_DTLS)) { + printf("CoAP server is listening on port %u\n", CONFIG_GCOAPS_PORT); + } else { + printf("CoAP server is listening on port %u\n", CONFIG_GCOAP_PORT); + } +#if IS_USED(MODULE_GCOAP_DTLS) + printf("Connection secured with DTLS\n"); + printf("Free DTLS session slots: %d/%d\n", dsm_get_num_available_slots(), + dsm_get_num_maximum_slots()); +#endif + printf(" CLI requests sent: %u\n", req_count); + printf("CoAP open requests: %u\n", open_reqs); + printf("Configured Proxy: "); + if (*_proxy_uri) { + printf("%s\n", _proxy_uri); + } + else { + puts("None"); + } + return 0; + } + else if (strcmp(argv[1], "proxy") == 0) { + if ((argc == 4) && (strcmp(argv[2], "set") == 0)) { + if (_uristr2remote(argv[3], &_proxy_remote, NULL, _proxy_uri, sizeof(_proxy_uri))) { + puts("Could not set proxy"); + return 1; + } + return 0; + } + if ((argc == 3) && (strcmp(argv[2], "unset") == 0)) { + memset(&_proxy_remote, 0, sizeof(_proxy_remote)); + memset(_proxy_uri, 0, sizeof(_proxy_uri)); + return 0; + } + goto help; + } + + /* if not 'info' and 'proxy', must be a method code or ping */ + int code_pos = -1; + for (size_t i = 0; i < ARRAY_SIZE(method_codes) && code_pos == -1; i++) { + if (strcmp(argv[1], method_codes[i]) == 0) { + code_pos = i; + } + } + if (code_pos == -1) { + goto help; + } + + /* parse options */ + int apos = 2; /* position of address argument */ + + /* For GET requests additional switches allow for registering and + * deregistering an observe. This example only supports one observe. */ + if (code_pos == COAP_METHOD_GET) { + if (argc > apos) { + if (strcmp(argv[apos], "-o") == 0) { + observe = true; + apos++; + } + else if (strcmp(argv[apos], "-d") == 0) { + observe = true; + apos++; + obs_value = COAP_OBS_DEREGISTER; + } + } + } + + /* ping must be confirmable */ + unsigned msg_type = (!code_pos ? COAP_TYPE_CON : COAP_TYPE_NON); + if (argc > apos && strcmp(argv[apos], "-c") == 0) { + msg_type = COAP_TYPE_CON; + apos++; + } + if (apos < argc) { + const char *path; + if (_uristr2remote(argv[apos++], &remote, &path, _last_req_uri, sizeof(_last_req_uri))) { + puts("Could not parse URI"); + goto help; + } + gcoap_req_init(&pdu, buf, CONFIG_GCOAP_PDU_BUF_SIZE, code_pos, NULL); + + if (observe) { + coap_opt_add_uint(&pdu, COAP_OPT_OBSERVE, obs_value); + } + + if (!*_proxy_uri) { + /* If the request is not a ping, add uri path option separately + * (options must be added in order) */ + if (path) { + coap_opt_add_uri_path(&pdu, path); + } + } + + coap_hdr_set_type(pdu.hdr, msg_type); + + size_t paylen = 0; + if (apos < argc) { + coap_opt_add_format(&pdu, COAP_FORMAT_TEXT); + paylen = strlen(argv[apos]); + } + + if (*_proxy_uri) { + coap_opt_add_proxy_uri(&pdu, _last_req_uri); + } + + if (paylen) { + len = coap_opt_finish(&pdu, COAP_OPT_FINISH_PAYLOAD); + if (pdu.payload_len >= paylen) { + memcpy(pdu.payload, argv[apos++], paylen); + len += paylen; + } + else { + puts("gcoap_cli: msg buffer too small"); + return 1; + } + } + else { + len = coap_opt_finish(&pdu, COAP_OPT_FINISH_NONE); + } + + printf("gcoap_cli: sending msg ID %u, %" PRIuSIZE " bytes\n", + coap_get_id(&pdu), len); + gcoap_socket_type_t tl = _get_tl(_last_req_uri); + sock_udp_ep_t *rem = &remote; + if (*_proxy_uri) { + rem = &_proxy_remote; + tl = _get_tl(_proxy_uri); + } + if (_send(&buf[0], len, rem, NULL, tl) <= 0) { + puts("gcoap_cli: msg send failed"); + } + else { + if (observe) { + /* forget last Observe token, as only one can be stored in this example */ + gcoap_obs_req_forget(&obs_remote, obs_req_token, obs_req_tkl); + if (obs_value == COAP_OBS_REGISTER) { + obs_req_tkl = coap_get_token_len(&pdu); + /* backup the token of the initial observe registration */ + memcpy(obs_req_token, coap_get_token(&pdu), obs_req_tkl); + obs_remote = remote; + } + } + /* send Observe notification for /cli/stats */ + notify_observers(); + } + return 0; + } +help: + return _print_usage(argv); +} diff --git a/examples/networking/coap/gcoap_dtls/gcoap_example.h b/examples/networking/coap/gcoap_dtls/gcoap_example.h new file mode 100644 index 000000000000..eeb683904081 --- /dev/null +++ b/examples/networking/coap/gcoap_dtls/gcoap_example.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2020 Otto-von-Guericke-Universität Magdeburg + * + * This file is subject to the terms and conditions of the GNU Lesser General + * Public License v2.1. See the file LICENSE in the top level directory for more + * details. + */ + +/** + * @ingroup examples + * @{ + * + * @file + * @brief gcoap example + * + * @author Ken Bannister + */ + +#ifndef GCOAP_EXAMPLE_H +#define GCOAP_EXAMPLE_H + +#include +#include +#include +#include + +#include "fmt.h" +#include "net/gcoap.h" +#include "net/utils.h" +#include "od.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern uint16_t req_count; /**< Counts requests sent by CLI. */ + +/** + * @brief Shell interface exposing the client side features of gcoap + * @param argc Number of shell arguments (including shell command name) + * @param argv Shell argument values (including shell command name) + * @return Exit status of the shell command + */ +int gcoap_cli_cmd(int argc, char **argv); + +/** + * @brief Registers the CoAP resources exposed in the example app + * + * Run this exactly one during startup. + */ +void server_init(void); + +/** + * @brief Notifies all observers registered to /cli/stats - if any + * + * Call this whenever the count of successfully send client requests changes + */ +void notify_observers(void); + +#ifdef __cplusplus +} +#endif + +#endif /* GCOAP_EXAMPLE_H */ +/** @} */ diff --git a/examples/networking/coap/gcoap_dtls/main.c b/examples/networking/coap/gcoap_dtls/main.c new file mode 100644 index 000000000000..612b98af5f57 --- /dev/null +++ b/examples/networking/coap/gcoap_dtls/main.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2015-2016 Ken Bannister. All rights reserved. + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup examples + * @{ + * + * @file + * @brief gcoap example + * + * @author Ken Bannister + * + * @} + */ + +#include +#include "msg.h" + +#include "net/gcoap.h" +#include "shell.h" + +#include "gcoap_example.h" + +#define MAIN_QUEUE_SIZE (4) +static msg_t _main_msg_queue[MAIN_QUEUE_SIZE]; + +static const shell_command_t shell_commands[] = { + { "coap", "CoAP example", gcoap_cli_cmd }, + { NULL, NULL, NULL } +}; + +int main(void) +{ + /* for the thread running the shell */ + msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE); + server_init(); + puts("gcoap example app"); + + /* start shell */ + puts("All up, running the shell now"); + char line_buf[SHELL_DEFAULT_BUFSIZE]; + shell_run(shell_commands, line_buf, SHELL_DEFAULT_BUFSIZE); + + /* should never be reached */ + return 0; +} diff --git a/examples/networking/coap/gcoap_dtls/server.c b/examples/networking/coap/gcoap_dtls/server.c new file mode 100644 index 000000000000..b91ff5e419f6 --- /dev/null +++ b/examples/networking/coap/gcoap_dtls/server.c @@ -0,0 +1,277 @@ +/* + * Copyright (c) 2015-2017 Ken Bannister. All rights reserved. + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup examples + * @{ + * + * @file + * @brief gcoap CLI support + * + * @author Ken Bannister + * @author Hauke Petersen + * + * @} + */ + +#include +#include +#include +#include +#include + +#include "event/periodic_callback.h" +#include "event/thread.h" +#include "fmt.h" +#include "net/gcoap.h" +#include "net/utils.h" +#include "od.h" +#include "periph/rtc.h" +#include "time_units.h" + +#include "gcoap_example.h" + +#define ENABLE_DEBUG 0 +#include "debug.h" + +#if IS_USED(MODULE_GCOAP_DTLS) +#include "net/credman.h" +#include "net/dsm.h" +#include "tinydtls_keys.h" + +/* Example credential tag for credman. Tag together with the credential type needs to be unique. */ +#define GCOAP_DTLS_CREDENTIAL_TAG 10 + +static const uint8_t psk_id_0[] = PSK_DEFAULT_IDENTITY; +static const uint8_t psk_key_0[] = PSK_DEFAULT_KEY; +static const credman_credential_t credential = { + .type = CREDMAN_TYPE_PSK, + .tag = GCOAP_DTLS_CREDENTIAL_TAG, + .params = { + .psk = { + .key = { .s = psk_key_0, .len = sizeof(psk_key_0) - 1, }, + .id = { .s = psk_id_0, .len = sizeof(psk_id_0) - 1, }, + } + }, +}; +#endif + +static ssize_t _encode_link(const coap_resource_t *resource, char *buf, + size_t maxlen, coap_link_encoder_ctx_t *context); +static ssize_t _stats_handler(coap_pkt_t* pdu, uint8_t *buf, size_t len, coap_request_ctx_t *ctx); +static ssize_t _riot_board_handler(coap_pkt_t* pdu, uint8_t *buf, size_t len, coap_request_ctx_t *ctx); +#if IS_USED(MODULE_PERIPH_RTC) +static ssize_t _rtc_handler(coap_pkt_t* pdu, uint8_t *buf, size_t len, coap_request_ctx_t *ctx); +#endif + +/* CoAP resources. Must be sorted by path (ASCII order). */ +static const coap_resource_t _resources[] = { + { "/cli/stats", COAP_GET | COAP_PUT, _stats_handler, NULL }, + { "/riot/board", COAP_GET, _riot_board_handler, NULL }, +#if IS_USED(MODULE_PERIPH_RTC) + { "/rtc", COAP_GET, _rtc_handler, NULL }, +#endif +}; + +static const char *_link_params[] = { + ";ct=0;rt=\"count\";obs", + NULL +}; + +static gcoap_listener_t _listener = { + &_resources[0], + ARRAY_SIZE(_resources), + GCOAP_SOCKET_TYPE_UNDEF, + _encode_link, + NULL, + NULL +}; + + +/* Adds link format params to resource list */ +static ssize_t _encode_link(const coap_resource_t *resource, char *buf, + size_t maxlen, coap_link_encoder_ctx_t *context) { + ssize_t res = gcoap_encode_link(resource, buf, maxlen, context); + if (res > 0) { + if (_link_params[context->link_pos] + && (strlen(_link_params[context->link_pos]) < (maxlen - res))) { + if (buf) { + memcpy(buf+res, _link_params[context->link_pos], + strlen(_link_params[context->link_pos])); + } + return res + strlen(_link_params[context->link_pos]); + } + } + + return res; +} + +#if IS_USED(MODULE_PERIPH_RTC) +static void _rtc_notify_observers(void *arg) +{ + (void)arg; + struct tm tm_now; + if (rtc_get_time(&tm_now)) { + DEBUG_PUTS("gcoap_server: RTC error"); + return; + } + size_t len; + char str_time[20] = ""; + uint8_t buf[sizeof(coap_hdr_t) + COAP_TOKEN_LENGTH_MAX + 1 + sizeof(str_time)]; + coap_pkt_t pdu; + const coap_resource_t *rtc_resource = NULL; + const gcoap_listener_t *listener = NULL; + while ((rtc_resource = gcoap_get_resource_by_path_iterator(&listener, rtc_resource, "/rtc"))) { + if (!strcmp(rtc_resource->path, "/rtc")) { + break; /* exact match */ + } + } + if (rtc_resource) { + switch (gcoap_obs_init(&pdu, buf, sizeof(buf), rtc_resource)) { + case GCOAP_OBS_INIT_OK: + len = coap_opt_finish(&pdu, COAP_OPT_FINISH_PAYLOAD); + memcpy(pdu.payload, str_time, strftime(str_time, sizeof(str_time), "%Y-%m-%d %H:%M:%S", &tm_now)); + pdu.payload_len = strlen(str_time); + len += pdu.payload_len; + if (!gcoap_obs_send(buf, len, rtc_resource)) { + DEBUG_PUTS("gcoap_server: cannot send /rtc notification"); + } + break; + case GCOAP_OBS_INIT_UNUSED: + DEBUG_PUTS("gcoap_server: no observer for /rtc"); + break; + case GCOAP_OBS_INIT_ERR: + DEBUG_PUTS("gcoap_server: error initializing /rtc notification"); + break; + } + } +} + +static ssize_t _rtc_handler(coap_pkt_t* pdu, uint8_t *buf, size_t len, coap_request_ctx_t *ctx) +{ + (void)ctx; + struct tm tm_now; + rtc_get_time(&tm_now); + gcoap_resp_init(pdu, buf, len, COAP_CODE_CONTENT); + size_t resp_len = coap_opt_finish(pdu, COAP_OPT_FINISH_PAYLOAD); + char str_time[20] = ""; + memcpy(pdu->payload, str_time, strftime(str_time, sizeof(str_time), "%Y-%m-%d %H:%M:%S", &tm_now)); + pdu->payload_len = strlen(str_time); + resp_len += pdu->payload_len; + return resp_len; +} +#endif + +/* + * Server callback for /cli/stats. Accepts either a GET or a PUT. + * + * GET: Returns the count of packets sent by the CLI. + * PUT: Updates the count of packets. Rejects an obviously bad request, but + * allows any two byte value for example purposes. Semantically, the only + * valid action is to set the value to 0. + */ +static ssize_t _stats_handler(coap_pkt_t* pdu, uint8_t *buf, size_t len, coap_request_ctx_t *ctx) +{ + (void)ctx; + + /* read coap method type in packet */ + unsigned method_flag = coap_method2flag(coap_get_code_detail(pdu)); + + switch (method_flag) { + case COAP_GET: + gcoap_resp_init(pdu, buf, len, COAP_CODE_CONTENT); + coap_opt_add_format(pdu, COAP_FORMAT_TEXT); + size_t resp_len = coap_opt_finish(pdu, COAP_OPT_FINISH_PAYLOAD); + + /* write the response buffer with the request count value */ + resp_len += fmt_u16_dec((char *)pdu->payload, req_count); + return resp_len; + + case COAP_PUT: + /* convert the payload to an integer and update the internal + value */ + if (pdu->payload_len <= 5) { + char payload[6] = { 0 }; + memcpy(payload, (char *)pdu->payload, pdu->payload_len); + req_count = (uint16_t)strtoul(payload, NULL, 10); + return gcoap_response(pdu, buf, len, COAP_CODE_CHANGED); + } + else { + return gcoap_response(pdu, buf, len, COAP_CODE_BAD_REQUEST); + } + } + + return 0; +} + +static ssize_t _riot_board_handler(coap_pkt_t *pdu, uint8_t *buf, size_t len, coap_request_ctx_t *ctx) +{ + (void)ctx; + gcoap_resp_init(pdu, buf, len, COAP_CODE_CONTENT); + coap_opt_add_format(pdu, COAP_FORMAT_TEXT); + size_t resp_len = coap_opt_finish(pdu, COAP_OPT_FINISH_PAYLOAD); + + /* write the RIOT board name in the response buffer */ + if (pdu->payload_len >= strlen(RIOT_BOARD)) { + memcpy(pdu->payload, RIOT_BOARD, strlen(RIOT_BOARD)); + return resp_len + strlen(RIOT_BOARD); + } + else { + puts("gcoap_cli: msg buffer too small"); + return gcoap_response(pdu, buf, len, COAP_CODE_INTERNAL_SERVER_ERROR); + } +} + +void notify_observers(void) +{ + size_t len; + uint8_t buf[CONFIG_GCOAP_PDU_BUF_SIZE]; + coap_pkt_t pdu; + + /* send Observe notification for /cli/stats */ + switch (gcoap_obs_init(&pdu, &buf[0], CONFIG_GCOAP_PDU_BUF_SIZE, + &_resources[0])) { + case GCOAP_OBS_INIT_OK: + DEBUG("gcoap_cli: creating /cli/stats notification\n"); + coap_opt_add_format(&pdu, COAP_FORMAT_TEXT); + len = coap_opt_finish(&pdu, COAP_OPT_FINISH_PAYLOAD); + len += fmt_u16_dec((char *)pdu.payload, req_count); + gcoap_obs_send(&buf[0], len, &_resources[0]); + break; + case GCOAP_OBS_INIT_UNUSED: + DEBUG("gcoap_cli: no observer for /cli/stats\n"); + break; + case GCOAP_OBS_INIT_ERR: + DEBUG("gcoap_cli: error initializing /cli/stats notification\n"); + break; + } +} + +void server_init(void) +{ +#if IS_USED(MODULE_GCOAP_DTLS) + int res = credman_add(&credential); + if (res < 0 && res != CREDMAN_EXIST) { + /* ignore duplicate credentials */ + printf("gcoap: cannot add credential to system: %d\n", res); + return; + } + sock_dtls_t *gcoap_sock_dtls = gcoap_get_sock_dtls(); + res = sock_dtls_add_credential(gcoap_sock_dtls, GCOAP_DTLS_CREDENTIAL_TAG); + if (res < 0) { + printf("gcoap: cannot add credential to DTLS sock: %d\n", res); + } +#endif + + gcoap_register_listener(&_listener); +#if IS_USED(MODULE_PERIPH_RTC) + static event_periodic_callback_t _ev_pcb_rtc; + event_periodic_callback_init(&_ev_pcb_rtc, ZTIMER_MSEC, EVENT_PRIO_MEDIUM, _rtc_notify_observers, NULL); + event_periodic_callback_start(&_ev_pcb_rtc, 10 * MS_PER_SEC); +#endif +} diff --git a/examples/gcoap_dtls/tinydtls_keys.h b/examples/networking/coap/gcoap_dtls/tinydtls_keys.h similarity index 100% rename from examples/gcoap_dtls/tinydtls_keys.h rename to examples/networking/coap/gcoap_dtls/tinydtls_keys.h diff --git a/examples/gcoap_fileserver/Makefile b/examples/networking/coap/gcoap_fileserver/Makefile similarity index 96% rename from examples/gcoap_fileserver/Makefile rename to examples/networking/coap/gcoap_fileserver/Makefile index 93a0f334ebfb..2c39eb9f787a 100644 --- a/examples/gcoap_fileserver/Makefile +++ b/examples/networking/coap/gcoap_fileserver/Makefile @@ -5,7 +5,7 @@ APPLICATION = gcoap_fileserver 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 diff --git a/examples/gcoap_fileserver/Makefile.ci b/examples/networking/coap/gcoap_fileserver/Makefile.ci similarity index 100% rename from examples/gcoap_fileserver/Makefile.ci rename to examples/networking/coap/gcoap_fileserver/Makefile.ci diff --git a/examples/gcoap_fileserver/README.md b/examples/networking/coap/gcoap_fileserver/README.md similarity index 100% rename from examples/gcoap_fileserver/README.md rename to examples/networking/coap/gcoap_fileserver/README.md diff --git a/examples/gcoap_fileserver/main.c b/examples/networking/coap/gcoap_fileserver/main.c similarity index 100% rename from examples/gcoap_fileserver/main.c rename to examples/networking/coap/gcoap_fileserver/main.c diff --git a/examples/nanocoap_server/Makefile b/examples/networking/coap/nanocoap_server/Makefile similarity index 98% rename from examples/nanocoap_server/Makefile rename to examples/networking/coap/nanocoap_server/Makefile index 2b418732cbdf..667911bc2475 100644 --- a/examples/nanocoap_server/Makefile +++ b/examples/networking/coap/nanocoap_server/Makefile @@ -5,7 +5,7 @@ APPLICATION = nanocoap_server 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 diff --git a/examples/nanocoap_server/Makefile.ci b/examples/networking/coap/nanocoap_server/Makefile.ci similarity index 100% rename from examples/nanocoap_server/Makefile.ci rename to examples/networking/coap/nanocoap_server/Makefile.ci diff --git a/examples/nanocoap_server/README.md b/examples/networking/coap/nanocoap_server/README.md similarity index 100% rename from examples/nanocoap_server/README.md rename to examples/networking/coap/nanocoap_server/README.md diff --git a/examples/nanocoap_server/coap_handler.c b/examples/networking/coap/nanocoap_server/coap_handler.c similarity index 100% rename from examples/nanocoap_server/coap_handler.c rename to examples/networking/coap/nanocoap_server/coap_handler.c diff --git a/examples/nanocoap_server/main.c b/examples/networking/coap/nanocoap_server/main.c similarity index 100% rename from examples/nanocoap_server/main.c rename to examples/networking/coap/nanocoap_server/main.c diff --git a/examples/cord_ep/Makefile b/examples/networking/core_resource_directory/cord_ep/Makefile similarity index 96% rename from examples/cord_ep/Makefile rename to examples/networking/core_resource_directory/cord_ep/Makefile index 044764ea63d9..6ea5869e7c99 100644 --- a/examples/cord_ep/Makefile +++ b/examples/networking/core_resource_directory/cord_ep/Makefile @@ -5,7 +5,7 @@ APPLICATION = cord_ep BOARD ?= native # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../../.. USEMODULE += netdev_default USEMODULE += auto_init_gnrc_netif diff --git a/examples/cord_ep/Makefile.ci b/examples/networking/core_resource_directory/cord_ep/Makefile.ci similarity index 100% rename from examples/cord_ep/Makefile.ci rename to examples/networking/core_resource_directory/cord_ep/Makefile.ci diff --git a/examples/cord_ep/README.md b/examples/networking/core_resource_directory/cord_ep/README.md similarity index 100% rename from examples/cord_ep/README.md rename to examples/networking/core_resource_directory/cord_ep/README.md diff --git a/examples/cord_ep/main.c b/examples/networking/core_resource_directory/cord_ep/main.c similarity index 100% rename from examples/cord_ep/main.c rename to examples/networking/core_resource_directory/cord_ep/main.c diff --git a/examples/cord_epsim/Makefile b/examples/networking/core_resource_directory/cord_epsim/Makefile similarity index 97% rename from examples/cord_epsim/Makefile rename to examples/networking/core_resource_directory/cord_epsim/Makefile index 1efba67ef36d..86d6a2eb8fb5 100644 --- a/examples/cord_epsim/Makefile +++ b/examples/networking/core_resource_directory/cord_epsim/Makefile @@ -5,7 +5,7 @@ APPLICATION = cord_epsim BOARD ?= native # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../../.. # Enable GNRC networking USEMODULE += netdev_default diff --git a/examples/cord_epsim/Makefile.ci b/examples/networking/core_resource_directory/cord_epsim/Makefile.ci similarity index 100% rename from examples/cord_epsim/Makefile.ci rename to examples/networking/core_resource_directory/cord_epsim/Makefile.ci diff --git a/examples/cord_epsim/README.md b/examples/networking/core_resource_directory/cord_epsim/README.md similarity index 100% rename from examples/cord_epsim/README.md rename to examples/networking/core_resource_directory/cord_epsim/README.md diff --git a/examples/cord_epsim/main.c b/examples/networking/core_resource_directory/cord_epsim/main.c similarity index 100% rename from examples/cord_epsim/main.c rename to examples/networking/core_resource_directory/cord_epsim/main.c diff --git a/examples/cord_lc/Makefile b/examples/networking/core_resource_directory/cord_lc/Makefile similarity index 96% rename from examples/cord_lc/Makefile rename to examples/networking/core_resource_directory/cord_lc/Makefile index 3bcc0e6de9cd..f32bc3333592 100644 --- a/examples/cord_lc/Makefile +++ b/examples/networking/core_resource_directory/cord_lc/Makefile @@ -5,7 +5,7 @@ APPLICATION = cord_lc BOARD ?= native # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../../.. USEMODULE += netdev_default USEMODULE += auto_init_gnrc_netif diff --git a/examples/cord_lc/Makefile.ci b/examples/networking/core_resource_directory/cord_lc/Makefile.ci similarity index 100% rename from examples/cord_lc/Makefile.ci rename to examples/networking/core_resource_directory/cord_lc/Makefile.ci diff --git a/examples/cord_lc/README.md b/examples/networking/core_resource_directory/cord_lc/README.md similarity index 100% rename from examples/cord_lc/README.md rename to examples/networking/core_resource_directory/cord_lc/README.md diff --git a/examples/cord_lc/cord_lc_cli.c b/examples/networking/core_resource_directory/cord_lc/cord_lc_cli.c similarity index 100% rename from examples/cord_lc/cord_lc_cli.c rename to examples/networking/core_resource_directory/cord_lc/cord_lc_cli.c diff --git a/examples/cord_lc/main.c b/examples/networking/core_resource_directory/cord_lc/main.c similarity index 100% rename from examples/cord_lc/main.c rename to examples/networking/core_resource_directory/cord_lc/main.c diff --git a/examples/dtls-echo/Makefile b/examples/networking/dtls/dtls-echo/Makefile similarity index 98% rename from examples/dtls-echo/Makefile rename to examples/networking/dtls/dtls-echo/Makefile index cd9f8d3054f7..1e00e593f2cf 100644 --- a/examples/dtls-echo/Makefile +++ b/examples/networking/dtls/dtls-echo/Makefile @@ -5,7 +5,7 @@ APPLICATION = dtls_echo 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 diff --git a/examples/dtls-echo/Makefile.ci b/examples/networking/dtls/dtls-echo/Makefile.ci similarity index 100% rename from examples/dtls-echo/Makefile.ci rename to examples/networking/dtls/dtls-echo/Makefile.ci diff --git a/examples/dtls-echo/README.md b/examples/networking/dtls/dtls-echo/README.md similarity index 100% rename from examples/dtls-echo/README.md rename to examples/networking/dtls/dtls-echo/README.md diff --git a/examples/dtls-echo/dtls-client.c b/examples/networking/dtls/dtls-echo/dtls-client.c similarity index 100% rename from examples/dtls-echo/dtls-client.c rename to examples/networking/dtls/dtls-echo/dtls-client.c diff --git a/examples/dtls-echo/dtls-server.c b/examples/networking/dtls/dtls-echo/dtls-server.c similarity index 100% rename from examples/dtls-echo/dtls-server.c rename to examples/networking/dtls/dtls-echo/dtls-server.c diff --git a/examples/dtls-echo/main.c b/examples/networking/dtls/dtls-echo/main.c similarity index 100% rename from examples/dtls-echo/main.c rename to examples/networking/dtls/dtls-echo/main.c diff --git a/examples/dtls-echo/tinydtls_keys.h b/examples/networking/dtls/dtls-echo/tinydtls_keys.h similarity index 100% rename from examples/dtls-echo/tinydtls_keys.h rename to examples/networking/dtls/dtls-echo/tinydtls_keys.h diff --git a/examples/dtls-sock/Makefile b/examples/networking/dtls/dtls-sock/Makefile similarity index 98% rename from examples/dtls-sock/Makefile rename to examples/networking/dtls/dtls-sock/Makefile index 10b264d84268..6135900c6285 100644 --- a/examples/dtls-sock/Makefile +++ b/examples/networking/dtls/dtls-sock/Makefile @@ -5,7 +5,7 @@ APPLICATION = dtls_sock 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 diff --git a/examples/dtls-sock/Makefile.ci b/examples/networking/dtls/dtls-sock/Makefile.ci similarity index 100% rename from examples/dtls-sock/Makefile.ci rename to examples/networking/dtls/dtls-sock/Makefile.ci diff --git a/examples/dtls-sock/README.md b/examples/networking/dtls/dtls-sock/README.md similarity index 100% rename from examples/dtls-sock/README.md rename to examples/networking/dtls/dtls-sock/README.md diff --git a/examples/dtls-sock/dtls-client.c b/examples/networking/dtls/dtls-sock/dtls-client.c similarity index 100% rename from examples/dtls-sock/dtls-client.c rename to examples/networking/dtls/dtls-sock/dtls-client.c diff --git a/examples/dtls-sock/dtls-server.c b/examples/networking/dtls/dtls-sock/dtls-server.c similarity index 100% rename from examples/dtls-sock/dtls-server.c rename to examples/networking/dtls/dtls-sock/dtls-server.c diff --git a/examples/dtls-sock/dtls_client_credentials.h b/examples/networking/dtls/dtls-sock/dtls_client_credentials.h similarity index 100% rename from examples/dtls-sock/dtls_client_credentials.h rename to examples/networking/dtls/dtls-sock/dtls_client_credentials.h diff --git a/examples/dtls-sock/dtls_server_credentials.h b/examples/networking/dtls/dtls-sock/dtls_server_credentials.h similarity index 100% rename from examples/dtls-sock/dtls_server_credentials.h rename to examples/networking/dtls/dtls-sock/dtls_server_credentials.h diff --git a/examples/dtls-sock/main.c b/examples/networking/dtls/dtls-sock/main.c similarity index 100% rename from examples/dtls-sock/main.c rename to examples/networking/dtls/dtls-sock/main.c diff --git a/examples/dtls-wolfssl/Makefile b/examples/networking/dtls/dtls-wolfssl/Makefile similarity index 97% rename from examples/dtls-wolfssl/Makefile rename to examples/networking/dtls/dtls-wolfssl/Makefile index cbfc1db36cf4..9531840f3bbb 100644 --- a/examples/dtls-wolfssl/Makefile +++ b/examples/networking/dtls/dtls-wolfssl/Makefile @@ -5,7 +5,7 @@ APPLICATION = dtls_wolfssl 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 diff --git a/examples/dtls-wolfssl/Makefile.ci b/examples/networking/dtls/dtls-wolfssl/Makefile.ci similarity index 100% rename from examples/dtls-wolfssl/Makefile.ci rename to examples/networking/dtls/dtls-wolfssl/Makefile.ci diff --git a/examples/dtls-wolfssl/README.md b/examples/networking/dtls/dtls-wolfssl/README.md similarity index 100% rename from examples/dtls-wolfssl/README.md rename to examples/networking/dtls/dtls-wolfssl/README.md diff --git a/examples/dtls-wolfssl/cert.c b/examples/networking/dtls/dtls-wolfssl/cert.c similarity index 100% rename from examples/dtls-wolfssl/cert.c rename to examples/networking/dtls/dtls-wolfssl/cert.c diff --git a/examples/dtls-wolfssl/dtls-client.c b/examples/networking/dtls/dtls-wolfssl/dtls-client.c similarity index 100% rename from examples/dtls-wolfssl/dtls-client.c rename to examples/networking/dtls/dtls-wolfssl/dtls-client.c diff --git a/examples/dtls-wolfssl/dtls-server.c b/examples/networking/dtls/dtls-wolfssl/dtls-server.c similarity index 100% rename from examples/dtls-wolfssl/dtls-server.c rename to examples/networking/dtls/dtls-wolfssl/dtls-server.c diff --git a/examples/dtls-wolfssl/main.c b/examples/networking/dtls/dtls-wolfssl/main.c similarity index 100% rename from examples/dtls-wolfssl/main.c rename to examples/networking/dtls/dtls-wolfssl/main.c diff --git a/examples/gnrc_border_router/Kconfig b/examples/networking/gnrc_networking/gnrc_border_router/Kconfig similarity index 100% rename from examples/gnrc_border_router/Kconfig rename to examples/networking/gnrc_networking/gnrc_border_router/Kconfig diff --git a/examples/gnrc_border_router/Makefile b/examples/networking/gnrc_networking/gnrc_border_router/Makefile similarity index 99% rename from examples/gnrc_border_router/Makefile rename to examples/networking/gnrc_networking/gnrc_border_router/Makefile index c52d31ce92bf..9f770f304cf4 100644 --- a/examples/gnrc_border_router/Makefile +++ b/examples/networking/gnrc_networking/gnrc_border_router/Makefile @@ -5,7 +5,7 @@ APPLICATION = gnrc_border_router BOARD ?= native # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../../.. # Default to using ethos for providing the uplink when not on native UPLINK ?= ethos diff --git a/examples/gnrc_border_router/Makefile.board.dep b/examples/networking/gnrc_networking/gnrc_border_router/Makefile.board.dep similarity index 100% rename from examples/gnrc_border_router/Makefile.board.dep rename to examples/networking/gnrc_networking/gnrc_border_router/Makefile.board.dep diff --git a/examples/gnrc_border_router/Makefile.cdc-ecm.conf b/examples/networking/gnrc_networking/gnrc_border_router/Makefile.cdc-ecm.conf similarity index 100% rename from examples/gnrc_border_router/Makefile.cdc-ecm.conf rename to examples/networking/gnrc_networking/gnrc_border_router/Makefile.cdc-ecm.conf diff --git a/examples/gnrc_border_router/Makefile.ci b/examples/networking/gnrc_networking/gnrc_border_router/Makefile.ci similarity index 100% rename from examples/gnrc_border_router/Makefile.ci rename to examples/networking/gnrc_networking/gnrc_border_router/Makefile.ci diff --git a/examples/gnrc_border_router/Makefile.ethos.conf b/examples/networking/gnrc_networking/gnrc_border_router/Makefile.ethos.conf similarity index 100% rename from examples/gnrc_border_router/Makefile.ethos.conf rename to examples/networking/gnrc_networking/gnrc_border_router/Makefile.ethos.conf diff --git a/examples/gnrc_border_router/Makefile.native.conf b/examples/networking/gnrc_networking/gnrc_border_router/Makefile.native.conf similarity index 100% rename from examples/gnrc_border_router/Makefile.native.conf rename to examples/networking/gnrc_networking/gnrc_border_router/Makefile.native.conf diff --git a/examples/gnrc_border_router/Makefile.slip.conf b/examples/networking/gnrc_networking/gnrc_border_router/Makefile.slip.conf similarity index 100% rename from examples/gnrc_border_router/Makefile.slip.conf rename to examples/networking/gnrc_networking/gnrc_border_router/Makefile.slip.conf diff --git a/examples/gnrc_border_router/Makefile.wifi.conf b/examples/networking/gnrc_networking/gnrc_border_router/Makefile.wifi.conf similarity index 100% rename from examples/gnrc_border_router/Makefile.wifi.conf rename to examples/networking/gnrc_networking/gnrc_border_router/Makefile.wifi.conf diff --git a/examples/gnrc_border_router/README.md b/examples/networking/gnrc_networking/gnrc_border_router/README.md similarity index 100% rename from examples/gnrc_border_router/README.md rename to examples/networking/gnrc_networking/gnrc_border_router/README.md diff --git a/examples/gnrc_border_router/main.c b/examples/networking/gnrc_networking/gnrc_border_router/main.c similarity index 100% rename from examples/gnrc_border_router/main.c rename to examples/networking/gnrc_networking/gnrc_border_router/main.c diff --git a/examples/gnrc_lorawan/Makefile b/examples/networking/gnrc_networking/gnrc_lorawan/Makefile similarity index 100% rename from examples/gnrc_lorawan/Makefile rename to examples/networking/gnrc_networking/gnrc_lorawan/Makefile diff --git a/examples/gnrc_lorawan/Makefile.ci b/examples/networking/gnrc_networking/gnrc_lorawan/Makefile.ci similarity index 100% rename from examples/gnrc_lorawan/Makefile.ci rename to examples/networking/gnrc_networking/gnrc_lorawan/Makefile.ci diff --git a/examples/gnrc_lorawan/README.md b/examples/networking/gnrc_networking/gnrc_lorawan/README.md similarity index 100% rename from examples/gnrc_lorawan/README.md rename to examples/networking/gnrc_networking/gnrc_lorawan/README.md diff --git a/examples/gnrc_lorawan/main.c b/examples/networking/gnrc_networking/gnrc_lorawan/main.c similarity index 100% rename from examples/gnrc_lorawan/main.c rename to examples/networking/gnrc_networking/gnrc_lorawan/main.c diff --git a/examples/gnrc_minimal/Makefile b/examples/networking/gnrc_networking/gnrc_minimal/Makefile similarity index 97% rename from examples/gnrc_minimal/Makefile rename to examples/networking/gnrc_networking/gnrc_minimal/Makefile index dccd151fb361..26ee9b2aa4c0 100644 --- a/examples/gnrc_minimal/Makefile +++ b/examples/networking/gnrc_networking/gnrc_minimal/Makefile @@ -5,7 +5,7 @@ APPLICATION = gnrc_minimal BOARD ?= native # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../../.. # Set this to 1 to enable code in RIOT that does safety checking # which is not needed in a production environment but helps in the diff --git a/examples/gnrc_minimal/Makefile.ci b/examples/networking/gnrc_networking/gnrc_minimal/Makefile.ci similarity index 100% rename from examples/gnrc_minimal/Makefile.ci rename to examples/networking/gnrc_networking/gnrc_minimal/Makefile.ci diff --git a/examples/gnrc_minimal/Makefile.gnu.dep b/examples/networking/gnrc_networking/gnrc_minimal/Makefile.gnu.dep similarity index 100% rename from examples/gnrc_minimal/Makefile.gnu.dep rename to examples/networking/gnrc_networking/gnrc_minimal/Makefile.gnu.dep diff --git a/examples/gnrc_minimal/README.md b/examples/networking/gnrc_networking/gnrc_minimal/README.md similarity index 100% rename from examples/gnrc_minimal/README.md rename to examples/networking/gnrc_networking/gnrc_minimal/README.md diff --git a/examples/gnrc_minimal/main.c b/examples/networking/gnrc_networking/gnrc_minimal/main.c similarity index 100% rename from examples/gnrc_minimal/main.c rename to examples/networking/gnrc_networking/gnrc_minimal/main.c diff --git a/examples/gnrc_networking/Makefile b/examples/networking/gnrc_networking/gnrc_networking/Makefile similarity index 98% rename from examples/gnrc_networking/Makefile rename to examples/networking/gnrc_networking/gnrc_networking/Makefile index 555b89eee55e..ab0c68f7d42d 100644 --- a/examples/gnrc_networking/Makefile +++ b/examples/networking/gnrc_networking/gnrc_networking/Makefile @@ -5,7 +5,7 @@ APPLICATION = gnrc_networking 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 diff --git a/examples/gnrc_networking/Makefile.ci b/examples/networking/gnrc_networking/gnrc_networking/Makefile.ci similarity index 100% rename from examples/gnrc_networking/Makefile.ci rename to examples/networking/gnrc_networking/gnrc_networking/Makefile.ci diff --git a/examples/gnrc_networking/README.md b/examples/networking/gnrc_networking/gnrc_networking/README.md similarity index 100% rename from examples/gnrc_networking/README.md rename to examples/networking/gnrc_networking/gnrc_networking/README.md diff --git a/examples/gnrc_networking/main.c b/examples/networking/gnrc_networking/gnrc_networking/main.c similarity index 100% rename from examples/gnrc_networking/main.c rename to examples/networking/gnrc_networking/gnrc_networking/main.c diff --git a/examples/gnrc_networking_mac/Makefile b/examples/networking/gnrc_networking/gnrc_networking_mac/Makefile similarity index 98% rename from examples/gnrc_networking_mac/Makefile rename to examples/networking/gnrc_networking/gnrc_networking_mac/Makefile index a3ce6a3758ed..89ae3eea06e0 100644 --- a/examples/gnrc_networking_mac/Makefile +++ b/examples/networking/gnrc_networking/gnrc_networking_mac/Makefile @@ -13,7 +13,7 @@ BOARD ?= samr21-xpro BOARD_WHITELIST := samr21-xpro iotlab-m3 avr-rss2 atmega256rfr2-xpro derfmega256 # 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 diff --git a/examples/gnrc_networking_mac/README.md b/examples/networking/gnrc_networking/gnrc_networking_mac/README.md similarity index 100% rename from examples/gnrc_networking_mac/README.md rename to examples/networking/gnrc_networking/gnrc_networking_mac/README.md diff --git a/examples/gnrc_networking_mac/mac.c b/examples/networking/gnrc_networking/gnrc_networking_mac/mac.c similarity index 100% rename from examples/gnrc_networking_mac/mac.c rename to examples/networking/gnrc_networking/gnrc_networking_mac/mac.c diff --git a/examples/gnrc_networking_mac/main.c b/examples/networking/gnrc_networking/gnrc_networking_mac/main.c similarity index 100% rename from examples/gnrc_networking_mac/main.c rename to examples/networking/gnrc_networking/gnrc_networking_mac/main.c diff --git a/examples/gnrc_networking_mac/udp.c b/examples/networking/gnrc_networking/gnrc_networking_mac/udp.c similarity index 100% rename from examples/gnrc_networking_mac/udp.c rename to examples/networking/gnrc_networking/gnrc_networking_mac/udp.c diff --git a/examples/gnrc_networking_subnets/Makefile b/examples/networking/gnrc_networking/gnrc_networking_subnets/Makefile similarity index 97% rename from examples/gnrc_networking_subnets/Makefile rename to examples/networking/gnrc_networking/gnrc_networking_subnets/Makefile index 25fae85a19d0..22de3e669263 100644 --- a/examples/gnrc_networking_subnets/Makefile +++ b/examples/networking/gnrc_networking/gnrc_networking_subnets/Makefile @@ -5,7 +5,7 @@ APPLICATION = gnrc_networking-subnets 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. USEMODULE += netdev_default diff --git a/examples/gnrc_networking_subnets/Makefile.ci b/examples/networking/gnrc_networking/gnrc_networking_subnets/Makefile.ci similarity index 100% rename from examples/gnrc_networking_subnets/Makefile.ci rename to examples/networking/gnrc_networking/gnrc_networking_subnets/Makefile.ci diff --git a/examples/gnrc_networking_subnets/README.md b/examples/networking/gnrc_networking/gnrc_networking_subnets/README.md similarity index 100% rename from examples/gnrc_networking_subnets/README.md rename to examples/networking/gnrc_networking/gnrc_networking_subnets/README.md diff --git a/examples/networking/gnrc_networking/gnrc_networking_subnets/main.c b/examples/networking/gnrc_networking/gnrc_networking_subnets/main.c new file mode 100644 index 000000000000..734ae420671e --- /dev/null +++ b/examples/networking/gnrc_networking/gnrc_networking_subnets/main.c @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2015 Freie Universität Berlin + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup examples + * @{ + * + * @file + * @brief Example application for demonstrating the RIOT network stack + * + * @author Hauke Petersen + * + * @} + */ + +#include + +#include "shell.h" +#include "msg.h" + +#define MAIN_QUEUE_SIZE (8) +static msg_t _main_msg_queue[MAIN_QUEUE_SIZE]; + +int main(void) +{ + /* we need a message queue for the thread running the shell in order to + * receive potentially fast incoming networking packets */ + msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE); + puts("RIOT network stack example application"); + + /* start shell */ + puts("All up, running the shell now"); + char line_buf[SHELL_DEFAULT_BUFSIZE]; + shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE); + + /* should be never reached */ + return 0; +} diff --git a/examples/gnrc_networking_subnets/setup_taps.sh b/examples/networking/gnrc_networking/gnrc_networking_subnets/setup_taps.sh similarity index 100% rename from examples/gnrc_networking_subnets/setup_taps.sh rename to examples/networking/gnrc_networking/gnrc_networking_subnets/setup_taps.sh diff --git a/examples/gnrc_networking_subnets/tapology.txt b/examples/networking/gnrc_networking/gnrc_networking_subnets/tapology.txt similarity index 100% rename from examples/gnrc_networking_subnets/tapology.txt rename to examples/networking/gnrc_networking/gnrc_networking_subnets/tapology.txt diff --git a/examples/benchmark_udp/Makefile b/examples/networking/misc/benchmark_udp/Makefile similarity index 97% rename from examples/benchmark_udp/Makefile rename to examples/networking/misc/benchmark_udp/Makefile index 91a80e33a18e..2eb6200257d7 100644 --- a/examples/benchmark_udp/Makefile +++ b/examples/networking/misc/benchmark_udp/Makefile @@ -5,7 +5,7 @@ APPLICATION = benchmark_udp BOARD ?= native # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../../.. # use GNRC by default LWIP ?= 0 diff --git a/examples/benchmark_udp/Makefile.ci b/examples/networking/misc/benchmark_udp/Makefile.ci similarity index 100% rename from examples/benchmark_udp/Makefile.ci rename to examples/networking/misc/benchmark_udp/Makefile.ci diff --git a/examples/benchmark_udp/README.md b/examples/networking/misc/benchmark_udp/README.md similarity index 100% rename from examples/benchmark_udp/README.md rename to examples/networking/misc/benchmark_udp/README.md diff --git a/examples/benchmark_udp/main.c b/examples/networking/misc/benchmark_udp/main.c similarity index 100% rename from examples/benchmark_udp/main.c rename to examples/networking/misc/benchmark_udp/main.c diff --git a/examples/ccn-lite-relay/Makefile b/examples/networking/misc/ccn-lite-relay/Makefile similarity index 97% rename from examples/ccn-lite-relay/Makefile rename to examples/networking/misc/ccn-lite-relay/Makefile index ae3e3e748e4a..f02f05d89733 100644 --- a/examples/ccn-lite-relay/Makefile +++ b/examples/networking/misc/ccn-lite-relay/Makefile @@ -8,7 +8,7 @@ BOARD_WHITELIST := iotlab-m3 msba2 mulle native native64 nrf52dk nrf52840dk \ # 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 diff --git a/examples/ccn-lite-relay/Makefile.ci b/examples/networking/misc/ccn-lite-relay/Makefile.ci similarity index 100% rename from examples/ccn-lite-relay/Makefile.ci rename to examples/networking/misc/ccn-lite-relay/Makefile.ci diff --git a/examples/ccn-lite-relay/README.md b/examples/networking/misc/ccn-lite-relay/README.md similarity index 100% rename from examples/ccn-lite-relay/README.md rename to examples/networking/misc/ccn-lite-relay/README.md diff --git a/examples/ccn-lite-relay/main.c b/examples/networking/misc/ccn-lite-relay/main.c similarity index 100% rename from examples/ccn-lite-relay/main.c rename to examples/networking/misc/ccn-lite-relay/main.c diff --git a/examples/lorawan/Makefile b/examples/networking/misc/lorawan/Makefile similarity index 98% rename from examples/lorawan/Makefile rename to examples/networking/misc/lorawan/Makefile index 4c4b2588b6fb..2f09f4ec85fa 100644 --- a/examples/lorawan/Makefile +++ b/examples/networking/misc/lorawan/Makefile @@ -5,7 +5,7 @@ APPLICATION = lorawan BOARD ?= b-l072z-lrwan1 # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../../.. # Change this to abp to enable Activation By Personnalization mode ACTIVATION_MODE ?= otaa diff --git a/examples/lorawan/Makefile.ci b/examples/networking/misc/lorawan/Makefile.ci similarity index 100% rename from examples/lorawan/Makefile.ci rename to examples/networking/misc/lorawan/Makefile.ci diff --git a/examples/lorawan/README.md b/examples/networking/misc/lorawan/README.md similarity index 100% rename from examples/lorawan/README.md rename to examples/networking/misc/lorawan/README.md diff --git a/examples/lorawan/main.c b/examples/networking/misc/lorawan/main.c similarity index 100% rename from examples/lorawan/main.c rename to examples/networking/misc/lorawan/main.c diff --git a/examples/lorawan/tests-with-config/01-run.py b/examples/networking/misc/lorawan/tests-with-config/01-run.py similarity index 100% rename from examples/lorawan/tests-with-config/01-run.py rename to examples/networking/misc/lorawan/tests-with-config/01-run.py diff --git a/examples/lwm2m/Kconfig b/examples/networking/misc/lwm2m/Kconfig similarity index 100% rename from examples/lwm2m/Kconfig rename to examples/networking/misc/lwm2m/Kconfig diff --git a/examples/lwm2m/Makefile b/examples/networking/misc/lwm2m/Makefile similarity index 98% rename from examples/lwm2m/Makefile rename to examples/networking/misc/lwm2m/Makefile index efbecb6cd112..edc85e6d024c 100644 --- a/examples/lwm2m/Makefile +++ b/examples/networking/misc/lwm2m/Makefile @@ -5,7 +5,7 @@ APPLICATION = lwm2m 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 diff --git a/examples/lwm2m/Makefile.ci b/examples/networking/misc/lwm2m/Makefile.ci similarity index 100% rename from examples/lwm2m/Makefile.ci rename to examples/networking/misc/lwm2m/Makefile.ci diff --git a/examples/lwm2m/README.md b/examples/networking/misc/lwm2m/README.md similarity index 100% rename from examples/lwm2m/README.md rename to examples/networking/misc/lwm2m/README.md diff --git a/examples/lwm2m/app.config b/examples/networking/misc/lwm2m/app.config similarity index 100% rename from examples/lwm2m/app.config rename to examples/networking/misc/lwm2m/app.config diff --git a/examples/lwm2m/credentials.h b/examples/networking/misc/lwm2m/credentials.h similarity index 100% rename from examples/lwm2m/credentials.h rename to examples/networking/misc/lwm2m/credentials.h diff --git a/examples/lwm2m/lwm2m_cli.c b/examples/networking/misc/lwm2m/lwm2m_cli.c similarity index 100% rename from examples/lwm2m/lwm2m_cli.c rename to examples/networking/misc/lwm2m/lwm2m_cli.c diff --git a/examples/lwm2m/main.c b/examples/networking/misc/lwm2m/main.c similarity index 100% rename from examples/lwm2m/main.c rename to examples/networking/misc/lwm2m/main.c diff --git a/examples/openthread/Makefile b/examples/networking/misc/openthread/Makefile similarity index 98% rename from examples/openthread/Makefile rename to examples/networking/misc/openthread/Makefile index e653233df9a9..cd5ac9cdf1ec 100644 --- a/examples/openthread/Makefile +++ b/examples/networking/misc/openthread/Makefile @@ -24,7 +24,7 @@ BOARD_WHITELIST := \ # # 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 diff --git a/examples/openthread/README.md b/examples/networking/misc/openthread/README.md similarity index 100% rename from examples/openthread/README.md rename to examples/networking/misc/openthread/README.md diff --git a/examples/openthread/main.c b/examples/networking/misc/openthread/main.c similarity index 100% rename from examples/openthread/main.c rename to examples/networking/misc/openthread/main.c diff --git a/examples/posix_sockets/Makefile b/examples/networking/misc/posix_sockets/Makefile similarity index 96% rename from examples/posix_sockets/Makefile rename to examples/networking/misc/posix_sockets/Makefile index f2807361a9de..f27ac8172bca 100644 --- a/examples/posix_sockets/Makefile +++ b/examples/networking/misc/posix_sockets/Makefile @@ -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 diff --git a/examples/posix_sockets/Makefile.ci b/examples/networking/misc/posix_sockets/Makefile.ci similarity index 100% rename from examples/posix_sockets/Makefile.ci rename to examples/networking/misc/posix_sockets/Makefile.ci diff --git a/examples/posix_sockets/README.md b/examples/networking/misc/posix_sockets/README.md similarity index 100% rename from examples/posix_sockets/README.md rename to examples/networking/misc/posix_sockets/README.md diff --git a/examples/posix_sockets/main.c b/examples/networking/misc/posix_sockets/main.c similarity index 100% rename from examples/posix_sockets/main.c rename to examples/networking/misc/posix_sockets/main.c diff --git a/examples/posix_sockets/udp.c b/examples/networking/misc/posix_sockets/udp.c similarity index 100% rename from examples/posix_sockets/udp.c rename to examples/networking/misc/posix_sockets/udp.c diff --git a/examples/sniffer/Makefile b/examples/networking/misc/sniffer/Makefile similarity index 94% rename from examples/sniffer/Makefile rename to examples/networking/misc/sniffer/Makefile index 06c2005c2f69..9a790776b62f 100644 --- a/examples/sniffer/Makefile +++ b/examples/networking/misc/sniffer/Makefile @@ -5,7 +5,7 @@ APPLICATION = sniffer BOARD ?= native # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../../.. # Define modules that are used USEMODULE += fmt diff --git a/examples/sniffer/Makefile.ci b/examples/networking/misc/sniffer/Makefile.ci similarity index 100% rename from examples/sniffer/Makefile.ci rename to examples/networking/misc/sniffer/Makefile.ci diff --git a/examples/sniffer/README.md b/examples/networking/misc/sniffer/README.md similarity index 100% rename from examples/sniffer/README.md rename to examples/networking/misc/sniffer/README.md diff --git a/examples/sniffer/main.c b/examples/networking/misc/sniffer/main.c similarity index 100% rename from examples/sniffer/main.c rename to examples/networking/misc/sniffer/main.c diff --git a/examples/sniffer/tools/README.md b/examples/networking/misc/sniffer/tools/README.md similarity index 100% rename from examples/sniffer/tools/README.md rename to examples/networking/misc/sniffer/tools/README.md diff --git a/examples/sniffer/tools/sniffer.py b/examples/networking/misc/sniffer/tools/sniffer.py similarity index 100% rename from examples/sniffer/tools/sniffer.py rename to examples/networking/misc/sniffer/tools/sniffer.py diff --git a/examples/sock_tcp_echo/Makefile b/examples/networking/misc/sock_tcp_echo/Makefile similarity index 96% rename from examples/sock_tcp_echo/Makefile rename to examples/networking/misc/sock_tcp_echo/Makefile index d809766ade39..6f4989e193c6 100644 --- a/examples/sock_tcp_echo/Makefile +++ b/examples/networking/misc/sock_tcp_echo/Makefile @@ -8,7 +8,7 @@ BOARD ?= native LWIP ?= 0 # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../../.. USEMODULE += sock_tcp USEMODULE += netdev_default diff --git a/examples/sock_tcp_echo/Makefile.ci b/examples/networking/misc/sock_tcp_echo/Makefile.ci similarity index 100% rename from examples/sock_tcp_echo/Makefile.ci rename to examples/networking/misc/sock_tcp_echo/Makefile.ci diff --git a/examples/sock_tcp_echo/README.md b/examples/networking/misc/sock_tcp_echo/README.md similarity index 100% rename from examples/sock_tcp_echo/README.md rename to examples/networking/misc/sock_tcp_echo/README.md diff --git a/examples/sock_tcp_echo/main.c b/examples/networking/misc/sock_tcp_echo/main.c similarity index 100% rename from examples/sock_tcp_echo/main.c rename to examples/networking/misc/sock_tcp_echo/main.c diff --git a/examples/spectrum-scanner/Makefile b/examples/networking/misc/spectrum-scanner/Makefile similarity index 93% rename from examples/spectrum-scanner/Makefile rename to examples/networking/misc/spectrum-scanner/Makefile index c59bd76b516f..96dfc8080b44 100644 --- a/examples/spectrum-scanner/Makefile +++ b/examples/networking/misc/spectrum-scanner/Makefile @@ -5,7 +5,7 @@ APPLICATION = spectrum-scanner BOARD ?= samr21-xpro # This has to be the absolute path to the RIOT base directory: -RIOTBASE ?= $(CURDIR)/../.. +RIOTBASE ?= $(CURDIR)/../../../.. # Define modules that are used USEMODULE += gnrc diff --git a/examples/spectrum-scanner/Makefile.ci b/examples/networking/misc/spectrum-scanner/Makefile.ci similarity index 100% rename from examples/spectrum-scanner/Makefile.ci rename to examples/networking/misc/spectrum-scanner/Makefile.ci diff --git a/examples/spectrum-scanner/README.md b/examples/networking/misc/spectrum-scanner/README.md similarity index 100% rename from examples/spectrum-scanner/README.md rename to examples/networking/misc/spectrum-scanner/README.md diff --git a/examples/spectrum-scanner/main.c b/examples/networking/misc/spectrum-scanner/main.c similarity index 100% rename from examples/spectrum-scanner/main.c rename to examples/networking/misc/spectrum-scanner/main.c diff --git a/examples/spectrum-scanner/tools/README.md b/examples/networking/misc/spectrum-scanner/tools/README.md similarity index 100% rename from examples/spectrum-scanner/tools/README.md rename to examples/networking/misc/spectrum-scanner/tools/README.md diff --git a/examples/spectrum-scanner/tools/example.png b/examples/networking/misc/spectrum-scanner/tools/example.png similarity index 100% rename from examples/spectrum-scanner/tools/example.png rename to examples/networking/misc/spectrum-scanner/tools/example.png diff --git a/examples/spectrum-scanner/tools/plot_rssi.py b/examples/networking/misc/spectrum-scanner/tools/plot_rssi.py similarity index 100% rename from examples/spectrum-scanner/tools/plot_rssi.py rename to examples/networking/misc/spectrum-scanner/tools/plot_rssi.py diff --git a/examples/telnet_server/Makefile b/examples/networking/misc/telnet_server/Makefile similarity index 98% rename from examples/telnet_server/Makefile rename to examples/networking/misc/telnet_server/Makefile index 468d17143887..24cae7524c7a 100644 --- a/examples/telnet_server/Makefile +++ b/examples/networking/misc/telnet_server/Makefile @@ -5,7 +5,7 @@ APPLICATION = telnet_server 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 diff --git a/examples/telnet_server/Makefile.ci b/examples/networking/misc/telnet_server/Makefile.ci similarity index 100% rename from examples/telnet_server/Makefile.ci rename to examples/networking/misc/telnet_server/Makefile.ci diff --git a/examples/telnet_server/README.md b/examples/networking/misc/telnet_server/README.md similarity index 100% rename from examples/telnet_server/README.md rename to examples/networking/misc/telnet_server/README.md diff --git a/examples/telnet_server/main.c b/examples/networking/misc/telnet_server/main.c similarity index 100% rename from examples/telnet_server/main.c rename to examples/networking/misc/telnet_server/main.c diff --git a/examples/asymcute_mqttsn/Makefile b/examples/networking/mqtt/asymcute_mqttsn/Makefile similarity index 96% rename from examples/asymcute_mqttsn/Makefile rename to examples/networking/mqtt/asymcute_mqttsn/Makefile index e5d3fe0386c0..781b7577c1e1 100644 --- a/examples/asymcute_mqttsn/Makefile +++ b/examples/networking/mqtt/asymcute_mqttsn/Makefile @@ -5,7 +5,7 @@ APPLICATION = asymcute_mqttsn 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 diff --git a/examples/asymcute_mqttsn/Makefile.ci b/examples/networking/mqtt/asymcute_mqttsn/Makefile.ci similarity index 100% rename from examples/asymcute_mqttsn/Makefile.ci rename to examples/networking/mqtt/asymcute_mqttsn/Makefile.ci diff --git a/examples/asymcute_mqttsn/README.md b/examples/networking/mqtt/asymcute_mqttsn/README.md similarity index 100% rename from examples/asymcute_mqttsn/README.md rename to examples/networking/mqtt/asymcute_mqttsn/README.md diff --git a/examples/asymcute_mqttsn/main.c b/examples/networking/mqtt/asymcute_mqttsn/main.c similarity index 100% rename from examples/asymcute_mqttsn/main.c rename to examples/networking/mqtt/asymcute_mqttsn/main.c diff --git a/examples/emcute_mqttsn/Makefile b/examples/networking/mqtt/emcute_mqttsn/Makefile similarity index 97% rename from examples/emcute_mqttsn/Makefile rename to examples/networking/mqtt/emcute_mqttsn/Makefile index 218d7cb6213b..4e15c041dce3 100644 --- a/examples/emcute_mqttsn/Makefile +++ b/examples/networking/mqtt/emcute_mqttsn/Makefile @@ -5,7 +5,7 @@ APPLICATION = emcute_mqttsn 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 diff --git a/examples/emcute_mqttsn/Makefile.ci b/examples/networking/mqtt/emcute_mqttsn/Makefile.ci similarity index 100% rename from examples/emcute_mqttsn/Makefile.ci rename to examples/networking/mqtt/emcute_mqttsn/Makefile.ci diff --git a/examples/emcute_mqttsn/README.md b/examples/networking/mqtt/emcute_mqttsn/README.md similarity index 100% rename from examples/emcute_mqttsn/README.md rename to examples/networking/mqtt/emcute_mqttsn/README.md diff --git a/examples/emcute_mqttsn/main.c b/examples/networking/mqtt/emcute_mqttsn/main.c similarity index 100% rename from examples/emcute_mqttsn/main.c rename to examples/networking/mqtt/emcute_mqttsn/main.c diff --git a/examples/paho-mqtt/Makefile b/examples/networking/mqtt/paho-mqtt/Makefile similarity index 98% rename from examples/paho-mqtt/Makefile rename to examples/networking/mqtt/paho-mqtt/Makefile index 9e7f37126e3b..c520f159cc1b 100644 --- a/examples/paho-mqtt/Makefile +++ b/examples/networking/mqtt/paho-mqtt/Makefile @@ -4,7 +4,7 @@ APPLICATION = paho-mqtt-example 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 diff --git a/examples/paho-mqtt/Makefile.board.dep b/examples/networking/mqtt/paho-mqtt/Makefile.board.dep similarity index 100% rename from examples/paho-mqtt/Makefile.board.dep rename to examples/networking/mqtt/paho-mqtt/Makefile.board.dep diff --git a/examples/paho-mqtt/Makefile.ci b/examples/networking/mqtt/paho-mqtt/Makefile.ci similarity index 100% rename from examples/paho-mqtt/Makefile.ci rename to examples/networking/mqtt/paho-mqtt/Makefile.ci diff --git a/examples/paho-mqtt/Makefile.gnrc b/examples/networking/mqtt/paho-mqtt/Makefile.gnrc similarity index 100% rename from examples/paho-mqtt/Makefile.gnrc rename to examples/networking/mqtt/paho-mqtt/Makefile.gnrc diff --git a/examples/paho-mqtt/Makefile.lwip b/examples/networking/mqtt/paho-mqtt/Makefile.lwip similarity index 100% rename from examples/paho-mqtt/Makefile.lwip rename to examples/networking/mqtt/paho-mqtt/Makefile.lwip diff --git a/examples/paho-mqtt/README.md b/examples/networking/mqtt/paho-mqtt/README.md similarity index 100% rename from examples/paho-mqtt/README.md rename to examples/networking/mqtt/paho-mqtt/README.md diff --git a/examples/paho-mqtt/main.c b/examples/networking/mqtt/paho-mqtt/main.c similarity index 100% rename from examples/paho-mqtt/main.c rename to examples/networking/mqtt/paho-mqtt/main.c