![]() |
Linux: steps to program fullsize RC robot
Post here if you need help and this doesn't work.
Current site: http://ryan.scv.net/x2545/pic Code:
Documentation IFI Linux PICloader setup Fullsize RC with MCC18 compiler:Ryan Waliany |
Re: Linux: steps to program fullsize RC robot
Hmm no luck getting the MPLAB IDE to run under Linux.
I've tried, wine version 20031212, XOffice, and WineX. And they all give me the same responce. The Microchip MPLAB IDE logo loads, and just stays there. Doesn't do anything else. Very strange; It would be nice of Micochip to offer us a C18 compiler... They can keep the IDE, just want the compile =\. *sigh*. Gonna keep trying to get the IDE |
Re: Linux: steps to program fullsize RC robot
The point of this thread is to show steps to bypass the MPLAB Ide allowing you to use any IDE or editor you want, anjuta, vim, or kate for example and be able to compile code and load it to the pic in Linux. MPLAB is limited, need I say more? MPLAB requires internet explorer 5....what for? If you want MPLAB to use the simulator, you should be able to wine the simulator dll mpsim.dll.
Once your done with these steps, you can edit the source files user_routines.c in any editor you would like, then type make in console and then picloader FrcCode.hex <device>, and you would have programmed the PIC with the same functionality as in Windows, with MPLAB etc... |
Re: Linux: steps to program fullsize RC robot
Let me see if I understand this:
The MPLAB_C18.exe is just the compiler; and not the IDE? (sorry, I don't have a copy of the CD; so I'm trying to figure this out.) |
Re: Linux: steps to program fullsize RC robot
Yes, MPLAB_C18 is the compiler.
|
Re: Linux: steps to program fullsize RC robot
Quote:
Note that there's a typo in the Makefile. The line that starts with MCC18DIR should read: Code:
MCC18DIR=$(USER_DIR)/.wine/fake_windows/mcc18/ |
Re: Linux: steps to program fullsize RC robot
Quote:
Also, the project page should be up now at http://ifi-picloader.sourceforge.net . Thanks for your interests, Ryan Waliany |
Re: Linux: steps to program fullsize RC robot
New release 0.3, it should be easier to install now and more user-friendly. Lots of makefile improvements with some suggestions from others. A serial reader will be coming in 0.4 which will allow you to debug using a terminal and read data from the program port.
http://ifi-picloader.sf.net/ |
Re: Linux: steps to program fullsize RC robot
heh, now all we need is a PocketPC running Linux and we'll be able to have a mobile programming and download platform ;)
|
Re: Linux: steps to program fullsize RC robot
compiler is x86 only, so you'll need a pc emulator. dunno how well those run on pocketpc.
|
Re: Linux: steps to program fullsize RC robot
eh, so it's only a mobile download platform. either way, it would still be fun ;)
|
Re: Linux: steps to program fullsize RC robot
Added some more suggestions from Michael Wu, will hopefully release 0.4 tomorrow with serial reader and fixed erasing pic for multiple memory banks.http://xp.scv.net/x2545/picloader/if...der.0.4.tar.gz Beta release
Working on make install, and moving to /usr/share/ifi-picloader/ |
Re: Linux: steps to program fullsize RC robot
I'm having trouble reproducing your results. I'm running Debian Sarge (testing) on my notebook, and tried to apt-get install wine. Upon configuring wine the way you suggest, I can't get the mcc18.exe compiler to work. It keeps bombing out with this error:
Code:
F:\Code\code>mcc18 -p=18F8520 -fo user_routines.o user_routines.c /i"C:\mcc18\h" -Ou- -Ot- -Ob- -Op- -Or- -Od- This is the version of wine I'm running: Code:
silas@frink:~$ wine --version |
Re: Linux: steps to program fullsize RC robot
check ~/.wine/config . you need to make sure the native, not wine, version of msvcrt is being used or mcc18 will die with some spawning error. oh, and you need a copy of msvcrt.dll too.
|
Re: Linux: steps to program fullsize RC robot
Thanks for the advice... One step closer in the right direction, but still not there. Hopefully if I can get this working, I can document the process and perhaps package something nice for people to easily get development up and running in Linux. Hopefully it'll help you focus on the excellent work you're doing with the clone of the IFI loader.
I copied my msvcrt.dll from my Windows XP machine (The copy in C:\Windows\System32, there were many copies) into my .../fake_windows/Windows/System32 directory in Linux. I made sure that msvcrt is trying to load native before loading the builtin. It now just refuses to load the exe with the following error: Code:
silas@frink:/var/silas/public/first2004/Code/code$ wine -- "C:\\mcc18\\bin\\mcc18.exe" -p=18F8520 -fo "F:\\Code\\code\\main.o" "F:\\Code\\code\\main.c"Thanks again for your help with this. Here's what my ~/.wine/config looks like: Code:
(Deleted because it was flippin' huge. My windows version line was wrong, see below for fix) |
Re: Linux: steps to program fullsize RC robot
install winesetuptk and that will help you get your config file working.
Why don't you want to use the dlls in their existing location? |
Re: Linux: steps to program fullsize RC robot
The ifi loader distribution comes with a copy of the dll. I think I extracted my copy from a win98 system.
|
Re: Linux: steps to program fullsize RC robot
Quote:
If all goes well, I might even be able to set up a CVS server with a repository for any team that might want one. Might be useful. Would be nice we we can reduce the code to cvs update && make && ifi_loader_clone foo.hex /dev/ttyS0 or something of that nature. Also, again not to step on your toes regarding the great work you're doing, but are we legally allowed to distribute the two dll files you have? It might be worth it just to be "clean" to instruct people to copy them from a Windows98 install, or obtain them by some other means. Not sure what the status is, but they're probably copyrighted Microsoft property. OK, so I copied the crt.dll and msvcrt.dll from the ifiloader tarball into my fake_windows/Windows/System (Not System32, as I did last time) and then changed the win version line in the config to: Code:
[Version]Trying to compile user_routines.c by hand, from the command line, I get this: Code:
silas@frink:code$ wine -- mcc18.exe -p=18F8520 -fo user_routines.o user_routines.c /i"C:\mcc18\h" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- |
Re: Linux: steps to program fullsize RC robot
Aye, it should work step by step. I believe the only problem was setting winever to winxp. I'm working on it. I think I could maybe release 0.4 today with the serial reader etc...Thanks for all your support.
Just to keep everyone posted, why I'm updating so slow: I have 10 H/Ap/College classes, Robotics, community service projects im co-leading, and some other contests I'm leading with two part-time jobs of programming at eSCV and AMDI, teaching AP Compsci AB starting in a couple weeks, etc... Thanks, Ryan Waliany |
Re: Linux: steps to program fullsize RC robot
Also for msvcrt.dll, I believe it would be fine if I added a disclaimer next version stating that the user should have a copy of the Windows operating system and it belongs to Microsoft. If someone could check in on how dll download places distribute msvcrt.dll please let me know. I believe a disclaimer is all.
|
Re: Linux: steps to program fullsize RC robot
Quote:
The chances of this ever actually being a problem for you if you decide to keep distributing the libraries are slim to none, I realize, but I'd just hate to see you hastled over something so trivial. |
Re: Linux: steps to program fullsize RC robot
what if I made them download it automatically with wget :-)
|
Re: Linux: steps to program fullsize RC robot
Quote:
|
Re: Linux: steps to program fullsize RC robot
New release 0.4.
Fixed memory, up to ~30kbytes around, tested with Kevin and Watsons infra-red, beacon, and navigation code along with FRC default code and my own code. Ansi color support makefiles, etc... dependencies... http://www.hartrobot.com/ifi.php http://www.hartrobot.com/downloads/i...der.0.4.tar.gz I will post a file upload soon, but it appears that the file upload system doesn't support .tar.gz, or im not sure why else it gave me a string error on upload. I'm in the process of switching servers to a new connection, so if hartrobot.com doesn't work replace www.hartrobot.com with 216.112.86.9/~hartrobot/ Thanks, Ryan Waliany |
Re: Linux: steps to program fullsize RC robot
Silly question, but is it possible to get feedback from the RC (i.e. via printf() calls in the program) via the picloader?
|
Re: Linux: steps to program fullsize RC robot
Yes, using the picreader program that is included, you can type picreader <device> it pipes the output to the terminal and reads the output from the serial port from "printf". This is a new feature that was added I believe in 0.3 or 0.4. This allows you to even add ANSI color standards to your debug output and make it all pretty even.
Example: [Debug: All systems running.] [Debug: Fatal Error bla bla bla] If anyone is interested in ANSI color I can probably write up a quick description of how it works. Thanks, Ryan Waliany |
Re: Linux: steps to program fullsize RC robot
Thanks a bunch :p ! I knew there was some kind of easy solution...
|
Re: Linux: steps to program fullsize RC robot
Quote:
BTW, Jeff, while doing some research on sending SMS, I found your name in some of the files of one of the packages I was looking at. What other things have you done? |
Re: Linux: steps to program fullsize RC robot
Quote:
I've looked in the tarball for 0.4 and 0.2 without success. This picreader doesn't seem to be in any of the Makefiles. I cannot find a tarball for 0.3 at http://ryan.scv.net/x2545/picloader. Where can I find this picreader application? Please post a link! |
Re: Linux: steps to program fullsize RC robot
I'm sorry those are old links, please refer to http://www.hartrobot.com/ifi.php Also, I'm sorry for responding slow, my e-mail was down and I didn't know anyone responded to here. That was a beta version of 0.4.
|
Re: Linux: steps to program fullsize RC robot
Quote:
Project 193 might be interesting to you guys... We're developing a robotics microcontroller targeted at educational use for first year college engineers. It's going to be much more robust than that, but the Engineering department is funding us so that's our primary goal. We're using an intel core with external modules that communicate over i2c. You can customize it however you like, adding as many motor modules, pwm modules, sensor modules, etc... as you like. Unfortunately we have a crap website now. You can look at the project page at: http://www.sf.net/projects/project193/ Actually, my SMS script broke a few weeks ago. With First and stuff, I haven't found the time to fix it, but some guy just emailed me a patch. I haven't heard back from him if he wants to maintain the script from now on or not, but I'll get that publically available soon. |
Re: Linux: steps to program fullsize RC robot
Interesting, I think after build season we're going to use one of my laptops as a robot controller, :-P and try to get someone to give us GPS and make a REALLY big robot.
|
| All times are GMT -5. The time now is 16:19. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi