This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { | |
/* flag options */ | |
int h; | |
int help; | |
int moored; | |
int version; | |
/* options with arguments */ | |
char *speed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
https://gist.github.com/4100575 | |
Usage: python fixhudson.py [path_to_avrtoolchain] | |
""" | |
import os | |
import subprocess | |
def which(executable): | |
""" Mimics Linux / Unix Command: which """ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ touch empty.c | |
$ avr32-g++ -mpart=uc3a1128 -E -dM empty.c | |
#define __DBL_MIN_EXP__ (-1021) | |
#define __FLT_MIN__ 1.17549435e-38F | |
#define __CHAR_BIT__ 8 | |
#define __WCHAR_MAX__ 2147483647 | |
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 | |
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 | |
#define __FLT_EVAL_METHOD__ 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstring> | |
#include "board.h" | |
#include <aery32/all.h> | |
using namespace aery; | |
// ---------------------------------------------------------------------- | |
// HD44780 instruction set | |
// ---------------------------------------------------------------------- | |
#define HD44780_CLEAR_DISPLAY 0x01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lufaery32.elf: file format elf32-avr32 | |
Sections: | |
Idx Name Size VMA LMA File off Algn | |
0 .reset 00000008 80002000 80002000 00000400 2**2 | |
CONTENTS, ALLOC, LOAD, READONLY, CODE | |
1 .rela.got 00000000 80002008 80002008 00000408 2**2 | |
CONTENTS, ALLOC, LOAD, READONLY, DATA | |
2 .init 0000001c 80002008 80002008 00000408 2**2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lufaery32.elf: file format elf32-avr32 | |
Sections: | |
Idx Name Size VMA LMA File off Algn | |
0 .reset 00000008 80002000 80002000 00000400 2**2 | |
CONTENTS, ALLOC, LOAD, READONLY, CODE | |
1 .rela.got 00000000 80002008 80002008 00000408 2**2 | |
CONTENTS, ALLOC, LOAD, READONLY, DATA | |
2 .init 0000001c 80002008 80002008 00000408 2**2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "board.h" | |
#include <aery32/all.h> | |
using namespace aery; | |
// ---------------------------------------------------------------------- | |
// HD44780 instruction set | |
// ---------------------------------------------------------------------- | |
#define HD44780_CLEAR_DISPLAY 0x01 | |
#define HD44780_RETURN_HOME 0x02 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "board.h" | |
#include <aery32/gpio.h> | |
#include <aery32/spi.h> | |
#include <aery32/delay.h> | |
using namespace aery; | |
// ---------------------------------------------------------------------- | |
// HD44780 instruction set | |
// ---------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/Downloads | |
# Download GHC 7.0.4 binary (take care of the platform, my was Debian 6 64-bit) | |
wget http://www.haskell.org/ghc/dist/7.0.4/ghc-7.0.4-x86_64-unknown-linux.tar.bz2 | |
# Download Haskell-platform | |
wget http://lambda.haskell.org/platform/download/2011.4.0.0/haskell-platform-2011.4.0.0.tar.gz | |
# Unzip both | |
tar xvf ghc-7.0.4-x86_64-unknown-linux.tar.bz2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date +%Z # Check the current timezone | |
cat /etc/timezone # Current timezone in Area/Location format | |
sudo dpkg-reconfigure tzdata # Change timezone |