Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion RIOT
Submodule RIOT updated 10908 files
4 changes: 2 additions & 2 deletions task-01/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion task-01/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions task-02/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 6 additions & 6 deletions task-02/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ 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()`.
Please note that the command name is *not* written in quotes and can not have
any whitespaces!
```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)
/* ... */
```

Expand Down
6 changes: 1 addition & 5 deletions task-02/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions task-03/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions task-04/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions task-05/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ 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
USEMODULE += gnrc_netdev_default
USEMODULE += netdev_default
USEMODULE += auto_init_gnrc_netif

include $(RIOTBASE)/Makefile.include
2 changes: 1 addition & 1 deletion task-05/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
8 changes: 4 additions & 4 deletions task-06/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ 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 += netdev_default
USEMODULE += auto_init_gnrc_netif
USEMODULE += gnrc_ipv6_default
USEMODULE += gnrc_icmpv6_echo
Expand Down
9 changes: 3 additions & 6 deletions task-06/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,16 @@ 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)
{
msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE);
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;
}
9 changes: 5 additions & 4 deletions task-08/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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_
Expand All @@ -25,10 +26,10 @@ 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
USEMODULE += netdev_default
USEMODULE += auto_init_gnrc_netif
USEMODULE += timex
USEMODULE += xtimer
Expand Down
4 changes: 2 additions & 2 deletions task-08/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
14 changes: 7 additions & 7 deletions task-09/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ 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
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
Expand All @@ -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
Expand All @@ -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)
Expand Down
7 changes: 2 additions & 5 deletions task-09/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand Down
Loading