Dangerous Prototypes

Other projects => Past projects => Web platform => Topic started by: Val42 on October 22, 2010, 11:23:47 pm

Title: Linux Development
Post by: Val42 on October 22, 2010, 11:23:47 pm
I bought a web platform but haven't done much with it yet.  I run Ubuntu Linux at home, where I develop.  I was able to run the development environment under Wine, but it would be more convenient to run it natively on Linux.  With the new uIP stack it seems like it would be possible.

I'm a professional software developer, so I don't need help on programming, only on how to get started.  Has someone written up a simple web page on how to develop on Linux?  Someone probably already wrote up such a page, but I have just missed it.

Thanks,

- Val -
Title: Re: Linux Development
Post by: ian on October 23, 2010, 09:28:42 am
Hi Val,

As far as I know, the Microchip IDE, compiler, etc are Windows only. Microchip says they're working on a Linux version of their gcc-based compiler, and there's a member in this forum who has worked on a port (though there are license difficulties with some files).
Title: Re: Linux Development
Post by: tayken on October 23, 2010, 10:13:01 am
Hi Val,

I'm almost finished with the port, just a little tidying up is needed now. I think I'll be able to publish sometime next week, hopefully Monday.
Title: Re: Linux Development
Post by: ian on October 23, 2010, 11:14:53 am
Is it just the device headers and stuff with the license problem? I remember you posted a quote from the MC forum about this once. Making our own device files for a couple PICs shouldn't be too hard.
Title: Re: Linux Development
Post by: tayken on October 23, 2010, 11:33:54 am
Yep, for them you need to accept the license and have to deal with either installing C30 on a Windows machine or using Wine to get them.

I am not so sure, this thing should be as general as possible. And I checked out them before, they looked quite complicated. Of course we can create them with datasheet and other stuff but again...
Title: Re: Linux Development
Post by: ian on October 23, 2010, 12:02:39 pm
Quote
shouldn't be too hard.

Famous last words :) Maybe I should say, if it's tedious we can get it done, but if it's difficult maybe not :)
Title: Re: Linux Development
Post by: arhi on October 24, 2010, 10:31:05 am
have anyone tried http://devupdates.microchip.com/mplab/ (http://devupdates.microchip.com/mplab/) ? I just downloaded and installed it .. looks great
Title: Re: Linux Development
Post by: ian on October 24, 2010, 10:50:10 am
Wow, I'm grabbing it now. Thanks for the link.
Title: Re: Linux Development
Post by: Eric on October 24, 2010, 05:45:36 pm
Outstanding!  This is the best news I have seen from Microchip in a long time and I've been using their stuff for a long time (well at least since when the PIC16C84 was brand new and MPLAB was a 16bit Windows application, 3.x I think).

Curiously though it seems like they are not yet supporting Linux x86-64 but only x86-32.  Has anyone tried installing the Linux version on an x86-64 Linux platform yet?

-Eric
Title: Re: Linux Development
Post by: IPenguin on October 25, 2010, 01:29:08 am
arhi, thanks a lot for the link to MPLAB X! :) :)

From rather hidden posts on the Microchip forum it appears that MPLAB X has been around for Beta test since at least February 22, 2010!!

Not sure why I (and obviously many others) didn't notice before that this cross-platform PIC development environment is available ...

Downloading MPLAB X for Mac OS 10.6 now ... (/me pokes rsdio with a pointed tooth pick ....)
Title: Re: Linux Development
Post by: arhi on October 25, 2010, 09:27:47 am
eric, I installed it on Fedora 13 64bit (the 32bit version of the mplab x) and it works perfectly

IPenguin, I tested it on 10.6 and one of the compilers was not available (C18 or C30, forgot)

I have not yet tried to supply MAL to it but .. so far it works nice, the only problem I noticed is lack of pickit2 support (only pickit3) ... I do have both but I like pickit2 better then pickit3
Title: Re: Linux Development
Post by: IPenguin on October 27, 2010, 02:16:14 am
It's the MPLAB C18 compiler for PIC18 MCUs that's not available for Mac OS X, yet.

We are in the process of creating and verifying the installer for the C18 on the Mac. Please return in a few days to check availability.
Thank you. (http://http)

However, HI-TECH C Compiler for PIC18 MCUs is available for Mac OS X.

I have only tested MPLAB X with MPLAB C32 (PIC32MX) and MPLAB C30 (PIC24 and dsPIC) on Mac OS 10.6 so far and am surprised how well it works. It's defintely worth a try.
Title: Re: Linux Development
Post by: doegox on November 16, 2010, 04:59:45 pm
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 (http://dangerousprototypes.com/docs/MPLAB_X)
Feel free to contribute!
Title: Re: Linux Development
Post by: tayken on November 17, 2010, 02:26:35 pm
I managed to download and install all (on Ubuntu) , [s:]couldn't test C18 compiler as I don't have any code for 18F but it installed[/s:] and I tested out C18 compiler with one of the demo projects supplied. Shall I edit wiki page?
Title: Re: Linux Development
Post by: ian on November 17, 2010, 04:05:29 pm
Sure
Title: Re: Linux Development
Post by: tayken on November 18, 2010, 06:13:30 am
Done. But I don't know whether C18 is available for Mac OS X, anybody have an idea?
Title: Re: Linux Development
Post by: arhi on November 18, 2010, 09:16:07 am
not yet

Quote
We are in the process of creating and verifying the installer for the C18 on the Mac. Please return in a few days to check availability.
Thank you.
Title: Re: Linux Development
Post by: sqkybeaver on December 16, 2010, 02:01:07 am
Ive had problems trying to get mplabX to work on ubuntu 10.10 x64, 8.whatever will work under wine
Title: Re: Linux Development
Post by: arhi on December 16, 2010, 03:06:13 am
works perfectly on both fedora13 and fedora14 but you need to have 32bit libraries installed to have it running (as it is essentially 32bit all) ... do you have problem running the installer or after you install it it does not work?
Title: Re: Linux Development
Post by: sqkybeaver on December 16, 2010, 04:02:27 am
havent bothered to take it much further than installation, have it running in windows
Title: Re: Linux Development
Post by: tayken on December 16, 2010, 09:42:02 am
works really well for Ubuntu 10.04 (32 bit)
Title: Re: Linux Development
Post by: arhi on December 16, 2010, 08:16:20 pm
the only issue on 64bit systems is that you need 32bit libraries too ...
Title: Re: Linux Development
Post by: wallabybob on December 20, 2010, 04:29:10 pm
I have installed MPLABX beta 4 on Ubuntu 10.10 amd64 and compiled one of the example programs. However I have't been able to get MPLABX to recognise my PicKit 3 so I can't use that to download code. There is a thread in the Microchip MPLABX forum about this issue.

I've also been unable to get ds30 loader working on Ubuntu 10.10 amd64 and I have reported that in the ds30 forum. The command line to fire up the non-GUI loader is pretty non-intuitive, but someone in the ds30 forum managed to get further than I did. Here's what happened:

I tried to invoke ds30LoaderConsole on a fairly stock Ubuntu 10.10 server system and it complained:
Code: [Select]
$ mono ds30LoaderConsole.exe --port=/dev/web_platform --baudrate=115200 --file=${FILE} --device=dsPIC33FJ128GP204 --write-program

** (ds30LoaderConsole.exe:18243): WARNING **: The following assembly referenced from /home/ozybushwalker/Downloads/ds30 Loader/bin/GHelper.dll could not be loaded:
     Assembly:   System.Windows.Forms    (assemblyref_index=1)
     Version:    2.0.0.0
     Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/ozybushwalker/Downloads/ds30 Loader/bin/).



** (ds30LoaderConsole.exe:18243): WARNING **: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

Unhandled Exception: System.MissingFieldException: Field 'GHelper.clsDebugTextbox.bConsole' not found.
After installing package libmono-winforms2.0-cil things moved along a bit further:
Code: [Select]
$ sudo bash
[sudo] password for ozybushwalker:
root@vbox:~/Downloads/ds30 Loader/bin# mono ds30LoaderConsole.exe -l --port=/dev/ttyUSB0 --baudrate=115200 --file=~/test.hex --device=dsPIC33FJ128GP204 --write-program


Loading port plugin ds30LoaderPortIxxat.dll: no supported on this OS
Loading port plugin ds30LoaderPortKvaser.dll: no supported on this OS
Loading port plugin ds30LoaderPortPCAN.dll: no supported on this OS
Loading port plugin ds30LoaderPortSerial.dll: found 5 ports
Loading port plugin ds30LoaderPortVector.dll: no supported on this OS
Loading external device database...408 devices foundNon-existing file specified.
$

~/test.hex exists, root has access to /dev/ttyUSB0.

I was also unable to get ds30 Loader GUI.exe to download the hex file. It didn't report any non-existent files but did report a timeout.

Anyone have a suggestion for getting either ds30Loader working or a suggestion for an alternative loader?
Title: Re: Linux Development
Post by: tayken on December 20, 2010, 05:52:48 pm
There is a Linux loader for Bus Pirate, it might work. They use the same bootloader.
Title: Re: Linux Development
Post by: wallabybob on December 20, 2010, 10:56:05 pm
[quote author="tayken"]
There is a Linux loader for Bus Pirate, it might work. They use the same bootloader.
[/quote]
I presume you mean pirate-loader which requires bootloader 4+ in the PIC. I'm pretty sure my web platform predates bootloader 4+.

Update to the ds30Loader problem I reported earlier. ds30Loader doesn't understand "~" in file specifications. When I specified the full file path it reported sensible things about the file but timed out waiting for response from the bootloader.
Title: Re: Linux Development
Post by: ian on December 21, 2010, 08:48:20 am
pirate loader is written specifically for the PIC 24FJ64GA002 on the Bus Pirate, I don't think it will work with the web platform. The device signature will be different and it (should) will throw an error.