Arduino bootloader issue
-
Hi @SYLVAIN-MAILHIOT
Just to confirm, when you connect the Expansion Dock to the Arduino Dock the Omega won't boot?Can you try first booting up the Omega and then connecting the wires?
Please let me know how it goes
-
Seems that was working.
I didn't took the chance to connect the arduino dock when the omega was live.
this is my result :
[.....]
Reading | ################################################## | 100% 0.00savrdude: verifying ...
avrdude: 1 bytes of lock verifiedavrdude: safemode: Fuses OK (E:05, H:DA, L:FF)
avrdude done. Thank you.
-
@SYLVAIN-MAILHIOT awesome, I'm glad it worked out!
happy hacking!
-
Am I right?
The micro USB on the Arduino Dock is only used to power the 'Omega/Arduino' assembly.
The actual flashing is performed via Wi-Fi.- When I have the Arduino with the Omega plugged onto it and flash software for the Arduino
Programming is successful but I always get this error message in the Arduino environment:
ash: merge-sketch-with-bootloader.lua: not found
I looked in the Omega and find these references to the file:
find -name merge-sketch-with-bootloader.lua
./rom/usr/bin/merge-sketch-with-bootloader.lua
./usr/bin/merge-sketch-with-bootloader.lua
I see the I/O responding to the software after the flash, why do I get this bootloader error ?
- When I have the Arduino with the Omega plugged onto it and flash software for the Arduino
-
@Robert-St-Laurent Yep, the Arduino IDE transmits the sketch to the Omega via SCP or SFTP (that's why it asks for a password), and then the Omega flashes the ATmega chip. The micro USB only provides power.
The
ash: merge-sketch-with-bootloader.lua: not found
error will show up every time. This is just supposed to be a script that does some (largely insignificant) processing of the sketch before it is flashed to the ATmega. It fails on the Omega sincelua
isn't installed by default.
You can just ignore it. If the flash fails, there will be other errors.
-
I have the same issue with bootloader.lua
Sketch uses 1,030 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
ash: merge-sketch-with-bootloader.lua: not found
Flashing application '/tmp/sketch.hex' ...
Error: Write failed
Done
Flash complete!
failed to switch to bootloader (invalid address?): No such device or addressI'm connecting to the arduino expension board using micro usb. I was able to flash it multiple times. Somehow, it stopped working
Any tip ?
-
@SYLVAIN-MAILHIOT so the issue isn't the lua script. The issue is that the ATmega is not receiving the I2C command the Omega sends to put the ATmega into reset so that the new sketch can be flashed (as described in the Wiki).
The sketch you loaded last most likely didn't have the Onion Arduino library right?
In any case, try pressing the MCU_RESET button on the Arduino Dock right before loading the sketch. While Arduino Dock LED is flickering super quickly, the sketch upload will work.
-
I'm attempting to burn a new bootloader to the Arduino dock via the instructions here: https://wiki.onion.io/Tutorials/Arduino-Dock/Initial-Setup
It would be great to update the tutorial to clarify booting the Omega first before wiring things up.
My Omega is running 0.0.6 b266. In multiple re-wirings, trying different sequences, I have noticed that the LED on the A-dock stops blinking when I connect the A-dock 13 pin to the Expansion Dock pin 6.
I've double checked the pins and confirmed all the wires work. Here's what I'm seeing when I attempt to flash the bootloader:
sh /usr/bin/arduino-dock flash bootloader
Flashing bootloader...avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.avrdude done. Thank you.
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Done=============
If I can get accurate information, I'd be happy to help clarify the documentation, if that is an option.
-
@R-H Sorry bout that, I've updated the wiki to clarify when the Omega should be booted.
Can you try using the ICSP header method described here?
Let me know how that goes.
-
The MCU_RESET press method has worked for me, but I need to do this every time I upload a sketch. Is there any way to get around the need for this?
-
Hi @Peter-Bailey
Sorry for the late response, do your sketches include the Onion Arduino Library and instantiate anOnion
object as mentioned in the Arduino Dock article?
-
turning off wireless AP fixed this exact same issue for me, might want to add that to the wiki too. Make sure it isn't configured as an access point.
-
This topic should not be marked as SOLVED as none of the suggestions worked for me.
After a whole day trying my solution for the following ERRORfailed to switch to bootloader (invalid address?): No such device or address
This occurred via the Arduino IDE and using the Onion Command LineMy hardware is Original Onion Omega + Original Arduino Dock
(Any communication with Onion results in "We suggest you upgrade to Onion2")Anyway I eventually found a very concise instructions @ [https://onioniot.github.io/wiki/Tutorials/Arduino-Dock/Initial-Setup](link url)
It would appear that it must be configured by burning a new bootloader the very first time.
The second method worked for me i.e. Using the Omega + Expansion Dock with the Arduino Dock ICSP HeaderAnd after that I was able to use the Arduino IDE to program the Arduino Dock.
Now the question is can I communicate via the Onion and the Arduino Dock i.e can a program on the Onion use the Arduino I/O Pins?
And can the two communicate via Serial?