Skip to main content
Topic: PIC programming under Linux and Mac OS X (Read 28937 times) previous topic - next topic

Re: PIC programming under Linux

Reply #15
I was looking for something else and stumbled on Hi-tech pic compilers. They have compilers for windows, linux and osx.

It is a commercial product but (at least for baseline pic) there is an unlimited free version. It only lacks optimization. A quick look at pic32 an pic18 tells me there is also a free version. With the Pic24/30 I don't see it.

the different compiler are found throudh the hitech website: http://www.htsoft.com/downloads/

Re: PIC programming under Linux

Reply #16
Did you find a Linux or Mac version of the Lite (free) product?

Looks like you can evaluate the commercial versions for 45 days, so if anyone tries this out on Mac OS X, please report on this forum.  I prefer to wait until I'm going to be focused on a particular PIC development project to get the most out of my 45 days.  Otherwise it would just be a waste since I'm developing for a DSP at the moment.

Re: PIC programming under Linux

Reply #17
As far as I can see it is a kind of universal binary. It depends how you activate it.

I installed the windows version and it asked me what I want. I could choose from 45-trail, full (enter serial) or free edition. I assume (!) that on mac/linux you get the same kind of question. I don't have a linux box handy to test it for you.

Re: PIC programming under Linux

Reply #18
[quote author="Sjaak"]
As far as I can see it is a kind of universal binary. It depends how you activate it.

I installed the windows version and it asked me what I want. I could choose from 45-trail, full (enter serial) or free edition. I assume (!) that on mac/linux you get the same kind of question. I don't have a linux box handy to test it for you.
[/quote]The problem I notice is that the free download is a file named HCPIC18-pro-9.63PL3.exe, but there is no way to run a .exe on Mac.  In other words, they do not provide Mac support in the free download.  I suppose that the pay download might also work in free mode, but I don't want to start my 45-day trial.  If anyone does try this out on the Mac, let me know.

Re: PIC programming under Linux

Reply #19
With universal binary I ment the binary is for the trial, full and light version. :D

see the attached screen shot. It has a seperate download for linux and mac. Looks like it first downloads an small installer before downloading the remaining (hence the small file?)

Re: PIC programming under Linux

Reply #20
Ah!  I have a PIC18 firmware, so I went to the PIC18 page, where there is no combined download.  Under PIC18, the Lite version seems to be PC only.

I do have a newer PIC16 project which is still in development (it's non-profit, so I haven't been working on it much).  Thanks for the screen shot, because at least it looks like I can get a Mac OS X compiler for PIC16.  Maybe I'll try that out.  Microchip only supports assembly for PIC16, and although I think I'll need assembly to get any performance out of the PIC16F87, at least I can give C a try.

Re: PIC programming under Linux

Reply #21
I think it is time for a status update:

I had some problems because I was merging two seperate methods (directory mismatches mostly) so I did some test and debugging today, which resulted with my Linux pc crashing again and again (I think it kind of understood that I'm gonna get a new one :S ). If I can get my system up and running again, I'll try to save my files first, then a little more debugging and hopefully I'll manage to post the files for 3.23b which was the latest version when I began my work.

 

Re: PIC programming under Linux

Reply #22
arhi posted it in the web platform --> Linux development thread and ian put it up on the blog in "Beta Microchip IDE for Linux, Mac" so it should be added to this thread as well:

Microchip has released a Beta test of MPLAB X IDE including the MPLAB C compilers for PIC24, dsPIC and PIC32MX (C18 for PIC18 to follow soon) for Windows, Linux and Mac OS 10.5 and Mac OS 10.6. The HI-TECH C compilers for PIC10/12/16 and PIC18 are available for MPLAB X as well.

MPLAB X IDE is based on Netbeans. The download of MPLAB X Beta and the light versions of the compilers is free.

A Wiki (stump) for MPLAB X can be found here.

Re: PIC programming under Linux and Mac OS X

Reply #23
Yeah, they got me by 1-2 days or so. :) I couldn't find the time to post my results yet but I got it working, I think when I have time I'll update my blog with that and also add Microchip's own version.

Re: PIC programming under Linux and Mac OS X

Reply #24
I just did a first real test of mlab-x - I was compiling UBW32 firmware and with some minor adjustments (some case sensitivity issues and /   issues) I made it work :)

here's the project if someone want to play with it further (33M)
http://elco.crsndoo.com/files/UBW32.fir ... abx.tar.gz

Re: PIC programming under Linux and Mac OS X

Reply #25
I'm glad you had better results.  I tried using it by converting a local copy of the Bus Pirate project that I have been working on from an MPLAB 8 to an MPLAB X project.  Everything compiled just fine after a few minor adjustments like you noted.  Unfortunately the IDE would not load the ELF file.  There was a comment on the Microchip forum about someone else having a similar problem.  It sounds like the developers found the problem and fixed it for the next release but gave no work around, patch or even a time frame for the next beta.  I tried this on both a Windows and a Linux machine and got the same results.

I am glad Microchip is moving in the right direction but, for building on an open source IDE platform they still seem to be working with the mindset of a completely closed source project.  There's no source code available, binary only installation even under Linux, no real information flow from what I have seen between the programmers and the users, etc.  Hopefully they will get better at this.  NetBeans seems to have a dual license that would permit them to keep their stuff closed source.  Hopefully they will eventually release it.

-Eric

Re: PIC programming under Linux and Mac OS X

Reply #26
yup I had pretty good results with pic32mx and mplab-x ... (have not tried 8bit mcu's at all)... now wrt licencing, yes, if they pay for netbeans licence they can have closed source system, if they don't then it will be gpl ... thing is, there is open source and there is open source :D ... you have systems like mysql where everything is open, future is known, worklogs are there for everyone to see but it is very hard to push a patch by a community contributor (this way quality is "guaranteed" and openness is fully respected), then there are projects like pgsql where 50+% of the contribution came from community (this way much more stuff go into code but on the other side you have many half baked features and huge number of waporware stuff in the code), and there are open source applications where you know nothing about "future", just from time to time binary + source of a new version is publish on a website, the bugs data, worklog, future plans are all hidden ... very often, this type of applications also release source with delay (usually source is 1 version "old" so vX.Y binary and vX.Y-1 source are released in the same time).... This is usually because company is trying to forcefully prevent forks and / or because "maintaining all the open source facilities" and "keeping the community happy" is not easy nor cheap task (trust me I know, I work in open source for past 15 years). One important thing also, I never seen any official info from Microchip that MPLAB-X IDE nor compilers going with it will be open source, I seen that info on many other forums but nothing from "microchip", so maybe it's just wishful thinking..

IMHO, they don't have to publish source for the IDE, they might but I don't care about it too much ... if they give a clear info how to add a plugin to it (and I think it is standard way how to add plugin to netbeans so it already should exist somewhere) and how to write interface for new tool (so someone if they don't can write pk2 support) that's cool ... what I do really think they should do is make the darn C18, C30, C32 compilers open source ... and they should change the stuped licence of the MAL

Re: PIC programming under Linux and Mac OS X

Reply #27
Hi gents,

There is a new page on the wiki to collect all interesting info & experience on MPLABX install here:
http://dangerousprototypes.com/docs/MPLAB_X
Feel free to contribute!

Re: PIC programming under Linux and Mac OS X

Reply #28
What is the "We get currently an error when loading the produced ELF in the IDE, under investigation... " actually? What do you plan to gain from loading ELF file into MPLAB?

I can (fedora13, 64bit) load elf, it creates project around it .. but what then?

Some screen shots ...

Re: PIC programming under Linux and Mac OS X

Reply #29
project is created - but if I try to run it mplab try to run is as native elf binary ... donno what I should expect there, I don't see mplab-x having some pic32mx simulator handy ?!