|
Re: New C18 3.0+ Compatible FRC Code
I know MPLAB can generate a makefile for you but those always seem messy so I wrote up a quick one to use for myself with Kevin's new code. Figured I'd share it here in case anyone else finds it useful.
Code:
# Makefile for Kevin Watson's (http://kevin.org) C18 3.0 compatible FRC code
CC = C:\\mcc18\\bin\\mcc18.exe
CFLAGS = -p=18F8722 -k -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
LD = C:\\mcc18\\bin\\mplink.exe
LDFLAGS = 18f8722.lkr
LIBS = ifi_frc_8722.lib
LIBPATH = C:\\mcc18\\lib
MAP = ifi_frc.map
RM = del
SOURCES = autonomous.c disabled.c ifi_code.c ifi_frc.c interrupts.c pwm.c \
serial_ports.c teleop.c timers.c
OBJECTS = $(SOURCES:.c=.o)
EXECUTABLE = ifi_frc
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(LD) /l"$(LIBPATH)" $(LDFLAGS) $(OBJECTS) $(LIBS) /m"$(MAP)" /w /o"$(EXECUTABLE).cof"
.c.o:
$(CC) $< -fo="$@" $(CFLAGS)
clean:
$(RM) $(OBJECTS) $(EXECUTABLE).cof $(EXECUTABLE).hex $(MAP)
__________________
John Downey
Lead Robot Inspector - Purdue IndianaFIRST District
Whitney Young Magnet High School/Robophins (FRC 4302) - Mentor (2013-current)
Midwest Regional Planning Committee - Member (2012-current)
Boilermaker Regional Planning Committee - Member (2011-2014)
Robot Inspector (2008-current)
Purdue FIRST Programs - Staff Advisor (2008-2011)
Lafayette-Jefferson High School/Precision Guessworks (FRC 1646) - Mentor (2006-2011)
Last edited by jtdowney : 05-01-2008 at 08:05.
Reason: mp2hex is ran automatically by the linker so it isn't needed
|