View Single Post
  #12   Spotlight this post!  
Unread 21-11-2008, 10:24
rfrank's Avatar
rfrank rfrank is offline
Programmer
AKA: Russell Frank
FRC #0041 (RoboWarriors)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2007
Location: Somerset, New Jersey
Posts: 19
rfrank will become famous soon enough
Re: MPLAB alternatives?

@whitetiger0990: Why use cygwin instead of MSYS?

@juan abba: I did this once. My makefile looks like this:

Code:
rfrc : rfrc_41.o rfrc_main.o rfrc_init.o rfrc_interrupts.o
	mplink 18f8722.lkr rfrc_41.o ifi_frc_8722.lib rfrc_main.o rfrc_init.o \
    rfrc_interrupts.o //o rfrc

rfrc_41.o : rfrc_41.c rfrc_41.h rfrc_main.h
	mcc18 -Op- -fo rfrc_41.o rfrc_41.c

rfrc_main.o : rfrc_main.c rfrc_main.h
	mcc18 -Op- -fo rfrc_main.o rfrc_main.c 

rfrc_init.o : rfrc_init.c rfrc_init.h
	mcc18 -Op- -fo rfrc_init.o rfrc_init.c 

rfrc_interrupts.o : rfrc_interrupts.c rfrc_interrupts.h rfrc_main.h
	mcc18 -Op- -fo rfrc_interrupts.o rfrc_interrupts.c

clean :
	rm -rf *.o; rm -rf *.hex
	rm -rf rfrc
	rm -rf rfrc.cod
	rm -rf rfrc.lst
I wrote this when I was still bad at writing makefiles, so now I'd probably make a rule to compile all objects, but the above does work and is also a bit easier to understand, I think.

And, although my code was never tested (so it could be completely terrible and bad), you can find the entire repository here: svn://home.russfrank.net/development/team41_2008/rfrc/ . (If you need an SVN client for windows, try TortoiseSVN: http://tortoisesvn.tigris.org/) It does compile, but I never actually put it on an RC.

Hope this helps!