-
Notifications
You must be signed in to change notification settings - Fork 1
Home
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
OK I installed gcc-msp430
and mspdebug
.
Might want to follow: https://mycontraption.com/programming-the-msp430-launchpad-on-ubuntu/
I need to learn how to:
- Compile with MSP-GCC
- Use MSPFET with mspdebug
- Implement this with RIOT-OS tools
Hitting some snags...
brent@brent-580-005t:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0aa7 Intel Corp.
Bus 001 Device 003: ID 0bda:0153 Realtek Semiconductor Corp. Mass Storage Device
Bus 001 Device 006: ID 2047:0014 Texas Instruments
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
brent@brent-580-005t:~$ sudo mspdebug uif -jU 1:6
MSPDebug version 0.22 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2013 Daniel Beer <dlbeer@gmail.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Searching for firmware for TI3410...
- checking /usr/lib//mspdebug/ti_3410.fw.ihex
Loaded 13765 byte firmware image (checksum = 0xb5)
Starting download...
ti3410: warning: can't detach kernel driver: No data available
ti3410: bulk write failed: No such file or directory
ti3410: firmware download failed