2005/09/07 06:03:09
xiaofan
Mini Howto: Microchip tools under Linux with Wine

1. Test System
Dell 600M Notebook with FC4 installed.
[mcuee@localhost wine]$ uname -a
Linux localhost.localdomain 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56
EDT 2005 i686 i686 i386 GNU/Linux

Similar tests have been done on Ubuntu 5.04 (Debian based) AMD 64
based desktop. The installation will take about 2 hours with a fast
broadband connection (2Mbps Cable Modem here).

2. Installation of Wine rpms as root
Three files are necessary. They can be downloaded from Wine-hq and other
websites. From there, follow the links to get winetools and xdialog (needed by winetools).
-rw-rw-r-- 1 mcuee mcuee 14321924 Sep 6 20:51 wine-20050524-1fc3winehq.i686.rpm
-rw-rw-r-- 1 mcuee mcuee 282244 Sep 6 20:50 winetools-2.1.2-jo.i386.rpm
-rw-rw-r-- 1 mcuee mcuee 360778 Sep 6 20:51 xdialog-2.1.2-1.1.fc3.rf.i386.rpm

For the Ubuntu systems, install the Ubuntu packages.

3. Configuration of Wine using winetools
Basically we need to follow exactly the sequences of winetools.

3.1 Base setup
1) Launch winetools by running wt2 from BASH as a normal user.
2) Create fake windows drive
3) Install true type fonts (ARIAL32)
arial32.exe download from the default Sourceforge site failed. I manually
downloaded it from google search and put it to ~/winetools/fonts.
3) Install DCOM 98
4) Install MFC4 dll
5) Install IE6, be patient of the long process
This is one of the most critical step. Luckily I have no problems with this.
6) optional printer installation (skipped)

3.2 more system softwares
1) Windows installer
This is another critical step to install MPLAB later.
On FC4, It failed with a permission problem. I need to do the following to
fix the problem.

Change the ownership of /usr/lib/msiexece.exe.so to the current user
by issuing the following command as root (my user id is mcuee):
chown mcuee:mcuee msiexece.exe.so (chmod 777 does not work)

Then retry again and it will be okay. You can change the ownership
back after this.

There was no problem on Ubuntu with this last time.

2) Install VB5/VB6 runtime and VC6 runtime
3) Install MDAC 2.8 and Jet 4.0 SP6
4) Install MSXML4.0 SP2 (seems to be failed but does not cause problems)
There was no problem on Ubuntu with this last time.

5) Windows script host 5.6
6) Common control 5.0

3.3 Optional true type fonts (not necessary, skipped)
I install quite some fonts last time on Ubuntu. This time
I do not have time and skip the installation.

3.4 Optional tested software (not necessary, skipped)

I install quite some softwares last time on Ubuntu. This time
I do not have time and skip the installation.

To do: to recommend some more tested software

4. Installation of MPLAB/MPLAB C18/MPLAB C30

4.1 Download the following files from Microchip websites
-rw-rw-r-- 1 mcuee mcuee 9631082 Sep 6 21:30 C30_v132.zip
-rw-rw-r-- 1 mcuee mcuee 32576258 Sep 6 21:33 MP721_full.zip
-rw-rw-r-- 1 mcuee mcuee 18600365 Sep 6 21:34 MPLAB-C18-Beta-v3_00b1.exe

I was using C30_v132, MPLAB 7.10/7.20 and MPLAB C18 2.4 student
edition for my Ubuntu installation.

4.2 Installation of MPLAB

4.2.1 Unzip the MPLAB zip archive and run setup (wine setup.exe) as
normal user.

4.2.2 Say no to all the hardware installation instructions in the end of
the installation. The pickit1.dll will fail to register and all MPLAB
related hardware will not work under Wine anyway.

4.2.3 MPLAB C18 3.0 beta
Last time I was using the C18 2.40 student edition. The installation failed
but I copied the installation from Windows partition and it will work.

There is no problem with MPLAB C18 beta 3.0 installation this time on FC4.

4.2.4 MPLAB C30 1.32 installation
There is no problem with MPLAB C30 installation.

5. Post install
Set up the paths under Wine or put it do a batch file under the fake c:\
To do: add more details

6. running MPLAB
6.1) use wine
6.2) use fake "dos" environment
Type dos under BASH and you will go to a command prompt environment under dos.
The go to MPLAB IDE directory and fire up MPLAB.

To do: add more details

7. Status
MPLAB IDE is not really very useful right now. MPLAB C18/C30/MPASM/MPASM30
are fully functional.

To do: add more details

8. Document history
Version 0.10.1: Initial release by Xiaofan Chen
(First name: Xiaofan Family name: Chen)
Email: xiaofan AT sg dot pepperl-fuchs dot com
Date: 07/09/2005

9. License
GNU Free Documentation License
To do: add more details

10. To do list:

1) To find a place to host this document, PICList is the first one.
PIClist.com and Microchip Forum will be the next.
2) To remove the bugs
3) To add more things
2005/10/30 04:56:24
xiaofan
It seems to me that all pictures are now gone. ;-(

Anyway, the pictures are no so important.
2005/11/11 20:11:35
xiaofan
What Microchip tools are working under Wine?

MPASM, MPASM30, MPLAB C18, MPLAB C30.
MPSIM and SIM30 probably work but I have not tried.

What Microchip tool components are not working?
Project management --> use make instead
ICD2 programming --> not working, use other programmers
PICkit 1 --> not working, use usb_pickit
PS+ --> not working, use picp
PM2 --> not working, try out lplab or others
PM3 --> not working
ICD2 debugging --> not working, no susbstitute under Linux
2005/11/18 14:54:06
Guest
ORIGINAL: xiaofan

What Microchip tool components are not working?

ICD2 programming --> not working, use other programmers


That's a shame: that's the one bit that would be useful.
2005/12/01 04:32:25
xiaofan
For ICD2 under Linux, please try out this:
http://www.hcilab.org/resources/particles/particles-linux-mplab-howto.htm

Edit: according to the request of the author, I remove the content of
the web site.
2005/12/04 23:30:56
Guest
To XIODAN: I'd prefer if you would not copy & paste a complete website here to the forum - and not added a comment that it is not yours! No comment in your posting states that this is not your project! Especially, if you are using statements liks "Our version.." etc!

The developers of icd2progs.
Matt & Lorenz (www.hcilab.org)
2005/12/06 06:53:45
xiaofan
Sorry about that. I removed the full quotation. Thanks for pointing out this.
2005/12/07 02:47:59
Guest
Thanks xiofan for that.

If anyone is using the icd2prog (from the download numbers I see that there are quite many), we would appreciate any feedback... esp. if someone adds new PIC defintions, please send them to us at icd2linux@hcilab.org
Best regards,
Matt
2005/12/16 18:44:43
xiaofan
Updates on Dec-17-2005:

With the latest Wine/Winetools and MPLAB 7.30/C18 3.0 Studnet/C30 2.0 student, it becomes
quite trival to install. The procedure is the same though but there are no hiccups any more on
my system (an AMD64 3000+ Desktop with fresh install of Fedora Core 4).

Regards,
Xiaofan
2005/12/26 15:24:10
Guest
Xiaofan,

Have you or know anyone compiled C30 under linux?

TIA
© 2017 APG vNext Commercial Version 4.5

Use My Existing Forum Account