chipKIT uC32 with Dragino YUN shield

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

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Mon Feb 22, 2016 10:51 am

No dice getting the older uClibc to compile. I think I am going to have to trawl through the git commits looking for a version that has that uClibc in it. Could take some time...

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: 2181
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Mon Feb 22, 2016 11:20 am

Ok, a quick grep has shown me commit number ff155ca5fbf218ff55e81f4f16041cefc413f348 which might do the job. It's certainly building for "mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2" which is a very good sign...
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: 2181
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

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

Ok, I have my Dragino Yun shield now, and very nice it is too.

I can confirm that it is indeed still on uClibc-0.9.33.2 just like my existing Yun. And while I have made a crosscompiling environment, it just doesn't want to work. Errors with pthread saying it has multiple definitions, which isn't good. I am just starting a complete clean recompile of the toolchain to see if that helps matters, but probably not.
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: 2181
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Tue Feb 23, 2016 5:37 pm

Ok, no different. Right, on to the next plan, which I have chosen to call Preparation H.

That is, let's try building the Linino fork and see if that will work.

Anyone for Icecream?
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".

ltheoret
Posts: 50
Joined: Wed Dec 23, 2015 9:19 pm

Re: chipKIT uC32 with Dragino YUN shield

Post by ltheoret » Wed Feb 24, 2016 1:46 am

Hi,

I just notice last night the Arduino TIAN. It is a Arduino 101 with a YUN and 4Gb module all in one. This yun shield and an uC32 is still better just add a jump drive (USB stick).

Luc

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

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Wed Feb 24, 2016 10:09 am

Well, linino is the way to go. However I have had to make major changes to pic32prog to make it modular so I can disable the adapters that aren't needed so that it will compile.

Still, I have a binary that executes on the yun now. However I can't get the serial to work at all. Not sure why. It's just doing nothing. I can get data out, but nothing seems to come back in. Investigations are continuing...

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: 2181
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Wed Feb 24, 2016 12:19 pm

Wayhay! Somehow I managed to brick my Dragino :)

Kernel panic when booting. Nice. No idea why. I can only think it will have been one of two things - since those are the only things I have done - installation of "udev" or installation of "pic32prog". My guess is the former.

Still, I now know all there is to know about re-flashing the ms14 module from Linux. I'll make myself a little blog post about it I think so I can find it next time I need it. (By the way, the instructions on the Dragino wiki are out of date).
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: 2181
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Wed Feb 24, 2016 3:42 pm

Well, that was an interesting ride.

First some things I have discovered:

1. You cannot use the UART if the USB connection (FT232) is plugged in on your chipKIT board.
2. There is a way of disabling the Dragino's UART connection so you can program the chipKIT without having to unplug the Dragino:

Code: Select all

# Disable the UART
echo 0 > /sys/class/gpio/gpio24/value
# Enable the UART
echo 1 > /sys/class/gpio/gpio24/value
3. There is a login running by default on the UART which is needed for the Bridge to work.
4. The Dragino is big-endian, and pic32prog only works on little-endian machines.
5. There is no reset connection to the 6 pin SPI header on the chipKIT boards like there is on the Arduino boards.

So after finding out all that, and fixing what can be fixed, and scripting to work with what can't, I have finally managed to program Blink to my WF32 direct from the Dragino! It's a miraculous feat it has to be said...

So what you want to do is install my specially customized version of pic32prog, which also includes a programming script:

Code: Select all

root@dragino:~# opkg install http://uecide.org/pic32prog_2.0.189-f2988c6_ar71xx.ipk
Then you can upload a .hex file using scp to the Dragino, and program it:

Code: Select all

root@dragino:~# run-pic32prog Blink.hex 
Programmer for Microchip PIC32 microcontrollers, Version 2.0
    Copyright: (C) 2011-2015 Serge Vakulenko
      Adapter: STK500v2 Bootloader
 Program area: 1d000000-1d1fffff
    Processor: Bootloader
 Flash memory: 2048 kbytes
  Boot memory: 80 kbytes
         Data: 6212 bytes
        Erase: done
Program flash: ######### done
 Verify flash: ######## done
 Program rate: 3058 bytes per second
Now to see about automating it with UECIDE...
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: 2181
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Wed Feb 24, 2016 7:19 pm

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".

ltheoret
Posts: 50
Joined: Wed Dec 23, 2015 9:19 pm

Re: chipKIT uC32 with Dragino YUN shield

Post by ltheoret » Thu Feb 25, 2016 6:03 am

Hi,

I did not expect that you would have something so quick. I will try it tomorrow. had a long day at work.
But you can actually program the ChipKit from the Yun Shield. I was worried it was not possible.

Luc

Post Reply