|
|
|
#1
|
||||
|
||||
|
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)
Last edited by jtdowney : 05-01-2008 at 08:05. Reason: mp2hex is ran automatically by the linker so it isn't needed |
|
#2
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Forgive my noobiness, but is that makefile what I need to develop on ubuntu? Set up c18 in wine, put the file in the directory with the code and do a make? Will that give me a loadable hex file? There was another makefile posted earlier that looked like it was made for Linux, should I use that?
|
|
#3
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
|
|
#4
|
|||||
|
|||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
Thank you. Thank you. Thank you. Team 832 (as well as other Georgia teams I help with their programming) will definitely make use of your new version. All of the FIRST community is in your debt for helping all of the teams. Mannie Lowe |
|
#5
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
When installing/updating your C18 compiler, (I went with 3.15 and am going to add the #endif that was mentioned earlier) there is a page of options after choosing which components to install that has the following: [ ] Update MPLAB IDE to use this MPLAB C18 [ ] Update MPLAB IDE to use this MPLINK Linker, MPLIB Librarian, and MPASM Assembler Check them! ![]() Last edited by JohnC : 07-01-2008 at 00:50. Reason: fixed advice |
|
#6
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
![]() can someone point me in the direction of a tutorial in which i can use this code to program our new 2008 bot? also is there a way of reading the printf statements in an executed program without having to upload onto our robot? Last edited by SuspectZero : 07-01-2008 at 00:55. |
|
#7
|
|||
|
|||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
As far as prtinf goes, if you place your robot on blocks (so that the wheels are spinning freely and not touching anything) and you keep the programming cable connected to the computer, you will see the results of all printf's in the terminal window that pops up after you're done downloading code usinng IFI Loader. Hope this helps. |
|
#8
|
|||
|
|||
|
Hi,
I'm a freshman in my team, but i have a lot of C experience and was able to decrypt lasts years code. First of all I really like this layout much better. Is there bugs in the code to the point where i should not use part of it for the code this year. Also i know this requires a 3.0+ complier and i was wondering what complier the FIRST FRC controller is meant to work with. I might have this all totally wrong with complier versions because I am new to the complier and also to FIRST. Thanks 1jbinder Team 852 |
|
#9
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
|
|
#10
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
|
#11
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Here's my first cut at C18 2.4 compatible code:
http://kevin.org/frc/ifi_frc_24_beta.zip http://kevin.org/frc/ifi_frc_gyro_24_beta.zip (with ADC and gyro code) Remember this is experimental code, so please do me (and everyone else who might use this code) a favor and let me know if you run into any bugs. Thanks. -Kevin |
|
#12
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
Thanks, Eric |
|
#13
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
-Kevin |
|
#14
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Quote:
|
|
#15
|
||||
|
||||
|
Re: New C18 3.0+ Compatible FRC Code
Hey, i really like the look! I'm having this problem when i try to compile:
Code:
MPLINK 4.1, Linker Copyright (c) 2006 Microchip Technology Inc. Error - could not find file 'C:\2008 FRC\frc_library_24\ifi_frc_8722_24.lib'. Errors : 1 EDIT: Fixed it (for anyone else, add the library file again (project menu) wherever you installed it) now i'm getting: Code:
MPLINK 4.1, Linker Copyright (c) 2006 Microchip Technology Inc. Error - Coff file format for 'ifi_frc_library.o' is out of date. Error - Could not build member 'ifi_frc_library.o' in library file 'Z:\My Documents\robotics\ifi_frc_24\ifi_frc_8722_24.lib'. Errors : 2 Last edited by paulcd2000 : 07-01-2008 at 16:10. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Does the camera code suits to all versions of MPLAB and C18? | razer | Programming | 3 | 04-01-2007 14:50 |
| Trying to follow C18 interrupt context code... | dcbrown | Programming | 5 | 21-12-2006 09:01 |
| Error w/ FRC code | JamesBrown | Programming | 2 | 08-01-2005 16:17 |
| Programming code Fix FRC | Ferazel2001 | Programming | 6 | 08-02-2004 02:46 |
| FRC default code | hedgehogger | Programming | 2 | 21-01-2004 18:41 |