Log in

View Full Version : Programming on a Mac


Loki1989
07-06-2006, 01:30
Is it possible to do and what do i need to do it for robotics

Jon Jack
07-06-2006, 01:40
I don't think that there is any Mac native software for programming FIRST robots. You could run VirtualPC to emulate a Windows PC and run all the MPLab stuff that way. If you have a MacBook or a MacBook Pro you could run BootCamp and install Windows and then run MPLab without any emulation. Take your pick, but as far as I know there are no Mac versions of MPLab.

Bill Moore
07-06-2006, 07:42
Is it possible to do and what do i need to do it for robotics
You may want to look into how well developed the Darwine project is. That will allow you to run Windows programs without the WinOS.

http://darwine.opendarwin.org/

petek
07-06-2006, 08:14
Has anyone out there in CD-Macland tried running MPLab on WinXP on a MacBook yet? Or with a virtual machine under OS X, like Parallels (http://www.parallels.com/)?

Just wondering if there are any issues with USB-serial converter drivers or other hardwareish things.

Tom Bottiglieri
07-06-2006, 10:41
I'm not too familiar with Mac stuff, but I know someone got FRC programming to work with Eclipse (http://www.chiefdelphi.com/media/papers/1729).

Eclipse works on Mac. (http://developer.apple.com/tools/eclipse.html)

There's a MacOS native solution!

Kyle Fenton
07-06-2006, 17:22
I'm not too familiar with Mac stuff, but I know someone got FRC programming to work with Eclipse (http://www.chiefdelphi.com/media/papers/1729).

Eclipse works on Mac. (http://developer.apple.com/tools/eclipse.html)

There's a MacOS native solution!

Not exactly. Even though you can write C code using an editor like eclipse, the PIC compiler is still Windows only. You can set up the compiler in windows to work with eclipse, but without a Mac OS X compiler, there is no way to program your RC.

Mr. Steve
07-06-2006, 20:08
Just wondering if there are any issues with USB-serial converter drivers or other hardwareish things.

I haven't tried it, but I asked the gentlemen in the Apple store who said that one of the reasons Boot Camp was designed the way it was was because they had to make sure any windows specific hardware with less-common drivers would still work.

In a nutshell, "If it works in windows, it will work in bootcamp" was his response.

JohnC
12-01-2007, 16:01
I have a Core2Duo Macbook Pro.

I have Parallels with WinXP with service pack 2.

MPLab and friends work wonderfully, and compiling with mcc18 is successful.

However, the RadioShack USB to Serial adapter that I just installed drivers for isn't working. The documentation says that when I plug in the USB end, Windows should create another device in my "Ports (COM & LPT)" section in device manager. That doesn't happen in Parallels, though it does happen on a regular desktop PC.

So that has been my experience. Anybody have ideas? We were so close...

Robby
12-01-2007, 16:13
I have experience with vmware, none at all with parallels. In vmware there is a dialog to configure what hardware to emulate for the virtual machine and there is the ability to give the vm access to a real serial port. I would imagine that there is something similar for parallels. I tested it on a linux host with windows guest and it worked without problems with the radioshack usb to serial adapter.

karlcswanson
12-01-2007, 16:32
I have a Core2Duo Macbook Pro.

I have Parallels with WinXP with service pack 2.

MPLab and friends work wonderfully, and compiling with mcc18 is successful.

However, the RadioShack USB to Serial adapter that I just installed drivers for isn't working. The documentation says that when I plug in the USB end, Windows should create another device in my "Ports (COM & LPT)" section in device manager. That doesn't happen in Parallels, though it does happen on a regular desktop PC.

So that has been my experience. Anybody have ideas? We were so close...

Did you install drivers for the USB adapter on the mac, or on Windows XP?

Tom Bottiglieri
12-01-2007, 16:42
You need to sync devices in Parallels to the VM. More specifically, put your VM in "windowed" mode, click the USB symbol in the bottom right corner of Parallels, and click the device "On"

Kyle Fenton
12-01-2007, 20:44
Here is an article about sharing a serial port using Parallels

http://www.macosxhints.com/article.php?story=20070111135928615

dk5sm5luigi
12-01-2007, 21:05
I was successfully able to run easyC Pro in Parallels and download the code to the robot. This was about a month and half ago before Parallels fully supported USB 2.0 so the download was a little slow. I haven't tried it since with the new support but I can only assume it works faster now.

Kingofl337
12-01-2007, 23:56
easyC PRO works in both Parallels and Bootcamped XP. We are also offering free copies to the team or person who can make it install and run in DarWine.

unknownmosquito
17-01-2007, 17:35
Since the IDE doesn't matter the real question is this: is there a compiler and/or IFI loader that works with Macs (natively)?
Furthermore, has anyone had any luck with QEMU (called Q for Mac) and MPLab?

Alan Anderson
17-01-2007, 21:00
Since the IDE doesn't matter the real question is this: is there a compiler and/or IFI loader that works with Macs (natively)?
Sorry, there's no Mac-native compiler that will work for our purposes. So far as I can tell, only the MicroChip C18 compiler/linker can make use of the binary library file that contains the routines for running a FIRST robot.

Kyle Fenton
17-01-2007, 21:13
Furthermore, has anyone had any luck with QEMU (called Q for Mac) and MPLab?

I am assuming that you have a PPC mac.

I have not tried Q, but it requires a legal copy of windows in order to work. Q also has had limited hardware support.

I can tell you that MPlab & the compiler runs in crossover (which is a commercial wine implantation), but that runs only on x86 macs. There is a PPC version of wine called Darwine (http://darwine.opendarwin.org/) that might be able to run it. So if you are adventurous you can try it out.

Astronouth7303
19-01-2007, 13:31
Since the IDE doesn't matter the real question is this: is there a compiler and/or IFI loader that works with Macs (natively)?
Furthermore, has anyone had any luck with QEMU (called Q for Mac) and MPLab?

The compiler (MCC18) is well-known to work under wine. See the above posts.

IFI_Loader is not required. There is also Loader Reloaded, picloader, and my own pycloader. (the last needs testing.)

jln646v
22-01-2007, 18:09
I just use parallels on my macbook and everything works flawlessly with it. One annoying thing is that when you connect a device to the computer like a usb to serial converter, you have to click on the devices menu in parallels mac menu bar and select the device before the virtual machine can see it.

One problem i have is that loading the code through my radio shack usb to serial converter is so slow. Does anyone have a way to speed this up, or is it just the price of the emulation that the converter has to do?

Joe Ross
22-01-2007, 19:05
One problem i have is that loading the code through my radio shack usb to serial converter is so slow. Does anyone have a way to speed this up, or is it just the price of the emulation that the converter has to do?

It took about 5 minutes to load our code last year through my radio shack USB to serial converter on windows (compared to about 2 minutes for a straight serial connection). Our results were probably longer then typical since we were using 60% of the available program memory, but the converters will be slower. The emulation might not be slowing things down at all.

Raym
22-01-2007, 20:14
Has anybody been able to get EasyC to work on a PowerPC based system with Virtual PC & Win XP?

The installer get most of the way through the install, and a tiny window pops up
that says "Starting Error."

Ray
Team 1138

dk5sm5luigi
23-01-2007, 00:28
One problem i have is that loading the code through my radio shack usb to serial converter is so slow. Does anyone have a way to speed this up, or is it just the price of the emulation that the converter has to do?

Are you running the beta of Parallels or are you running the current stable version? The beta has support for USB 2.0 and might help speed up the transfer. I would test it out but I currently don't have a robot that I can download code to.
-Nick

bagawk
23-01-2007, 01:28
I have set it up using wine on a Intel mac (sorry PPC people, not going to work).

Long directions here: http://www.chsrobotics.com/?page_id=7

Short:
Install XCode and X11
Download wine source and compile + install
Install mcc18 (in X11 xterm) using wine
Grab our Makefile (see link above)
Go!

We have not figured out how to flash the microcontroller yet though (it will hang), but we have not spent much time on figuring out where things are going wrong.

JohnC
23-01-2007, 01:57
Are you running the beta of Parallels or are you running the current stable version? The beta has support for USB 2.0 and might help speed up the transfer. I would test it out but I currently don't have a robot that I can download code to.
-Nick

I'm using Build 3120, released on January 10, and it doesn't even support my very common Sandisk flash drive at USB 2.0 speeds.

Astronouth7303
25-01-2007, 08:04
We have not figured out how to flash the microcontroller yet though (it will hang), but we have not spent much time on figuring out where things are going wrong.

You mean downloading to the controller?

Can you be more specific? Are you running IFI_LOADER under wine? IFI Reloaded? pycloader?

bagawk
31-01-2007, 00:47
You mean downloading to the controller?

Can you be more specific? Are you running IFI_LOADER under wine? IFI Reloaded? pycloader?

We were using ifi picloader. One problem appears that there are some options being set in the termios that are not in the headers on a macintosh, but that still does not fix the problem.

I tried your pyctools, but it dies on a syntax error on line 177 in intelhex.py. I am not a python programmer, so I do not know how to fix it.

Any time you can put into figureing this out would be really awesome!

p_rhein
31-01-2007, 02:13
If you're new at programing I recommend downloading Unix and then running Cygwin to type the C program. Vi is ok, but it's tough to use for first timers. What all do you need to program in? That could change everything. In fact, it does change everything!!! OH NO!

65_Xero_Huskie
01-02-2007, 08:55
Did you install drivers for the USB adapter on the mac, or on Windows XP?

We had this problem, we had to install the driver, so Ken actually had to dig int he trash for our disk *He didnt think there was one*. Then we had to find which port it was in. So many probelms for such little things.

Kingofl337
02-02-2007, 16:32
For the intel guys it seems that the best way to program is to use bootcamp. I sent Parallels an e-mail about slow USB but not responce yet. USB-to-Serial is pretty fast in XP/Bootcamp. I hope Paralles does get USB sped up because rebooting all day is a pain.