Having gotten one of the Vocore’s LEDs to blink from the command line, I decided that a simple C program to do the same thing would be useful, just to make sure that the cross-compiler has been set up correctly and that everything is working properly.
Having a program that just blinks an LED is pretty useful, just to verify that you can successfully run your code. If you’ve managed to cross-compile a test program like this, then copy it to the target hardware and see it working - then you can start building whatever you like with a degree of confidence.
So I’ve put the code for the Vocore blink program on GitHub just in case… NOTE: it’s designed to work without any additional electronics if you have the dock attached.
The project includes a simple Makefile which (hopefully) should work in most cases. As long as you have an OpenWrt build environment set up for the Vocore you should just be able to type
make and you will then have the program cross-compiled and ready to be copied onto the device. Doing something like:
scp ./blink email@example.com:/ should copy the program over to your Vocore. Once you’ve done that, you just need to
ssh into the Vocore and run it.
Oh, you’ll probably need to make sure that the program has been marked executable with
chmod, otherwise you’ll probably get a Permission denied message. I used
chmod +x blink to do that.