Can Yun USB be used to Upload to microusb?

I know there's the wifi and ethernet method to upload new code. I know there's the microusb method to upload new code.

Question is can the linux side be told to load new code using the Yun usb port to the microusb? I'm asking because there are shield compatibility issues that prevent wifi/ethernet uploading access because the linux side needs access to spi but can't get it.

Thanks

mdoan7: I know there's the wifi and ethernet method to upload new code. I know there's the microusb method to upload new code.

Question is can the linux side be told to load new code using the Yun usb port to the microusb? I'm asking because there are shield compatibility issues that prevent wifi/ethernet uploading access because the linux side needs access to spi but can't get it.

Thanks

@mdoan7, for what it sounds like you are trying to do. I would say NO to your question.

However, I believe you are trying to update the Arduino sketch from the Linux side so you can use the SPI (which is using pin 0 & 1). If so, then that can be done, just not at the same time.

Also, I have not done this, and I am not an electronics guy. Perhaps SonnyYu, ShapeShifter or Angelo9999 might have an answer.... (of course, other people might have an answer).

Jesse

"/dev/ttyATH0" is UART between AR9331 and ATmega32u4. Upload without USB?

http://forum.arduino.cc/index.php?topic=191564.0

Thanks for all the input.

@sonnyyu, that link was very helpful.

To be clear, I want to compile the sketch in the IDE, sftp the *.cpp.hex into linux side, connect USB-A to micro-usb, and tell avrdude to upload it to 32u4 via the micro-usb.

Can I run this from linux side, where is whatever port is assigned, i.e. /dev/ttyACM0 ?

1) Connect/disconnect serial@1200 to reset and start bootloader
2) avrdude -C/etc/avrdude.conf -v -patmega32u4 -cavr109 -P<port> -b57600 -D -Uflash:w:sketch.cpp.hex:i

----update–
I tried the above and it seemed to upload the sketch but the sketch failed to run. I also lost the usb connection to the microusb. I had to upload a sketch via the IDE wifi/ethernet to restore the yun’s micro-usb and normal functionality. I noticed the IDE uses a newer version of avrdude and config file. Copying over this config to the Yun also did not work. Avrdude errored out for syntax… perhaps incompatibility to the config file. Closer but not there yet.

mdoan7:
----update–
I tried the above and it seemed to upload the sketch but the sketch failed to run. I also lost the usb connection to the microusb. I had to upload a sketch via the IDE wifi/ethernet to restore the yun’s micro-usb and normal functionality. I noticed the IDE uses a newer version of avrdude and config file. Copying over this config to the Yun also did not work. Avrdude errored out for syntax… perhaps incompatibility to the config file. Closer but not there yet.

You uploaded the sketch without bootloader. That’s the reason of the non working usb connection. When you upload the sketch via WiFi there is a “merge-sketch-with-bootloader” step between the wifi upload and the microntroller programming. Maybe the sketch failed to run because you needed to reset the board after the upload.