From ec936216e8be6ea7181a4a4c62879fe4300324f4 Mon Sep 17 00:00:00 2001 From: crasbe Date: Thu, 23 Apr 2026 13:54:05 +0200 Subject: [PATCH 1/6] Bump to RIOT 2026.04 --- RIOT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RIOT b/RIOT index 648e293..a897b04 160000 --- a/RIOT +++ b/RIOT @@ -1 +1 @@ -Subproject commit 648e293b31b50a79ba395cd88fbc430a21c1eab6 +Subproject commit a897b0498f635654f091bf9f33e9696aa773e886 From 564a7b88c2d6c75c45f06c85f9dbb218a28ecc19 Mon Sep 17 00:00:00 2001 From: crasbe Date: Thu, 23 Apr 2026 14:19:23 +0200 Subject: [PATCH 2/6] task-0*: update Makefiles --- task-01/Makefile | 4 ++-- task-02/Makefile | 4 ++-- task-03/Makefile | 4 ++-- task-04/Makefile | 4 ++-- task-05/Makefile | 4 ++-- task-06/Makefile | 6 +++--- task-08/Makefile | 7 ++++--- task-09/Makefile | 12 ++++++------ 8 files changed, 23 insertions(+), 22 deletions(-) diff --git a/task-01/Makefile b/task-01/Makefile index e27cfc4..85d062f 100644 --- a/task-01/Makefile +++ b/task-01/Makefile @@ -10,14 +10,14 @@ RIOTBASE ?= $(CURDIR)/../RIOT # 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 +DEVELHELP = 1 # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 # Modules to include: USEMODULE += shell -USEMODULE += shell_commands +USEMODULE += shell_cmds_default USEMODULE += ps include $(RIOTBASE)/Makefile.include diff --git a/task-02/Makefile b/task-02/Makefile index 4aecb56..8f37c7e 100644 --- a/task-02/Makefile +++ b/task-02/Makefile @@ -10,14 +10,14 @@ RIOTBASE ?= $(CURDIR)/../RIOT # 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 +DEVELHELP = 1 # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 # Modules to include: USEMODULE += shell -USEMODULE += shell_commands +USEMODULE += shell_cmds_default USEMODULE += ps include $(RIOTBASE)/Makefile.include diff --git a/task-03/Makefile b/task-03/Makefile index b822f7e..59a1f34 100644 --- a/task-03/Makefile +++ b/task-03/Makefile @@ -10,14 +10,14 @@ RIOTBASE ?= $(CURDIR)/../RIOT # 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 +DEVELHELP = 1 # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 # Modules to include: USEMODULE += shell -USEMODULE += shell_commands +USEMODULE += shell_cmds_default USEMODULE += ps include $(RIOTBASE)/Makefile.include diff --git a/task-04/Makefile b/task-04/Makefile index 20ec6de..ccc9b5f 100644 --- a/task-04/Makefile +++ b/task-04/Makefile @@ -10,14 +10,14 @@ RIOTBASE ?= $(CURDIR)/../RIOT # 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 +DEVELHELP = 1 # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 # Modules to include: USEMODULE += shell -USEMODULE += shell_commands +USEMODULE += shell_cmds_default USEMODULE += ps USEMODULE += xtimer diff --git a/task-05/Makefile b/task-05/Makefile index 0449ac9..3967826 100644 --- a/task-05/Makefile +++ b/task-05/Makefile @@ -10,14 +10,14 @@ RIOTBASE ?= $(CURDIR)/../RIOT # 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 +DEVELHELP = 1 # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 # Modules to include: USEMODULE += shell -USEMODULE += shell_commands +USEMODULE += shell_cmds_default USEMODULE += ps USEMODULE += gnrc_pktdump USEMODULE += gnrc_txtsnd diff --git a/task-06/Makefile b/task-06/Makefile index 1631f07..8f28296 100644 --- a/task-06/Makefile +++ b/task-06/Makefile @@ -8,19 +8,19 @@ BOARD ?= native RIOTBASE ?= $(CURDIR)/../RIOT # Uncomment this to enable scheduler statistics for ps: -#CFLAGS += -DSCHEDSTATISTICS +#USEMODULE += schedstatistics # 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 +DEVELHELP = 1 # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 # Modules to include: USEMODULE += shell -USEMODULE += shell_commands +USEMODULE += shell_cmds_default USEMODULE += ps USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif diff --git a/task-08/Makefile b/task-08/Makefile index 9981179..5168202 100644 --- a/task-08/Makefile +++ b/task-08/Makefile @@ -6,13 +6,14 @@ BOARD ?= native # This has to be the absolute path to the RIOT base directory: RIOTBASE ?= $(CURDIR)/../RIOT -BOARD_WHITELIST := fox iotlab-m3 msba2 mulle native pba-d-01-kw2x samr21-xpro +BOARD_WHITELIST := iotlab-m3 msba2 mulle native pba-d-01-kw2x samr21-xpro # This has to be the absolute path to the RIOT base directory: RIOTBASE ?= $(CURDIR)/../.. -CFLAGS += -DDEVELHELP +DEVELHELP = 1 + CFLAGS += -DUSE_LINKLAYER CFLAGS += -DUSE_RONR CFLAGS += -DCCNL_UAPI_H_ @@ -25,7 +26,7 @@ QUIET ?= 1 USEMODULE += ps USEMODULE += shell -USEMODULE += shell_commands +USEMODULE += shell_cmds_default # Include packages that pull up and auto-init the link layer. # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present USEMODULE += gnrc_netdev_default diff --git a/task-09/Makefile b/task-09/Makefile index 0585684..2621fc3 100644 --- a/task-09/Makefile +++ b/task-09/Makefile @@ -7,10 +7,10 @@ BOARD ?= native # This has to be the absolute path to the RIOT base directory: RIOTBASE ?= $(CURDIR)/../RIOT -BOARD_INSUFFICIENT_MEMORY := airfy-beacon chronos msb-430 msb-430h nrf51dongle \ - nrf6310 nucleo-f103 nucleo-f334 pca10000 pca10005 spark-core \ - stm32f0discovery telosb weio wsn430-v1_3b wsn430-v1_4 \ - yunjia-nrf51822 z1 nucleo-f072 +BOARD_INSUFFICIENT_MEMORY := airfy-beacon msb-430 msb-430h nrf51dongle \ + nucleo-f103rb nucleo-f334r8 spark-core \ + stm32f0discovery telosb \ + yunjia-nrf51822 z1 nucleo-f072rb # Include packages that pull up and auto-init the link layer. # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present @@ -28,7 +28,7 @@ USEMODULE += gnrc_pktdump USEMODULE += gnrc_icmpv6_echo # Add also the shell, some shell commands USEMODULE += shell -USEMODULE += shell_commands +USEMODULE += shell_cmds_default USEMODULE += ps USEMODULE += netstats_l2 USEMODULE += netstats_ipv6 @@ -45,7 +45,7 @@ CFLAGS += -DGNRC_RPL_DEFAULT_DIO_INTERVAL_DOUBLINGS=13 # 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 +DEVELHELP = 1 # Comment this out to join RPL DODAGs even if DIOs do not contain # DODAG Configuration Options (see the doc for more info) From 929ff4d732d015a1f44f91ddd0dc34d503a0aa34 Mon Sep 17 00:00:00 2001 From: crasbe Date: Thu, 23 Apr 2026 14:29:33 +0200 Subject: [PATCH 3/6] fixup! task-0*: update Makefiles --- task-05/Makefile | 2 +- task-06/Makefile | 2 +- task-08/Makefile | 2 +- task-09/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/task-05/Makefile b/task-05/Makefile index 3967826..064a2e9 100644 --- a/task-05/Makefile +++ b/task-05/Makefile @@ -21,7 +21,7 @@ USEMODULE += shell_cmds_default USEMODULE += ps USEMODULE += gnrc_pktdump USEMODULE += gnrc_txtsnd -USEMODULE += gnrc_netdev_default +USEMODULE += netdev_default USEMODULE += auto_init_gnrc_netif include $(RIOTBASE)/Makefile.include diff --git a/task-06/Makefile b/task-06/Makefile index 8f28296..73731c4 100644 --- a/task-06/Makefile +++ b/task-06/Makefile @@ -22,7 +22,7 @@ QUIET ?= 1 USEMODULE += shell USEMODULE += shell_cmds_default USEMODULE += ps -USEMODULE += gnrc_netdev_default +USEMODULE += netdev_default USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_ipv6_default USEMODULE += gnrc_icmpv6_echo diff --git a/task-08/Makefile b/task-08/Makefile index 5168202..93defc4 100644 --- a/task-08/Makefile +++ b/task-08/Makefile @@ -29,7 +29,7 @@ USEMODULE += shell USEMODULE += shell_cmds_default # Include packages that pull up and auto-init the link layer. # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present -USEMODULE += gnrc_netdev_default +USEMODULE += netdev_default USEMODULE += auto_init_gnrc_netif USEMODULE += timex USEMODULE += xtimer diff --git a/task-09/Makefile b/task-09/Makefile index 2621fc3..8bd7652 100644 --- a/task-09/Makefile +++ b/task-09/Makefile @@ -14,7 +14,7 @@ BOARD_INSUFFICIENT_MEMORY := airfy-beacon msb-430 msb-430h nrf51dongle \ # Include packages that pull up and auto-init the link layer. # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present -USEMODULE += gnrc_netdev_default +USEMODULE += netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for IPv6 and UDP USEMODULE += gnrc_ipv6_router_default From f327fa3d4cea3df582307bed744435966e66d4f6 Mon Sep 17 00:00:00 2001 From: crasbe Date: Thu, 23 Apr 2026 14:46:49 +0200 Subject: [PATCH 4/6] .github/workflows: update example path --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71a52e2..9920f3d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,8 +36,8 @@ jobs: - run: make -C task-06 -j all - name: Run make -C task-07 -j all run: | - make -C RIOT/examples/gnrc_minimal -j all - make -C RIOT/examples/gnrc_networking -j all + make -C RIOT/examples/networking/gnrc/minimal -j all + make -C RIOT/examples/networking/gnrc/networking -j all - run: make -C task-08 -j all - run: make -C task-09 -j all From bebd43cd63ffa7ee33856252c7c72b1b88830197 Mon Sep 17 00:00:00 2001 From: crasbe Date: Thu, 23 Apr 2026 15:07:10 +0200 Subject: [PATCH 5/6] task-0*: various updates Fix dead link, broken references and replace shell_commands structure with SHELL_COMMAND macro. --- task-01/README.md | 5 ++++- task-02/README.md | 10 ++++------ task-02/main.c | 6 +----- task-05/README.md | 2 +- task-06/main.c | 9 +++------ task-08/README.md | 4 ++-- task-09/main.c | 7 ++----- 7 files changed, 17 insertions(+), 26 deletions(-) diff --git a/task-01/README.md b/task-01/README.md index 4a48d21..79a7723 100644 --- a/task-01/README.md +++ b/task-01/README.md @@ -93,6 +93,9 @@ This command will compile the application, burn the image onto the board and open a connection to the RIOT shell. -3. Verify the output of `RIOT_BOARD` matches your hardware. +3. Verify the compiler output of matches your hardware, for example: + ``` + Building application "Task01" for "samr21-xpro" with CPU "samd21". + ``` [next task](../task-02) diff --git a/task-02/README.md b/task-02/README.md index e83c200..3e528be 100644 --- a/task-02/README.md +++ b/task-02/README.md @@ -13,17 +13,15 @@ this shell command plus one for the name of the command. Your function must return `0` if it runs successfully and or anything else if an error occurs. -Shell commands need to be added manually to the shell on initialization +Shell commands need to be added manually to the shell on initialization, +usually this is done with the macro command `SHELL_COMMAND()`. ```c #include "shell.h" -static const shell_command_t shell_commands[] = { - { "command name", "command description", cmd_handler }, - { NULL, NULL, NULL } -}; +SHELL_COMMAND("command name", "command description", cmd_handler); /* ... */ - shell_run(commands, line_buf, SHELL_DEFAULT_BUFSIZE) + shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE) /* ... */ ``` diff --git a/task-02/main.c b/task-02/main.c index 804ab37..8d3ce55 100644 --- a/task-02/main.c +++ b/task-02/main.c @@ -12,16 +12,12 @@ int echo(int argc, char **argv) return 0; } -static const shell_command_t commands[] = { - { NULL, NULL, NULL } -}; - int main(void) { puts("This is Task-02"); char line_buf[SHELL_DEFAULT_BUFSIZE]; - shell_run(commands, line_buf, SHELL_DEFAULT_BUFSIZE); + shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE); return 0; } diff --git a/task-05/README.md b/task-05/README.md index 9d425ba..a5a1e7c 100644 --- a/task-05/README.md +++ b/task-05/README.md @@ -13,7 +13,7 @@ options or states. Note inclusion of `netdev` modules in the [Makefile](Makefile) ```Makefile -USEMODULE += gnrc_netdev_default +USEMODULE += netdev_default USEMODULE += auto_init_gnrc_netif ``` diff --git a/task-06/main.c b/task-06/main.c index 336293e..15e2b1c 100644 --- a/task-06/main.c +++ b/task-06/main.c @@ -10,11 +10,8 @@ static msg_t _main_msg_queue[MAIN_QUEUE_SIZE]; extern int udp_send(int argc, char **argv); extern int udp_server(int argc, char **argv); -static const shell_command_t shell_commands[] = { - { "udp", "send udp packets", udp_send }, - { "udps", "start udp server", udp_server }, - { NULL, NULL, NULL } -}; +SHELL_COMMAND("udp", "send udp packets", udp_send); +SHELL_COMMAND("udps", "start udp server", udp_server); int main(void) { @@ -22,7 +19,7 @@ int main(void) puts("This is Task-06"); char line_buf[SHELL_DEFAULT_BUFSIZE]; - shell_run(shell_commands, line_buf, SHELL_DEFAULT_BUFSIZE); + shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE); return 0; } diff --git a/task-08/README.md b/task-08/README.md index 7dcc81f..1477db1 100644 --- a/task-08/README.md +++ b/task-08/README.md @@ -47,9 +47,9 @@ RIOT provides three shell to interact with the CCN-Lite stack: ## Task 8.2: Modify the default shell commands (advanced task) -* Take a look at the default shell commands in `sys/shell/commands/sc_ccnl.c` +* Take a look at the default shell commands in `sys/shell/cmds/ccn-lite-utils.c` * Create a new command to send an interest with a shorter timeout -(see [https://doc.riot-os.org/group__pkg__ccnlite.html](https://doc.riot-os.org/group__pkg__ccnlite.html) +(see https://github.com/cn-uofbasel/ccn-lite/tree/master/doc ) * Use `ccnl_set_local_producer()` to create content on the fly [next task](../task-09) diff --git a/task-09/main.c b/task-09/main.c index 84bd372..d6909b9 100644 --- a/task-09/main.c +++ b/task-09/main.c @@ -36,10 +36,7 @@ static msg_t _main_msg_queue[MAIN_QUEUE_SIZE]; extern int udp_cmd(int argc, char **argv); -static const shell_command_t shell_commands[] = { - { "udp", "send data over UDP and listen on UDP ports", udp_cmd }, - { NULL, NULL, NULL } -}; +SHELL_COMMAND("udp", "send data over UDP and listen on UDP ports", udp_cmd); #ifdef MODULE_GNRC_SIXLOWPAN static char _stack[THREAD_STACKSIZE_MAIN]; @@ -110,7 +107,7 @@ int main(void) /* start shell */ puts("All up, running the shell now"); char line_buf[SHELL_DEFAULT_BUFSIZE]; - shell_run(shell_commands, line_buf, SHELL_DEFAULT_BUFSIZE); + shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE); /* should be never reached */ return 0; From 6c8938d05807dbf035db3068cbf2858a9063bcae Mon Sep 17 00:00:00 2001 From: crasbe Date: Thu, 23 Apr 2026 15:15:44 +0200 Subject: [PATCH 6/6] fixup! task-0*: various updates --- task-02/README.md | 4 +++- task-06/main.c | 4 ++-- task-09/main.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/task-02/README.md b/task-02/README.md index 3e528be..f27f4e0 100644 --- a/task-02/README.md +++ b/task-02/README.md @@ -15,10 +15,12 @@ an error occurs. Shell commands need to be added manually to the shell on initialization, usually this is done with the macro command `SHELL_COMMAND()`. +Please note that the command name is *not* written in quotes and can not have +any whitespaces! ```c #include "shell.h" -SHELL_COMMAND("command name", "command description", cmd_handler); +SHELL_COMMAND(command_name, "command description", cmd_handler); /* ... */ shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE) diff --git a/task-06/main.c b/task-06/main.c index 15e2b1c..2815edf 100644 --- a/task-06/main.c +++ b/task-06/main.c @@ -10,8 +10,8 @@ static msg_t _main_msg_queue[MAIN_QUEUE_SIZE]; extern int udp_send(int argc, char **argv); extern int udp_server(int argc, char **argv); -SHELL_COMMAND("udp", "send udp packets", udp_send); -SHELL_COMMAND("udps", "start udp server", udp_server); +SHELL_COMMAND(udp, "send udp packets", udp_send); +SHELL_COMMAND(udps, "start udp server", udp_server); int main(void) { diff --git a/task-09/main.c b/task-09/main.c index d6909b9..6ee3497 100644 --- a/task-09/main.c +++ b/task-09/main.c @@ -36,7 +36,7 @@ static msg_t _main_msg_queue[MAIN_QUEUE_SIZE]; extern int udp_cmd(int argc, char **argv); -SHELL_COMMAND("udp", "send data over UDP and listen on UDP ports", udp_cmd); +SHELL_COMMAND(udp, "send data over UDP and listen on UDP ports", udp_cmd); #ifdef MODULE_GNRC_SIXLOWPAN static char _stack[THREAD_STACKSIZE_MAIN];