Tallinn 2016
Hannes Kinks
Compilation
Flashing PIC with binary instructions
Compilation of C code
#include <stdio.h>
#define MESSAGE "Hello world"
int main(void) {
printf(MESSAGE);
return 0;
} cc -E hello_world.c
cc -S hello_world.c
cc -c hello_world.c
hexdump hello_world.o
cc hello_world.c
LED = 0x00;
i = 0;
WHILE(TRUE) {
LED = i;
DELAY();
i = i + 1;
IF(i==16) {
i = 0;
}
}
0 1 2 3 ...
Tutorial for blinking lights program compilation is included in the README.md file, down below.
opExpr: left=expr op=OP right:expr ;