cihpkit issues on linux Mint 13

bperrybap
Posts: 48
Joined: Sat Nov 19, 2011 8:45 pm

cihpkit issues on linux Mint 13

Post by bperrybap » Sat Jun 11, 2016 7:35 pm

The following issues prevent building and uploading code using Linux Mint 13
Linux mint 13 is an LTS release that is still supported until april 2017.
https://www.linuxmint.com/download_all.php

If you try to use the MPIDE package mpide-0150-linux32-20150820 it doesn't work as it sets the ARDUINO version to 19
(off topic by why 19? mpide-0023-linux32-20120903 used 23, why isn't it using 150? to indicate 1.5 APIs? )
The issues is that the ARDUINO value is less than 100 so any code that compile time detects arduino pre 1.x vs 1.x, fails on the pic32 boards since the pic32 core has 1.x Print class API functions even though the ARDUINO define says the Arduino core is pre 1.x
Even stranger is that the AVR core included in MPIDE *is* using a pre 1.x API core.
So MPIDE is pretty broken.

Using the chipKIT core on the Arduino IDE doesn't solve the problem either.
While the chipKIT core does allow the code to be built using the Arduino IDE, the image can't be uploaded to the board because the pic32prog can't run.
The linux pic32prog included in the chipKIT core requires using libudev.so.1 and it isn't available on linux Mint 13.
So you get the following error:
pic32prog: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory

I tried to trick it by creating a symlink to the existing libudev library but then you get:
/home/bill/.arduino15/packages/chipKIT/tools/pic32prog/v2.0.220-pic32gcc/pic32prog: /lib/i386-linux-gnu/libudev.so.1: no version information available (required by /home/bill/.arduino15/packages/chipKIT/tools/pic32prog/v2.0.220-pic32gcc/pic32prog)

/home/bill/.arduino15/packages/chipKIT/tools/pic32prog/v2.0.220-pic32gcc/pic32prog: /lib/i386-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by /home/bill/.arduino15/packages/chipKIT/tools/pic32prog/v2.0.220-pic32gcc/pic32prog)

It looks like MPIDE was not using it but rather some patched version of avrdude.
Could pic32prog be tweaked to not require the newer libudev?

--- bill

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: cihpkit issues on linux Mint 13

Post by majenko » Sat Jun 11, 2016 8:02 pm

LTS means that Ubuntu will continue to provide patches for it. It doesn't mean that it will magically upgrade itself to support all the current third party software. Pic32prog is compiled to run on the current versions of debian and Ubuntu based operating systems, not ones that are very old a even if Ubuntu still provide patches for them.

If you need different libraries to run a piece of software then it is up to you to build and install that software. That is the beauty of open source. Just download the source code to libusb1 and compile it. Installing binaries from a newer operating system will not work. Linux has moved on somewhat since then.

Sent from my SM-T555 using Tapatalk
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: cihpkit issues on linux Mint 13

Post by majenko » Sat Jun 11, 2016 8:04 pm

Oh, and MPIDE is deprecated. You shouldn't be using it any more. It's only provided for old code. The AVR support in it has never worked and should be ignored.

Sent from my SM-T555 using Tapatalk
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: cihpkit issues on linux Mint 13

Post by majenko » Sat Jun 11, 2016 8:06 pm

One more thing: compiling pic32prog from source for your aged operating system, once you have all the needed libraries installed from source, will also most likely be needed.

Sent from my SM-T555 using Tapatalk
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: cihpkit issues on linux Mint 13

Post by majenko » Sat Jun 11, 2016 8:08 pm

Effectively you are running the equivalent of Windows XP and wondering why you can't run Edge on it.

Sent from my SM-T555 using Tapatalk
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

bperrybap
Posts: 48
Joined: Sat Nov 19, 2011 8:45 pm

Re: cihpkit issues on linux Mint 13

Post by bperrybap » Sat Jun 11, 2016 10:00 pm

Well, I highly disagree.
The XP analogy is way off base.
We are talking about a linux LTS release that is still supported. Not some crappy Windoze OS..... that has not been supported for many years.
This isn't an IDE issue, this is a chipKIT core issue.
None of the other 3rd party cores I'm using have any issues, including Teensy which does not use avrdude.
It seems kind of foolish to just totally write off an entire LTS linux release.

In the past 8 years,
I've only had a situation like this (where there was no easy patch or way to install an update from a repo to make it work) happen one other time with a 3rd party s/w package and I worked with the vendor to resolve it.

Shared libraries have created so many issues and I've fought with them and been burned by them for decades.
I've seen many cases where developers jump to newer versions when the older libraries would continue to work.
Weren't you even recently fighting with some shared library libusb issues in pic32prog yourself... ;)
(Oh, the joy of shared libraries....)

Sounds like I'm going to have to go off and do some building from sources to make it work.
You know I really want to like the chipkit stuff and the h/w is far superior than most of the Arduino boards including boards like DUE, but even after playing with an UNO32 for more than 4 years, I still run into issues when trying to use it with Arduino s/w that could never be resolved by the typical Arduino user.

--- bill

bperrybap
Posts: 48
Joined: Sat Nov 19, 2011 8:45 pm

Re: cihpkit issues on linux Mint 13

Post by bperrybap » Sat Jun 11, 2016 10:45 pm

now the configure for pic32prog is bitching about libusb-1.0 not being found, when it is definitely installed.
Arg.... what a pain.

bperrybap
Posts: 48
Joined: Sat Nov 19, 2011 8:45 pm

Re: cihpkit issues on linux Mint 13

Post by bperrybap » Sun Jun 12, 2016 1:39 am

so I decided to put the mint13 rebuild on the back burner for a while and use mint17 by mounting my mint13 sketchbook.
That works, however, uploads are not reliable and I'm seeing i2c issues with the chipkit core using an UNO32 on IDE 1.6.9.
There seems to be some sort of issue with the chipkit core when you open a new window for a sketch.
During the upload attempt, the uno32 leds flicker and upload fails claiming it cant find a device.
The only way to resolve it is to completely exit the IDE, and unplug the board and plug it back in and bring the IDE back up.

For the i2c issue, something is tripping up the ic2 support.
Not yet sure what is going on but the i2c master (uno32) keeps spewing out a start and the slave address.

I do some auto probing and perhaps that is triggering something.
It all works fine on many different other boards and cores across many different i2c lcd interface chips.
I'll track it down.
It may be a while as I don't really want to be working on tracking down i2c issues right now.

--- bill

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: cihpkit issues on linux Mint 13

Post by majenko » Sun Jun 12, 2016 9:19 am

It's very much like XP. Discounting the fact that XP is a huge rancid pile of badger vomit. It's an older operating system which people are still using and, until recently, was still supported. But because it is a number of versions of out of date a proportion of modern software will not run on it.

As a Linux developer you do not get a choice as to what versions you link against when it comes to shared libraries, especially system level ones like libc etc. The only thing you can do is to compile the software on an older version of an operating system and hope there is upwards compatibility. Since we don't compile pic32prog it is down to whatever operating system Serge is running. And chances are that is something pretty current.

When you install a library in Linux it usually comes in at least two parts; the binary and the development parts. You need to install the libusb 1 "-dev" package in order to compile software that uses it.

My work recently with it had to do with the removal of libusb 0.9 which was also required in addition to libusb 1.0 for just one adapter. That adapter has now been rewritten to use the libusb 1 API which is imposed on us by the use of hidapi for all the other USB based adapters. It was a bit stupid having have the two, so now it just needs the one.

I have experienced similar frustrations running Debian in the past before they brought out Jessie. Their stubborn refusal to upgrade core libraries to current versions meant that many precompiled packages for Ubuntu had no hope of ever running on it. I ended up upgrading to the unstable development branch of debian in order to run modern software. Since Jessie thought it has become much more compatible. Until the next big step in system libraries...

FTDI interfaces have always been a bit of a bugbear. They seriously broke the windows drivers a while back and special measures have had to be put in place in the Arduino IDE and even in pic32prog. There is always a chance that those may be affecting the automatic DTR operation in Linux. It's an easy fix though:

$ stty -F /dev/ttyUSB0 hupcl

That should get it working again without having to unplug everything and close down the IDE.

Sent from my SM-T555 using Tapatalk
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: cihpkit issues on linux Mint 13

Post by majenko » Sun Jun 12, 2016 9:20 am

I2C: you do have pull-up resistors on your SDA and SCL lines don't you?

Sent from my SM-T555 using Tapatalk
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

Post Reply