Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   I want a version of the mplab compiler for Linux. (http://www.chiefdelphi.com/forums/showthread.php?t=36377)

Validius 20-03-2005 15:13

I want a version of the mplab compiler for Linux.
 
'nuff said

jdong 20-03-2005 16:31

Re: I want a version of the mplab compiler for Linux.
 
I'm the current maintainer of Linux stuff around here.... You need:

1. WINE
2. MCC18 from Microchip -- it runs under WINE
3. IFI Makefile -- see http://adambots-live.sourceforge.net/
4. Picloader: http://sf.net/projects/ifi-picloader

Validius 20-03-2005 16:56

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by jdong
I'm the current maintainer of Linux stuff around here.... You need:

1. WINE
2. MCC18 from Microchip -- it runs under WINE
3. IFI Makefile -- see http://adambots-live.sourceforge.net/
4. Picloader: http://sf.net/projects/ifi-picloader


I use WINE quite a bit and the software that was sent with the default kit wouldnt run. What is the differance between that and what you indicate?

[edit] Where do i get it? [/edit]

jdong 22-03-2005 06:51

Re: I want a version of the mplab compiler for Linux.
 
Install MCC18 using WINE, or copy from an existing Windows installation, over to /opt/mcc18. This is the path hardcoded into the makefile. Go to the appropriate Sourceforge project linked above, and download the latest ifi-makefile. You may have to browse CVS, as the latest version is awesome but not tested stable.

Ryan M. 22-10-2005 07:46

Re: I want a version of the mplab compiler for Linux.
 
(Oldish thread warning)

What version(s) of WINE work with the MCC18 compiler? I have 20050725 and get
Quote:

Originally Posted by mcc18 under WINE
fixme:msvcrt:_spawnve :not translating name /home/ryan/bin/mcc18/binmcc18-traditional to locate program
Error executing /home/ryan/bin/mcc18/binmcc18-traditional. File or path is not found

This happens when running mcc18, so it apparently starts up, then tries to launch mcc18-transitional, but some path translation is broken in the version of WINE I am running.

The version on the SF Adambots-live site is 2004something, and I'd really rather not go that far back... (Getting IE6 working under the current version was a pain; I can't imagine trying it with something older.)

--EDIT--
Oh, yeah, and what purpose do the "Z:"s before some of the paths in the Adambots-live Makefile server? I'm changing it so everything will be under my home directory. Sorry, don't know a bunch about shell scriptiing/makefiles.

jdong 23-10-2005 19:26

Re: I want a version of the mplab compiler for Linux.
 
Ok, Three things:

(1) you should link mcc18-traditional to mcc18-traditional.exe using the command [b]ln -sf /opt/mcc18/bin/mcc18-traditional.exe /opt/mcc18/bin/mcc18-traditional. This procedure must be repeated for cpp18 and _mplink.

(2) Check out http://adambots.gotdns.com/adambots-...k/configure.py -- Run "python configure.py" to auto-generate a Makefile within a project folder. Re-run after adding or removing files...

(3) Get the MCC wrapper scripts:
http://adambots.gotdns.com/adambots-...s/mcc-wrapper/

An RPM is available for RPM users; else just copy the three scripts to /usr/local/bin, making sure that they are chmodded +x

Ryan M. 24-10-2005 06:50

Re: I want a version of the mplab compiler for Linux.
 
Thanks! It works now.

Just as an FYI for others (although you'll figure it out I'm sure): user_routines.c has an include for user_Serialdrv.h, but it's actually named user_SerialDrv.h. Either rename the file or change the include statement. (I renamed, so it may have been in other places as well.)

nukem 04-11-2005 00:10

Re: I want a version of the mplab compiler for Linux.
 
Thank you guys sooo much! This really helped me out. Our school is a bunch of nazis that wont let us do anything on their computer and all I and the other programmers have are Linux machines. I just wish this was in gcc or microchip released a native linux version.

Ryan M. 14-01-2006 08:12

Re: I want a version of the mplab compiler for Linux.
 
1 Attachment(s)
I believe I have the new compiler working... (I have yet to test the generated hex file, but I have no reason to believe it to be in error. However, you've been warned. ;))
  1. Install mcc18 compiler to /opt/mcc18.
  2. Do step 1 of jdong's post. (above)
  3. Download the configure.py attached to this post. (I only changed the processor passed to MCC18. May not even be necessary, but just in case...)
  4. Do step 3 of jdong's post.
  5. Edit /opt/mcc18/h/p18cxxx.h and put
    Code:

    #undef __18F8722
    #define __18F8722

    starting right after #define _P18CXXX_H

This fix/hack makes compiling for multiple processors difficult (have to change /opt/mcc18/h/p18cxxx.h), but hey... if you're working on FIRST, you're using a certain processor anyways.

lasindi 14-01-2006 12:10

Re: I want a version of the mplab compiler for Linux.
 
Ryan, unfortunately I seem to be getting an error with the linker when I use your configure script. This is the output I get when I do "make" on the default code:
Code:

Linking...
mplink /l\""/opt/mcc18/lib"\" \""18f8722.lkr"\"  \""Z:\home\lasindi\.wine\drive_c\first\default_code\\FRC_library.lib"\" /m\""FrcCode.map"\" /o\""FrcCode.cof"\"
        Microchip MPLINK Linker
        Version 0.0+SVN20050725
DEBUG:Using wine /opt/mcc18//bin/_mplink /l"/opt/mcc18/lib" "18f8722.lkr" "Z:\home\lasindi\.wine\drive_c\first\default_code\FRC_library.lib" /m"FrcCode.map" /o"FrcCode.cof"  to launch mplink
MPLINK 3.90, Linker

Copyright (c) 2004 Microchip Technology Inc.

Error - no input object files specified.

Errors    : 1




Traceback (most recent call last):
  File "/home/lasindi/bin/mplink", line 51, in ?
    raise Exception,"Link Failed"
Exception: Link Failed
make: *** [FrcCode.hex] Error 1

Is there something I need to change in the makefile or configure script, or do you think this is a problem with the mplink wrapper script?

I also wonder whether or not my WINE install might be the problem. I'm running Ubuntu with wine 20050725 (the binary I got using apt-get). Which distro and wine version are you running?

nukem 14-01-2006 12:22

Re: I want a version of the mplab compiler for Linux.
 
First of all you do not need to change anything in the code to get the 2006 code to compile for the 2006 controller, all you have to do is change a couple of things in the make file.

In the Makefile change the PIC to 18F8722 and the ARGS to ARGS=-D_FRC_BOARD -O+ -nw=2066. You do not need to install to /opt/mcc you can install anywere you want. For example I installed into ~/.wine/drive_c/mcc18 if you want to do that change the LIB CODE and INCLUDE paths to where ever you installed. I dont remember if I had to add or take out anything in ALL_TARGETS and INCLUDE_FILES but if you get an error from the linker about a file not being there add it. The reason why the code will fail sometimes is because he has gcc check deps to fix this add -D__$(PIC) to the line starting with cpp. Anyway I probably confused the hell out of everyone so ill post mine below.

Code:

#This is automatically generated by the configure.py script
#Keep your dirty hands off
#Run ./configure.py to generate a fresh one.
MCC18=./mcc18
PIC=18F8722 # Don't change
ARGS=-D_FRC_BOARD -O+ -nw=2066
LINKER=./mplink
MP2HEX=./mp2hex
IFILOAD=picloader_textmode
SERIAL_DEV=/dev/ttyS0
READLOG=./read.log
LIB_PATH=/home/nuke/.wine/drive_c/mcc18/lib
CODE_PATH=Z:\home\nuke\FIRST\frc-code-1-04-2006\\
INCLUDE_PATH=/home/nuke/.wine/drive_c/mcc18/h
INCLUDE_PATHW=Z:\\home\\nuke\\.wine\\drive_c\\mcc18\\h




ALL_TARGETS=user_routines_fast.o ifi_startup.o ifi_utilities.o user_routines.o user_Serialdrv.o main.o
INCLUDE_FILES= ifi_default.h ifi_utilities.h user_routines.h user_Serialdrv.h delays.h ifi_aliases.h
############ Targets:
default: FrcCode.hex

#Remove all the individual file backup (The files ending with ~)
#NOTE that this does NOT remove your tbz2 backups!
clean-backup-files:
        @echo -e "Removing all the ~ backup files your annoying editor makes..."
        @find . -name "*~" |xargs rm -f

#Removes all compiled files from the directory
clean: clean-backup-files clean-deps nohex
        @echo -e "Cleaning compiler intermediate files..."
        @rm -rf *.o *.err

#Remove deps folder
clean-deps:
        @echo -e "Cleaning dependency folder..."
        @rm -rf .deps
        @mkdir .deps
        @touch .deps/dummy

#Remove hexfiles
nohex:
        @echo -e "Cleaning linker output and hex files..."
        @rm -rf *.hex *.cod *.cof

#These all start the IFI Loader.
safeload: prettycode clean check load
load: FrcCode.hex
        $(IFILOAD) FrcCode.hex $(SERIAL_DEV)

read:
        @echo -e "Monitoring $(SERIAL_DEV) for data"
        @echo -e "Output will also be logged to $(READLOG)"
        @echo -e "---------"
        @cat $(SERIAL_DEV) | tee $(READLOG) || /bin/true
       
       
prettycode:
        @echo -e "Using indent to autoformat your .c and .h files..."
        @indent *.c *.h
all: clean FrcCode.hex
%.o: %.c
        @echo -e "Compiling $@..."
        @echo -e "1.  Checking Dependencies for $@"
        @cpp -nostdinc -isystem $(INCLUDE_PATH) -M -MP -D__$(PIC) $< -MF .deps/$*.deps
        @echo -e "2.  Launching Compiler..."
        @$(MCC18) -p=$(PIC) -fo $@ $< /i\""$(INCLUDE_PATHW)"\" $(ARGS)
        @echo -e "Done with $@."




FrcCode.hex :  $(ALL_TARGETS) $(INCLUDE_FILES)
        @echo -e "Linking..."
        $(LINKER) /l\""$(LIB_PATH)"\" \""18f8722.lkr"\" $(ALL_TARGETS) \""$(CODE_PATH)FRC_library.lib"\" /m\""FrcCode.map"\" /o\""FrcCode.cof"\"
        $(MP2HEX) FrcCode.cof



.deps/*:
        @echo -e "Creating Dependency Makefiles..."
        @mkdir -p .deps
        @touch .deps/dummy
        @echo -e "Done!"

include .deps/*

As for the ifi-pictools has anyone got code to load on the 2006 controller? The numbers roll but I dont know anything is being loaded onto the controller.

psquared89 14-01-2006 16:52

Re: I want a version of the mplab compiler for Linux.
 
Sorry about the delay guys. I'm at Siemens (our build site) with the beloved John Dong right now, we've updated the configure.py script for the '06 stuff.

Put http://adambots.gotdns.com/adambots-...o/configure.py in your project folder, then run it with "python configure.py" to generate Makefiles. Re-run it every time you add/remove c/h files from the project.

lasindi 14-01-2006 22:31

Re: I want a version of the mplab compiler for Linux.
 
I figured out my problem. The configure.py script depends on gawk, and I didn't have it installed. Once I installed gawk, everything works great. Thanks to everyone for your help and your code!

nukem 15-01-2006 03:28

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by lasindi
I figured out my problem. The configure.py script depends on gawk, and I didn't have it installed. Once I installed gawk, everything works great. Thanks to everyone for your help and your code!

Two things, first have you gotten it to load code with the ifi-pictools or have you made code changes to that also? Second, I was thinking why not have the script read the project files from MPLab and use that to set everything(PIC type, CFLAGs, etc)? Once it reads the file it could ask the user if they want to use the ones imported from the file or edit it themselves. I was going to do it myself but I dont have any time(playing with the camera too much heh)

Validius 20-01-2006 21:10

Re: I want a version of the mplab compiler for Linux.
 
wow, i have never made a thread that lasted this long. I'd be doing devel work off my MacLux computer if i could convince myself to for over for a USB-Serial converter.

Rock on *nux nerds!!

Goldeye 04-02-2006 18:58

Re: I want a version of the mplab compiler for Linux.
 
Bump.

Quote:

Originally Posted by psquared89
Sorry about the delay guys. I'm at Siemens (our build site) with the beloved John Dong right now, we've updated the configure.py script for the '06 stuff.

Put http://adambots.gotdns.com/adambots-...o/configure.py in your project folder, then run it with "python configure.py" to generate Makefiles. Re-run it every time you add/remove c/h files from the project.

Where can I find this now?

Goldeye 04-02-2006 20:26

Re: I want a version of the mplab compiler for Linux.
 
1 Attachment(s)
Quote:

Originally Posted by jdong
Ok, Three things:

(1) you should link mcc18-traditional to mcc18-traditional.exe using the command ln -sf /opt/mcc18/bin/mcc18-traditional.exe /opt/mcc18/bin/mcc18-traditional. This procedure must be repeated for cpp18 and _mplink.

(3) Get the MCC wrapper scripts:
http://adambots.gotdns.com/adambots-...s/mcc-wrapper/

An RPM is available for RPM users; else just copy the three scripts to /usr/local/bin, making sure that they are chmodded +x


Nevermind. I managed to fix it. Working configure.py attached. Do the above stuff (part 2 was excluded) to get it working. I made it compatible with both RCs, and also made it `make clean` when you run the configure. That can be disabled if you have a slow computer. Set CLEAN near the top to False.

Run ./configure.py old to make it build for the old rc.
Run ./configure.py alltimers to use FRC_alltimers.lib.
You can mix both for the expected effect.

I can't test upload till morning though.

tux 07-10-2006 11:49

Re: I want a version of the mplab compiler for Linux.
 
This link is dead:
http://adambots.gotdns.com/adambots-...o/configure.py

But I found this one...
http://adambots.gotdns.com/adambots-...k/configure.py

Ahh.. never mind. I see now that you posted a link to the updated version.

tux 07-10-2006 14:13

Re: I want a version of the mplab compiler for Linux.
 
I was getting an error while linking ...

Error - could not find definition of symbol 'Serial_Char_Callback' in file './user_SerialDrv.o'.


But I figured out that the function had been deleted from user_routines_fast.c

It is compiling and linking just fine now.

Don Reid 10-10-2006 00:46

Re: Wine version
 
We found that mcc18 doesn't work with recent versions of wine. One of the changes made between 0.9.18 and 0.9.19 seems to be the culprit. So you may want to stay with 0.9.18 or older.

114Klutz 26-10-2006 18:09

Re: I want a version of the mplab compiler for Linux.
 
Does 0.9.23 work well? Or does that one also have similar problems?

Don Reid 27-10-2006 13:47

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by 114Klutz
Does 0.9.23 work well? Or does that one also have similar problems?

I don't think we have tried it yet.

meatmanek 18-02-2007 23:50

Re: I want a version of the mplab compiler for Linux.
 
Things hosted on adambotslive are gone.

bagawk 19-02-2007 00:42

Re: I want a version of the mplab compiler for Linux.
 
We have a makefile that originally was made by that script and has been heavily modified. Grab it here: http://www.chsrobotics.com/files/Makefile

It should be fairly self-explanatory.

ScottWalls 20-02-2007 06:46

Re: I want a version of the mplab compiler for Linux.
 
We have moved all of hour hosting. You can find everything (with Bazaar) at...
http://adambots.gotdns.com/bzr/mcc-wrapper/

Thank you all and keep on trucking.

meatmanek 20-02-2007 14:29

Re: I want a version of the mplab compiler for Linux.
 
I got configure.py and mcc-wrapper from adambots' bzr server. I copied mcc18 from our team's programming laptop, and put it into /opt/mcc18. I made symbolic links according to the suggestion earlier in this thread. I edited /opt/mcc18/h/p18cxxx.h. I ran configure.py, and when I run make, I get this error:

[code][Compiling ifi_utilities.o...
1. Checking Dependencies for ifi_utilities.o
2. Launching Compiler...
A thought to keep you occupied: /bin/sh: /usr/games/fortune: No such file or directory
Fortune not found.
Microchip MCC C18 Compiler
Version 0.0+SVN20050725
DEBUG:Using wine /opt/mcc18//bin/mcc18-traditional -p=18F8520 -fo ifi_utilities.o ifi_utilities.c /i"Z:\opt\mcc18\h" -D_FRC_BOARD -w3 pa=3 -O+ -nw=2066 -mL to launch MCC18
fixme:msvcrt:_spawnve only trying .exe when no extension given
Z:\home\meatmanek\techhounds\svn\test\ifi_utilitie s.c:0:Error: syntax error


Traceback (most recent call last):
File "/usr/local/bin/mcc18", line 49, in ?
raise Exception,"Compile FAILED"
Exception: Compile FAILED
make: *** [ifi_utilities.o] Error 1
/CODE]

meatmanek 20-02-2007 15:37

Re: I want a version of the mplab compiler for Linux.
 
Figured out my previous problem. Wine 0.9.22 has problems, so I updated to 0.9.29. Now I get a new error:

Code:

Compiling ifi_utilities.o...
1.  Checking Dependencies for ifi_utilities.o
2.  Launching Compiler...
A thought to keep you occupied:  /bin/sh: /usr/games/fortune: No such file or directory
Fortune not found.
        Microchip MCC C18 Compiler
        Version 0.0+SVN20050725
DEBUG:Using wine /opt/mcc18//bin/mcc18-traditional -p=18F8520 -fo ifi_utilities.o ifi_utilities.c /i"Z:\opt\mcc18\h" -D_FRC_BOARD -w3 pa=3 -O+ -nw=2066 -mL  to launch MCC18
fixme:msvcrt:_spawnve only trying .exe when no extension given
Z:\home\meatmanek\techhounds\svn\test\ifi_utilities.c:104:Message [3002] comparison of a signed integer to an unsigned integer detected

Z:\home\meatmanek\techhounds\svn\test\ifi_utilities.c:128:Message [3002] comparison of a signed integer to an unsigned integer detected

Z:\home\meatmanek\techhounds\svn\test\ifi_utilities.c:206:Error [1105] symbol 'ADC_0_TAD' has not been defined

Z:\home\meatmanek\techhounds\svn\test\ifi_utilities.c:207:Error [1204] too many arguments in function call


Traceback (most recent call last):
  File "/usr/local/bin/mcc18", line 49, in ?
    raise Exception,"Compile FAILED"
Exception: Compile FAILED
make: *** [ifi_utilities.o] Error 1

Lines 206 and 207 are:
OpenADC( ADC_FOSC_RC & ADC_RIGHT_JUST & ADC_0_TAD,
ADC_channel & ADC_INT_OFF & ADC_VREFPLUS_VDD & ADC_VREFMINUS_VSS,15);

jdejoannis 20-02-2007 16:02

Re: I want a version of the mplab compiler for Linux.
 
Even by workaround standards, wine is a bad solution.

What are possibilities for a native linux port of only the C18 compiler? Perhaps there are volunteers who are willing to help.

Astronouth7303 21-02-2007 00:19

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by jdejoannis (Post 582578)
What are possibilities for a native linux port of only the C18 compiler? Perhaps there are volunteers who are willing to help.

That wouldn't be a port. That would be a whole new compiler.

Why? We have no source.

Unless someone wants to convince Microchip that there is a legitimate market for a linux compiler.

meatmanek 21-02-2007 11:08

Re: I want a version of the mplab compiler for Linux.
 
If we're lucky, SDCC will get support for pic18 soon.

I don't see anything wrong with using wine, though. This is exactly what it's meant for - running windows programs on linux.

JBotAlan 18-05-2007 21:03

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by ScottWalls (Post 582251)
We have moved all of hour hosting. You can find everything (with Bazaar) at...
http://adambots.gotdns.com/bzr/mcc-wrapper/

Thank you all and keep on trucking.

Sorry about reviving an old thread...but I want to get this working.

This URL does work, but there are no files in any of the directories...where can I get the files needed to get compiling working under Ubuntu?

Thanks,
JBot

Cuog 18-05-2007 23:02

Re: I want a version of the mplab compiler for Linux.
 
You need to install and run Bazaar to browse the directories otherwise nothing shows up I'm assuming that you can get Bazaar via apt-get if you need

JBotAlan 19-05-2007 12:10

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by Cuog (Post 627897)
You need to install and run Bazaar to browse the directories otherwise nothing shows up I'm assuming that you can get Bazaar via apt-get if you need

Oh, how stupid of me:o

I didn't even know what Bazaar was--thanks for putting up with a Linux noob...

I will try this out later today (I'm booted into WinXP, running a proxy--yes I know I could do this under Ubuntu, I just didn't know how offhand--and my dad is using it right now. I'll reboot back into Linux when I get the chance).

JBot

Tom Bottiglieri 18-10-2007 15:55

Re: I want a version of the mplab compiler for Linux.
 
It seems all of the adambots material has been moved. Can anyone post a mirror?

neutrino15 03-11-2007 13:48

Re: I want a version of the mplab compiler for Linux.
 
Our team has been using wine with C-18 via under ubuntu (dapper?) for quite some time now. It is the weekend, so I don't have access to the team computer. I will try and gather up all of the needed files and post them to our server next week.

I forget what version of WINE we run, but we really have not bothered to update it in a very long time. When it started to work, we didn't want to mess it up with another update! ;)

Until then, has anybody had luck with the c18 compiler under the latest wine (0.9.48)? Also, I use a macbook intel c2d running leopard 10.5. They have released Darwine 0.9.48. Does anybody use darwine? Can you report your experiences? (I have only had bad ones with darwine in the past.)

My other option, of course, is parallels.. Which I already own. But really, who wants to use windows to program when you have a mac in front of you! (or linux, same point!)


Reguards-
-Jordan P

bagawk 05-11-2007 20:34

Re: I want a version of the mplab compiler for Linux.
 
I have 0.9.48 working fine under OS X 10.5 here. I compiled from source, the macports version does not build right now. I tried darwine some time ago (year+), but it never worked well.

Also, the makefile I use is available here: http://team997.org/files/software/Makefile

Should work fine with maybe a couple little modifications.

gauntletguy 19-12-2007 21:53

Re: I want a version of the mplab compiler for Linux.
 
it seems that the server for the wrapper scripts is down, is there another way i can get them?

keen101 20-12-2007 12:44

Re: I want a version of the mplab compiler for Linux.
 
Yeah, It'd be great if there was some sort of Open Source alternative to MPLAB.

Something that anyone (not just Linux users) could use.

It could be made to be Windows, MAC, AND Linux compatible.

bear24rw 20-12-2007 14:42

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by keen101 (Post 661943)
Yeah, It'd be great if there was some sort of Open Source alternative to MPLAB.

Something that anyone (not just Linux users) could use.

It could be made to be Windows, MAC, AND Linux compatible.

MPLAB is not the problem, you could use anything in place of it (our team uses code::blocks) its the mcc18 compiler that's the issue, its win32 only

keen101 21-12-2007 02:09

Re: I want a version of the mplab compiler for Linux.
 
OK, but either way it be great to have an Open Source solution.


That way it could be used by ANYONE who would want to use it.


...AND the great thing about Open Source is that FIRST would not even have to maintain it. The community would.

neutrino15 22-12-2007 03:08

Re: I want a version of the mplab compiler for Linux.
 
I agree wholeheartedly.

Quote:

FIRST would not even have to maintain it. The community would.
There was somebody trying to write and eclipse plugin for FIRST.. Don't know what happened there.. I hope that FIRST takes our requests seriously as they plan the '09 Robot Controller. There is no reason why FIRST can't move to open source. (Unless there are some behind the scenes deals going on! Though I doubt that..) Aaaanyway, best thing to do for now is to either bite the bullet and get a windows box up and running with mplab/c18, or use the makefile/wine/text editor.

personally: I use linux in the lab (we have 2 thinkpads with xubuntu) with the makefile/wine workaround. At home (and sometimes in the lab), I just use VMWare + MPLab on my Macbook. However, I usually edit the text code in OSX and then fire up MPLAB in the lab to load code. While 20GB just for a robot code loader is INSANE (granted I did put autodesk on it), i sometimes forget that I am dealing with operating systems here...

HighLife 24-12-2007 11:45

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by meatmanek (Post 582557)
Figured out my previous problem. Wine 0.9.22 has problems, so I updated to 0.9.29. Now I get a new error:

Code:

Compiling ifi_utilities.o...
1.  Checking Dependencies for ifi_utilities.o
2.  Launching Compiler...
A thought to keep you occupied:  /bin/sh: /usr/games/fortune: No such file or directory
Fortune not found.
        Microchip MCC C18 Compiler
        Version 0.0+SVN20050725
DEBUG:Using wine /opt/mcc18//bin/mcc18-traditional -p=18F8520 -fo ifi_utilities.o ifi_utilities.c /i"Z:\opt\mcc18\h" -D_FRC_BOARD -w3 pa=3 -O+ -nw=2066 -mL  to launch MCC18
fixme:msvcrt:_spawnve only trying .exe when no extension given
Z:\home\meatmanek\techhounds\svn\test\ifi_utilities.c:104:Message [3002] comparison of a signed integer to an unsigned integer detected

Z:\home\meatmanek\techhounds\svn\test\ifi_utilities.c:128:Message [3002] comparison of a signed integer to an unsigned integer detected

Z:\home\meatmanek\techhounds\svn\test\ifi_utilities.c:206:Error [1105] symbol 'ADC_0_TAD' has not been defined

Z:\home\meatmanek\techhounds\svn\test\ifi_utilities.c:207:Error [1204] too many arguments in function call


Traceback (most recent call last):
  File "/usr/local/bin/mcc18", line 49, in ?
    raise Exception,"Compile FAILED"
Exception: Compile FAILED
make: *** [ifi_utilities.o] Error 1

Lines 206 and 207 are:
OpenADC( ADC_FOSC_RC & ADC_RIGHT_JUST & ADC_0_TAD,
ADC_channel & ADC_INT_OFF & ADC_VREFPLUS_VDD & ADC_VREFMINUS_VSS,15);

I'm getting this same exact error. Can anyone help me with this?

By the way I'm using the 2007 FIRST default code to test this.

meatmanek 24-12-2007 11:51

Re: I want a version of the mplab compiler for Linux.
 
It's been about a year since I touched mcc18 on linux. I did get it working, I can't remember how though, and my linux box is offline for break. I think I had to get in touch with jdong or one of his teammates to get some help. I'll try to help once I get back to my dorm, but that's not going to be until mid january or so.

Richard McClellan 24-12-2007 13:18

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by neutrino15 (Post 662778)
There was somebody trying to write and eclipse plugin for FIRST.. Don't know what happened there..

Our team is planning on switching over from the default code provided by IFI to the WPILib libraries that WPI put together a few years ago. There are instructions on their website on how to use it with Eclipse, though I haven't tried walking through it myself yet.

whitetiger0990 24-12-2007 15:01

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by HighLife (Post 663396)
I'm getting this same exact error. Can anyone help me with this?

By the way I'm using the 2007 FIRST default code to test this.

Could that be the pathlength thing of mcc18? Make a drive letter point directly into your code (or put your code in /tmp for testing) and try it.

HighLife 24-12-2007 16:53

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by whitetiger0990 (Post 663506)
Could that be the pathlength thing of mcc18? Make a drive letter point directly into your code (or put your code in /tmp for testing) and try it.

Nope that didn't work. :(

Mark McLeod 24-12-2007 17:37

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by HighLife (Post 663396)
I'm getting this same exact error.

The error you are getting means the type of PIC hasn't been defined, so the ifi_utilities.c file can pick the proper system defines that match what the PIC has built into it.

Simply put, you are missing a compile flag (-D__18F8722).

bagawk 24-12-2007 17:39

Re: I want a version of the mplab compiler for Linux.
 
Could you try the makefile that I wrote? I have been using it for almost 3 years now with no problems.

http://team997.org/files/software/Makefile

HighLife 24-12-2007 18:15

Re: I want a version of the mplab compiler for Linux.
 
Nvm guys I reinstalled mcc18 and everything worked! But thx for the help

Mark McLeod 24-12-2007 18:25

Re: I want a version of the mplab compiler for Linux.
 
Quote:

Originally Posted by HighLife (Post 663531)
I must have missed something when I setup mcc18.

What version of mcc18 are you using? It looks like it might be the latest version 3.x when it should be v2.4.

HighLife 24-12-2007 23:52

Re: I want a version of the mplab compiler for Linux.
 
Umm not really sure it's an older version (At least 2004).

sea_master 15-03-2008 09:22

Re: I want a version of the mplab compiler for Linux.
 
Hi.
I'm trying to compile some new code on a Xubuntu Linux machine.
I've modified the relatively newer makefile in:
http://team997.org/files/software/Makefile
I've modified it according to my needs and it all seemed to work well,
until I tried to remove the intermediate files . when it tries to
complie the source files, it can't get the headers from the include
dir of mcc even tough the path seems right.
I've checked and the syntax used by the Makefile is /i <path> while
mmc18.exe expects -I="<path>".
I tried to change the makefile anyway I thought might work, but could
not get it to work, so I gave up and
I've made a script shell, and it works, but since I'm unfamiliar with
the tricks of Linux shell, it's butt ugly (with lot's of lines like
this: wine c:/mcc18/bin/mcc18.exe -p=18f8722 -I="c:\mcc18\h"
"ifi_frc.c" -fo="ifi_frc.o" -k -mL -Ou- -Ot- -Op- -Or--Od- -Opa-)
So please Chief Delphi! pimp my script!

HighLife 16-03-2008 22:54

Re: I want a version of the mplab compiler for Linux.
 
You don't have to create your own makefile. You can just use this little python program that creates one for you based on the files in your code directory.


All times are GMT -5. The time now is 18:07.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi