chipKIT uC32 with Dragino YUN shield

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 5:14 pm

Hi,

You say to wire the RESET pin on the 6-Pin SPI header to the RESET pin in power section on the YUN shield. Is this pin 2 on the WF32 schematic?
Would it not be better to wire this on the ChipKIT board? If this pin is not wired on the ChipKIT board would not make sense to do it there and make the YUN more compatible with other board?

Luc

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 5:36 pm

Hi,

Oh! that is pin 5 on the SPI header, the SS pin. There is no connection on ChipKIT, the header is not loaded.

Luc

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

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Thu Feb 25, 2016 5:56 pm

Hang on, I might be getting my pins mixed up here...
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: chipKIT uC32 with Dragino YUN shield

Post by majenko » Thu Feb 25, 2016 6:04 pm

No I'm not. Yes, that is the SS pin on the chipKIT boards, which is where the RESET pin is on Arduino boards.

The Dragino has GPIO18 connected to that pin and is used to reset the target MCU. Just one more small difference with the Digilent boards that makes you ask "Why on earth...?"

That pin should be reset. Someone at Digilent decided that it shouldn't be, so the Digilent boards don't have RESET, they have SS. So you need to somehow link that to RESET. That can either be on the Dragino, as I did since it is incredibly simple - a single Dupont male-female jumper is all you need - or you can do it on the chipKIT board if you prefer, it makes no difference.

Another option is to find a different GPIO pin on the Dragino that can be re-wired to do the job of toggling reset, though I don't see anything that looks promising on that front.

All Arduino boards have the SPI reset wired to the power reset, so having the wire in place on the Dragino will make absolutely no difference. By doing it on the Dragino you are increasing the compatibility with boards. If you did it to the chipKIT you would have to then do it with any other chipKITs you might want to use with the Dragino.
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: chipKIT uC32 with Dragino YUN shield

Post by majenko » Thu Feb 25, 2016 6:11 pm

Another option, though one that breaks the bridge functionality, is to use a USB connection between the Dragino and the chipKIT board. You require a couple of extra kernel modules (that I am just working on packaging up) but it does work.

I have found that sometimes the UART connection doesn't always program - it looks like there's something there that is making it a bit "iffy" - maybe the UART login stuff not killing fast enough or something...?
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: chipKIT uC32 with Dragino YUN shield

Post by majenko » Thu Feb 25, 2016 6:26 pm

FTDI drivers for the Dragino: http://uecide.org/ftdi_1.0.0_ar71xx.ipk
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 7:05 pm

Hi,

Thank you for your prompt reply.
I have wired the Dragino as you said.
did all the steps in your link above.
this is the error I get in UECIDE.
Compiling...
• Compiling sketch...
• Compiling core...
‣ api
• Compiling libraries...
• Linking sketch...
Compiling done.
Memory usage
• Program size: 6096 bytes
• Memory size: 492 bytes
• Compilation took 0.614 seconds
Uploading firmware...
Uploading firmware image...
com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect
at com.jcraft.jsch.Util.createSocket(Util.java:349)
at com.jcraft.jsch.Session.connect(Session.java:215)
at com.jcraft.jsch.Session.connect(Session.java:183)
at org.uecide.builtin.scp.main(scp.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.uecide.Context.runBuiltinCommand(Context.java:802)
at org.uecide.Context.executeCommand(Context.java:540)
at org.uecide.Context.executeKey(Context.java:485)
at org.uecide.Context.executeUScript(Context.java:618)
at org.uecide.Context.executeKey(Context.java:480)
at org.uecide.Sketch.programFile(Sketch.java:3401)
at org.uecide.Sketch.upload(Sketch.java:1650)
at org.uecide.Editor$DefaultRunHandler.run(Editor.java:184)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.jcraft.jsch.Util.createSocket(Util.java:343)
... 16 more
I was trying to upload the BLINK demo.
I installed the pic32Prog_2.0... and it said it configured.
Then I copied the chipkit.service as directed.
Modified the board.txt for both the ChipKIT uC32 and WF32 boards
rebooted everything, then tried uploading the sketch.
Am I missing a step? It says "connection Refused".

Under Hardware->Device it is blanc
Under Hardware->Programmers I selected "Upload via Dragino YUN shield at" then here is noting after the at.
When I try to upload it does ask for a password.

I tried this with both the WF32 and the uC32, same error.

So how do I get a blink.hex file that I cam manually upload?

Luc

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

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Thu Feb 25, 2016 7:21 pm

The problen is that it's not finding the dragino with mdns. It is a bit shaky at the moment.

You can manually specify an ip jn thd sketch itself with

#pragma parameter ip=192.168.0.21

Or you can use the hostname:

#pragma parameter ip=dragino-43af7h.local

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

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 7:23 pm

Ho,

OK. Loading the .hex file manually works as advertised. But UECIDE does not.
Half way there. :)

Luc

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 7:33 pm

Hi,
well! the "#pragma parameter ip=mydragino-01" did it :D .
Work like a charm.

Luc

Post Reply