Pinoccio / firmware-pinoccio

Collects the main pinoccio sketch and all libraries it depends upon
20 stars 13 forks source link

build.sh --upload fails on MacOS X (10.8.5) #7

Open morlac opened 10 years ago

morlac commented 10 years ago

When running ./update.sh and ./build.sh --update I get the following output:

hagbard:firmware-pinoccio adams$ ./update.shUpdating...
Current status is:
+81672c382966d85e555a0e2aaa2628a915e82d4f hardware/pinoccio (remotes/origin/HEAD)
 66c5d6149e36bc97f97d7e0623d27c62365eb125 libraries/bitlash (remotes/origin/pinoccio)
+28642def6aa217edaad0b6f22d5f21a66caf38ca libraries/gainspan (heads/master)
 49455b0b85982af5ab30889e4810c0ef9ca3cb3f libraries/js0n (heads/master)
 2997673076277a8dfe47e905b9f18ada6d87b25b libraries/lwm (remotes/origin/pinoccio)
+df2329b5371dbb6a80bbdc8f2a13a880c35fdf29 libraries/pinoccio (remotes/origin/HEAD)

Update successful!

hagbard:firmware-pinoccio adams$ ./build.sh --upload
Detecting version...
Bootstrap build -1 (rev 2014031902-13-g2d77a2d-dirty)
Building/uploading...
Build options changed, rebuilding all

Sketch uses 107,106 bytes (42%) of program storage space. Maximum is 253,952 bytes.
Global variables use 13,590 bytes of dynamic memory.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
Done!

(ARDUINO and PORT variables in build.sh set properly) (for proper usage of build.sh.local first setting of ARDUINO_OPTIONS should happen after sourcing build.sh.local)

matthijskooijman commented 10 years ago

Hmm, does uploading work normally when using the IDE manually? Do you perhaps still have the serial port opened somewhere (Chrome app for HQ still running, IDE serial monitor still open)?

morlac commented 10 years ago

This happens with the Arduino-IDE referenced in the README.md. With my normal Arduino-IDE and normal Arduinos everything is ok. The serial port is not opened by any other software (Chrome-HQ-app is not running - not even Chrome itself was running ;).

matthijskooijman commented 10 years ago

Weird. But did you also try manually uploading through the IDE, instead of using build.sh? It might be that this is what you meant, with your reply, but I'm not completely sure.

The error message itself is not really useful - it just means that the Pinoccio bootloader isn't responding, without any indication as to why.

Does the Pinoccio's led blink when the upload starts (that's shortly after the "Global variables use 13,590 bytes of dynamic memory." message)? It should - it indicates the pinoccio is reset and the bootloader is started.

morlac commented 10 years ago

The IDE linked in the README.md itself doesn't even start at all but that doesn't matter as I currently only need compile and upload - which should work via shell. The Pinoccio's LED doesn't blink. Even when I try to connect to via picocom.

matthijskooijman commented 10 years ago

Hmm, it doesn't start at all? Any error messages?

morlac commented 10 years ago

Regarding the IDE: when I try to launch it, I only get a Message-Window telling me ' "Arduino_Pinoccio.app" is corrupt and can not be opened. It is recommended to move the object in the trash.' - but as it's download-link indicates it's a nightly-build I'm not really wondering.

morlac commented 10 years ago

Here a snipped of what I get when i run build.sh in verbose-mode:

[...]
Sketch uses 107,190 bytes (42%) of program storage space. Maximum is 253,952 bytes.
Global variables use 13,590 bytes of dynamic memory.
/Applications/Arduino_Pinoccio.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino_Pinoccio.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega256rfr2 -cwiring -P/dev/tty.usbmodemfd13131 -b115200 -D -Uflash:w:/Users/adams/github/pinoccio/firmware-pinoccio/build/Bootstrap.cpp.hex:i 

avrdude: Version 6.0.1, compiled on Apr  3 2014 at 22:00:33
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino_Pinoccio.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/adams/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodemfd13131
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: wiring_open(): releasing DTR/RTS
avrdude: wiring_open(): asserting DTR/RTS
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done.  Thank you.

processing.app.debug.RunnerException
    at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:125)
    at processing.app.Sketch.upload(Sketch.java:1719)
    at processing.app.Sketch.exportApplet(Sketch.java:1625)
    at processing.app.Sketch.exportApplet(Sketch.java:1597)
    at processing.app.Editor$DefaultExportHandler.run(Editor.java:2397)
    at processing.app.Base.<init>(Base.java:439)
    at processing.app.Base.main(Base.java:225)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at apple.launcher.LaunchRunner.run(LaunchRunner.java:116)
    at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
    at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
Caused by: processing.app.debug.RunnerException: Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
    at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:111)
    at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:123)
    ... 13 more
Done!
matthijskooijman commented 10 years ago

Hmm, it appears that you might need to configure OSX to allow running unsigned applications (see this comment). I'm not sure how this works in OSX, though.

The output you paste looks good to me. I'm wondering if there is somehow something wrong with your scout. Did you manage to update it through the chrome app / HQ before?

You say the led doesn't blink when you connect through picocom, but do you get the Scoutscript prompt using picocom?

And just to rule out something obvious - is the power switch set to on?

morlac commented 10 years ago

Yes .. the power-switch is set to on =)

Sadly I don't get the Scoutscript prompt .. I don't get anything from this Scout.

The Chrome-HQ-App was responsible for the state of this Scout: the OTA-update failed, so I tried to find another way to update.

matthijskooijman commented 10 years ago

Hmm. If you power up the scout (by toggling the switch), does the led blink then?

Did this scout ever work?

Do you happen to have a second scout?

morlac commented 10 years ago

The RGB-LED blinks once. This Scout worked until I tried to update via HQ OTA. The only other Scout I currently own is the Lead Scout.