However, other compilers or assemblers for 68,000 may be used as well. See demo.asm for a sample assembly program in Motorola syntax.
You can either write your own assembly programs or your own C programs to control EyeBot. Your C programs should make use of the EyeBot libraries, which prepares functions for display output (text via "printf" or graphics), camera input (grayscale or color), sound output, and servo control (motors).
File extensions:
The standard "main.c" source program looks like the following:
/* ------------------------------------------ */ /* Sample User Program for ROBIOS */ /* ------------------------------------------ */ #include "librobi/librobi.h" #include "libimpro/improc.h" #include "librobi/protos.h" #include "keys.h" #include "lcd.h" #include "cam.h" #include "types.h" #include "const.h" #include "kern.h" #include "vw.h" #include "rs232.h" #include <math.h> #include <stdio.h> #include <unistd.h> void main () { /* disable input/output buffer */ setvbuf (stdout,NULL,_IONBF,0); setvbuf (stdin,NULL,_IONBF,0); /* clear display and write message */ LCDClear(); LCDMode(SCROLLING); printf("HELLO !! \n"); printf("and bye !!\n"); KEYWait(0); printf("KeyPressed !\n"); }
# Makefile for executables CC = gcc-m68k AS = as-m68k LD = ld-m68k OBJCOPY = objcopy-m68k OPTIMZE = -O -g CPU = 68332 LFLAGS = -T../ldfiles/robi-ram.ld -L../librobi -L../libs CFLAGS = -I../include -m${CPU} ${OPTIMZE} -c -msoft-float # -------------------------------------------------------- # You will only have to modify this for your own userprg OBJS = main.o gh.o PROG = userprg # -------------------------------------------------------- .s.o: ${AS} ${AFLAGS} -o $*.o $*.s .c.o: ${CC} ${CFLAGS} $*.c all: echocwd ${PROG} ${PROG}: ${OBJS} ${ROBIOS_LIB} ${LD} ${LFLAGS} -o $@ ${OBJS} -lmyc -lmygcc -lrobi ${OBJCOPY} -O srec ${PROG} ${PROG}.hex clean: echocwd rm -f ${OBJS} ${PROG} ${PROG}.hex core echocwd: @pwd