Go to Post This thread is a reminder to myself that I have 29 more days to sleep. :) - Seth Mallory [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-01-2004, 16:56
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
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:

Non-root setup (advanced users):
Same steps as "root setup"
 Additional steps
 edit ~/picloader/code/Makefile # change user directory to yours
 chmod permissions <device>     # on startup
 cp picloader /usr/bin          # cp picloader to binary directory as root

Gentoo (root setup):
cd ~/
wget http://ryan.scv.net/x2545/picloader/...der.0.2.tar.gz # get the file
emerge wine                        # installs package
wine                               # installs wine basic setup information
mount /dev/cdrom /mnt/cdrom        # pipe the cdrom to /mnt/cdrom
cd /mnt/cdrom                      # change local directory to /mnt/cdrom
wine MPLAB_C18.exe                 # start the install, install it to default directory c:/mcc18
cd ~/                              # change to home directory
(editor) ~/.wine/config            # add path
@ 77
- "Path" = "c:\\Windows;c:\\Windows\\System;f:\\;h:\\;z:\\"
+ "Path" = "c:\\Windows;c:\\Windows\\System;f:\\;h:\\;z:\\;c:\\mcc18\\bin;h:\\ifi-picloader\\code"
@ 90
- "Windows" = "win98"
+ "Windows" = "winxp"

cd ~/
tar -xzvf ifi-picloader.0.2.tar.gz # extract the file
cd ifi-picloader                   #
make                               # compile the Linux programmer for the RC
cd code                            # change to where all the code should be done for your robot
make                               # compile the code in the code directory
picloader FrcCode.hex <device>     # write program to serial device, usually /dev/ttyS0 com1

# Device samples
# Com1 = "/dev/ttyS0"
# Com2 = "/dev/ttyS1"
# Com3 = "/dev/ttyS2"
# USBSerial (pl2303) = "/dev/usb/tts/0"
Thanks,
Ryan Waliany
__________________
R
  #2   Spotlight this post!  
Unread 09-01-2004, 20:40
Servo888 Servo888 is offline
Registered User
#0062 (Grobot)
 
Join Date: Sep 2003
Location: Birmingham
Posts: 13
Servo888 is an unknown quantity at this point
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
__________________
  #3   Spotlight this post!  
Unread 10-01-2004, 02:01
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
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...
__________________
R

Last edited by rwaliany : 10-01-2004 at 02:05.
  #4   Spotlight this post!  
Unread 10-01-2004, 18:51
Servo888 Servo888 is offline
Registered User
#0062 (Grobot)
 
Join Date: Sep 2003
Location: Birmingham
Posts: 13
Servo888 is an unknown quantity at this point
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.)
__________________
  #5   Spotlight this post!  
Unread 10-01-2004, 19:18
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
Re: Linux: steps to program fullsize RC robot

Yes, MPLAB_C18 is the compiler.
__________________
R
  #6   Spotlight this post!  
Unread 17-01-2004, 20:06
ScottWolchok ScottWolchok is offline
Pwnt.
#0217 (ThunderChickens)
Team Role: Programmer
 
Join Date: Oct 2003
Rookie Year: 2004
Location: Utica, MI
Posts: 23
ScottWolchok will become famous soon enoughScottWolchok will become famous soon enough
Send a message via AIM to ScottWolchok
Re: Linux: steps to program fullsize RC robot

Quote:
Originally Posted by rwaliany
Yes, MPLAB_C18 is the compiler.
You mean it's the installer for the IDE...mcc18.exe is the compiler =P
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/
(The trailing slash after $(USER_DIR) was missing)
  #7   Spotlight this post!  
Unread 17-01-2004, 20:16
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
Re: Linux: steps to program fullsize RC robot

Quote:
Originally Posted by ScottWolchok
You mean it's the installer for the IDE...mcc18.exe is the compiler =P
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/
(The trailing slash after $(USER_DIR) was missing)
Note how USER_DIR had a trailing slash at the end of it in the example...also it seems that what the executable for mcc18 is, is dependent on your kernel I believe. On 2.4.23 it appeared as mcc18.exe and on 2.6.1-mm2 it appeared as whatever I had in the installation documentation. Hopefully, I'll improve it this weekend, I have to fix a few things. I've received some courteous improvements for the Makefile from Michael Wu I'll have to add.

Also, the project page should be up now at http://ifi-picloader.sourceforge.net .

Thanks for your interests,
Ryan Waliany
__________________
R

Last edited by rwaliany : 17-01-2004 at 20:20.
  #8   Spotlight this post!  
Unread 19-01-2004, 17:47
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
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/
__________________
R
  #9   Spotlight this post!  
Unread 19-01-2004, 18:34
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
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
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #10   Spotlight this post!  
Unread 19-01-2004, 21:13
mikew mikew is offline
crazy coder
#0613 (Franklin RoboWarriors)
Team Role: Programmer
 
Join Date: Apr 2003
Location: Somerset, NJ
Posts: 39
mikew is an unknown quantity at this point
Send a message via AIM to mikew
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.
  #11   Spotlight this post!  
Unread 20-01-2004, 00:11
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Linux: steps to program fullsize RC robot

eh, so it's only a mobile download platform. either way, it would still be fun
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #12   Spotlight this post!  
Unread 20-01-2004, 00:30
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
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/
__________________
R
  #13   Spotlight this post!  
Unread 20-01-2004, 14:37
Jeff McCune's Avatar
Jeff McCune Jeff McCune is offline
Alpha Geek
#0677 (The Wirestrippers)
Team Role: Mentor
 
Join Date: Jan 2003
Location: The Ohio State University
Posts: 67
Jeff McCune is on a distinguished road
Send a message via ICQ to Jeff McCune Send a message via AIM to Jeff McCune
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-           
fixme:win:GetProcessWindowStation (void): stub
fixme:win32:GetUserObjectInformationW (0x1 2 (nil) 0 0x4067fb68),stub!
fixme:win:GetThreadDesktop (9): stub
fixme:win32:GetUserObjectInformationW (0x1 2 (nil) 0 0x4067fb6c),stub!
fixme:win32:GetUserObjectInformationW (0x1 2 0x4036a0a8 0 0x4067fb68),stub!
fixme:win32:GetUserObjectInformationW (0x1 2 0x4036a0a8 0 0x4067fb6c),stub!
fixme:ntdll:NtQueryInformationProcess (0xf04,0x00000000,0x4067fa40,0x00000018,(nil)),stub!
fixme:msvcrt:_spawnve :not translating name .\cpp18 to locate program
fixme:msvcrt:msvcrt_spawn :must dup/kill streams for child process
error -1 spawning .\cpp18
I'm running this from wine by using wine cmd.exe I tried it from a bash shell with the same error message. I figured running from cmd.exe might help things, but apparently not.

This is the version of wine I'm running:
Code:
silas@frink:~$ wine --version
find: /usr/bin/../lost+found: Permission denied
Wine 20031212
Has anyone had success with the free and open version of wine? I'm not too keen on this 30 Day trial software from codeweavers, and I have issues in general with supporting the codeweaver software. Any help would be greatly appreciated.
__________________
Team 677 - The Wirestrippers - Columbus School for Girls and The Ohio State University
EMAIL: mccune@ling.ohio-state.edu

...And all you touch and all you see
Is all your life will ever be...
  #14   Spotlight this post!  
Unread 20-01-2004, 15:24
mikew mikew is offline
crazy coder
#0613 (Franklin RoboWarriors)
Team Role: Programmer
 
Join Date: Apr 2003
Location: Somerset, NJ
Posts: 39
mikew is an unknown quantity at this point
Send a message via AIM to mikew
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.
  #15   Spotlight this post!  
Unread 20-01-2004, 16:11
Jeff McCune's Avatar
Jeff McCune Jeff McCune is offline
Alpha Geek
#0677 (The Wirestrippers)
Team Role: Mentor
 
Join Date: Jan 2003
Location: The Ohio State University
Posts: 67
Jeff McCune is on a distinguished road
Send a message via ICQ to Jeff McCune Send a message via AIM to Jeff McCune
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"
find: /usr/bin/../lost+found: Permission denied
err:module:LdrInitializeThunk Main exe initialization failed, status c0000142
Wine failed with return code 1
Any more suggestions? Are you using built-ins from a full install of Windows? I'd like not to do this, but I have Windows XP and Windwos 98 lying around that I can copy the DLL's from if need be.

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)
__________________
Team 677 - The Wirestrippers - Columbus School for Girls and The Ohio State University
EMAIL: mccune@ling.ohio-state.edu

...And all you touch and all you see
Is all your life will ever be...

Last edited by Jeff McCune : 20-01-2004 at 18:56.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How much planning goes into your robot? Jnadke General Forum 41 29-01-2006 21:29
Anyone looking for more program space? archiver 2001 13 24-06-2002 02:20
WASH Palm scouting at the Championship Mike Soukup Scouting 2 19-04-2002 15:14
robot control emulator for default or other program CharlieWilken Programming 26 24-02-2002 02:36
about how Drive Train push the robot... shouldn't the force accelerate the robot? Ken Leung Technical Discussion 12 26-11-2001 09:39


All times are GMT -5. The time now is 09:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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