Skip to content
Brenton Salmi edited this page Dec 5, 2017 · 8 revisions

Welcome to the faradayio-firmware wiki!

TBD

RIOT-OS Tutorial Notes

Installation

  • I needed to enabled virtualization in my BIOS prior to running Vagrant due to the VM for RIOT being 64 bit. RIOT VM kept crashing on bootup after vagrant up and never getting to ssh boot.

Tutorial

  • Task-01
    • Easy, self-explanatory.
  • Task-02
    • Echo command handler creation was a bit tricky at first but very simple:
#include <stdio.h>
#include <string.h>

#include "shell.h"

int echo(int argc, char **argv)
{
    /* ... */
    unsigned char i;
    for(i=1; i<argc; i++){
    printf("%s ",argv[i]);
    }
    printf("\n");
    
    return 0;
}

static const shell_command_t commands[] = {
    {"echo", "Returns the supplied text argument", *echo},
    { 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);
    
    return 0;
}
Clone this wiki locally