-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Brenton Salmi edited this page Dec 5, 2017
·
8 revisions
Welcome to the faradayio-firmware wiki!
TBD
RIOT-OS Tutorial Notes
- 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.
Easy, self-explanatory.
The first part of this task was to create a new echo
command handler and 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;
}
This was followed by asking to control hardware by importing a board.h
and I'm not sure how to do this. I think I need to get either Faraday, an MSP430 launchpad, or other properly being "flashed" from this RIOT-OS compiler, linker, and programmer.
In the RIOT
source folder there is already support for both MSP430's (msb-430
) and the CC430f6137 as listed in the chronos
folder.
vagrant@vagrant:~/Tutorials/RIOT/boards/chronos$ ls include/
board.h buttons.h periph_conf.h
-
board.h
- General board description and hardware such as timers, clocks, etc... -
buttons.h
- Defines the button port pins in use - 'periph_conf.h` - Defines the peripheral device hardware such as UART port pins
Per the RIOT-OS GitHub they recommend a standard mspgcc
and mspdebug
program use for compiling and programming.
https://github.com/RIOT-OS/RIOT/wiki/Family:-MSP430