Remote programming a chipKIT Pi

keithsloan52
Posts: 30
Joined: Mon Dec 28, 2015 5:51 pm

Remote programming a chipKIT Pi

Post by keithsloan52 » Tue Feb 16, 2016 11:21 am

I am trying to setup remote programming of a chipKIT Pi.

I found http://chipkit.net/remote-programming-a-chipkit-pi/

But I have the following problems

1) dist.majenko.co.uk does not seem to exist
2) The latest version of Rasbian is jessie not wheeze as used at the time of the article

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

Re: Remote programming a chipKIT Pi

Post by majenko » Tue Feb 16, 2016 11:23 am

Hmmm... I'll have to see if I can dig out the old Pi scripts. It's been a while since I looked at that.

UECIDE's latest downloads though are here: http://uecide.org/download

Wheezy, jessie, it shouldn't matter. The Pi side of things is mostly shell scripts anyway.
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: Remote programming a chipKIT Pi

Post by majenko » Tue Feb 16, 2016 11:46 am

Damn, I really can't find those old scripts! No idea where they might have gone...!

Never mind, it won't take me long to re-create them - as long as I can set up the old Pi again :/
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".

keithsloan52
Posts: 30
Joined: Mon Dec 28, 2015 5:51 pm

Re: Remote programming a chipKIT Pi

Post by keithsloan52 » Tue Feb 16, 2016 12:53 pm

Before I found the chpKIT forum item I was going to try and use a couple of socat or netcat commands to forward a serial port on the Mac to the serial port to a serial port on the Pi. i.e. One socat command running on Mac listening on a port and forwarding to a tty on the Mac and another socat comand on the pi forwarding /dev/ttyS0 to the tcp port on the Mac, but I could not figure out how to tell uecide to use a certain serial port

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

Re: Remote programming a chipKIT Pi

Post by majenko » Tue Feb 16, 2016 3:20 pm

This is actually proving harder than I was thinking... Not the UECIDE side of things - but the Raspberry Pi side of things. For a start avrdude that installes via apt-get is much too new a version to work with the chipKIT boards, so I have to adapt it all to use pic32prog now, and I can't get that to work right at the moment either... :(
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".

keithsloan52
Posts: 30
Joined: Mon Dec 28, 2015 5:51 pm

Re: Remote programming a chipKIT Pi

Post by keithsloan52 » Tue Feb 16, 2016 3:51 pm

I am using the boot loaders available at http://wiki.kewl.org/dokuwiki/projects:chipkit32 by Darron Broad

They are a fork of the official bootloader and you can use an open source compiler to build these versions, where as the official one you need to have a paid for version of microchips C complier.

Just install the C compiler that he links to.
Grab the repository - To run the hg command on raspberry pi you have
to install with sudo apt-get install mercurial

To load the bootloader I use pickle see http://wiki.kewl.org/dokuwiki/projects: ... stallation

keithsloan52
Posts: 30
Joined: Mon Dec 28, 2015 5:51 pm

Re: Remote programming a chipKIT Pi

Post by keithsloan52 » Tue Feb 16, 2016 3:57 pm

How do I tell UECIDE to use a certain tty?

If I could set the tty it uses then I feel I could program the chipKIT pi via the Raspberry Pi using a couple of socat commands.

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

Re: Remote programming a chipKIT Pi

Post by majenko » Tue Feb 16, 2016 3:59 pm

I have it all working now. I am just building packages of what's needed - you'll need to update the ckPi in UECIDE. I'll update the blog post with updated details of what and where things are.
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: Remote programming a chipKIT Pi

Post by majenko » Tue Feb 16, 2016 4:29 pm

Adding extra serial ports is only supported under Linux, but it might be possible to "fool" it into working on OS X.

You will need to edit the preferences.txt file in your UECIDE data folder and add the line:

Code: Select all

editor.serial.port.0=/dev/cu.whatever.it.is
No guarantees that it'd work in OS X, but worth a try. Also note that your socat/netcat way of doing things wouldn't deal with entering the bootloader like the ckpi-support scripts do. You'd still have to do that manually.
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: Remote programming a chipKIT Pi

Post by majenko » Tue Feb 16, 2016 4:30 pm

Ok, I have updated the blog post with slight changes to the details there. Mostly it's the same.
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