Tiny C
From wiki.gp2x.org
A port of the Tiny C compiler to the gp2x.
This is a full C compiler for the gp2x.
Installation
- Download the file
- Unzip it to /mnt/sd so you'll have /mnt/sd/tcc
- Then add /mnt/sd/tcc to your path
export PATH=$PATH:/mnt/sd/tcc
Using the Compiler
Example:
tcc -o hello hello.c
A good test is rlyeh's minilib
- From the rgb directory try:
tcc -static -o 8bit 8bits.c minimal.c -lpthread
- then
./8bit
- You can now change the colour of the screen by pressing the A,B and X.
TCC is a powerful enough compiler that it will build itself. So switching to the tcc directory itself you can try :
./tcc2 -DTCC_TARGET_ARM -o tcc2b tcc.c lib/libc.a lib/libgcc.a -static -I include -Llib -ldl