![]() |
I want a version of the mplab compiler for Linux.
'nuff said
|
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 |
Re: I want a version of the mplab compiler for Linux.
Quote:
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] |
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.
|
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:
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. |
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 |
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.) |
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.
|
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. ;))
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. |
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...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? |
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 |
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. |
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!
|
Re: I want a version of the mplab compiler for Linux.
Quote:
|
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!! |
Re: I want a version of the mplab compiler for Linux.
Bump.
Quote:
|
Re: I want a version of the mplab compiler for Linux.
1 Attachment(s)
Quote:
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. |
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. |
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. |
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.
|
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?
|
Re: I want a version of the mplab compiler for Linux.
Quote:
|
Re: I want a version of the mplab compiler for Linux.
Things hosted on adambotslive are gone.
|
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. |
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. |
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] |
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...OpenADC( ADC_FOSC_RC & ADC_RIGHT_JUST & ADC_0_TAD, ADC_channel & ADC_INT_OFF & ADC_VREFPLUS_VDD & ADC_VREFMINUS_VSS,15); |
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. |
Re: I want a version of the mplab compiler for Linux.
Quote:
Why? We have no source. Unless someone wants to convince Microchip that there is a legitimate market for a linux compiler. |
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. |
Re: I want a version of the mplab compiler for Linux.
Quote:
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 |
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
|
Re: I want a version of the mplab compiler for Linux.
Quote:
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 |
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?
|
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 |
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. |
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?
|
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. |
Re: I want a version of the mplab compiler for Linux.
Quote:
|
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. |
Re: I want a version of the mplab compiler for Linux.
I agree wholeheartedly.
Quote:
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... |
Re: I want a version of the mplab compiler for Linux.
Quote:
By the way I'm using the 2007 FIRST default code to test this. |
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.
|
Re: I want a version of the mplab compiler for Linux.
Quote:
|
Re: I want a version of the mplab compiler for Linux.
Quote:
|
Re: I want a version of the mplab compiler for Linux.
Quote:
|
Re: I want a version of the mplab compiler for Linux.
Quote:
Simply put, you are missing a compile flag (-D__18F8722). |
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 |
Re: I want a version of the mplab compiler for Linux.
Nvm guys I reinstalled mcc18 and everything worked! But thx for the help
|
Re: I want a version of the mplab compiler for Linux.
Quote:
|
Re: I want a version of the mplab compiler for Linux.
Umm not really sure it's an older version (At least 2004).
|
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! |
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