Arduino DUE not loading sketches

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

Arduino DUE not loading sketches

Post by voodoochemist »

I purchased the Arduino Due: http://www.adafruit.com/products/1076

I have not been able to upload sketches. I have worked on the UNO without any problem - I purchased the DUE to have more memory for bigger sketches. However, I keep getting an error message when trying to upload even the bare minimum sketch (setup and loop).

I am connected to my Mac OS v10.5.8 using a single USB cable. I have tried two different cable connections (first one purchased via adafruit:
http://www.adafruit.com/products/1099 (this USB male micro B which goes into the DUE, but it's a female USB A). This connection still needed another cable: a male to male USB Type A. So I bought one from ebay, but I received the error message.

After I received the error message, I guessed maybe it was a bad cable from ebay, so I bought a single USB micro B male to USB type A male from digikey, and I still get the same error message, so it's not the cable! :)

In the IDE, I've changed the board setting from UNO to Duemilanove. I'm hoping there's a board setting I'm not aware of that I can install?

For "programmer" on the IDE, I've tried AVR ISP and AVRISP mkII, but I get the same error. Am I missing something here?

The device is receiving power (both the green LED "on" and yellow "L" are continuously illuminated.

When I attempt to upload a sketch, I can see the "RX" light flicker on three times before the error on the IDE is displayed. The error message is as follows:

Problem uploading to board. See [arduino URL for troubleshooting]
Binary sketch size.... 466 bytse of a 30,720 byte max
"avrdude: stk500_recv(): programmer is not responding"

Help please!

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino DUE not loading sketches

Post by adafruit_support_bill »

In the IDE, I've changed the board setting from UNO to Duemilanove. I'm hoping there's a board setting I'm not aware of that I can install?
To connect to the Due, you need IDE V 1.5 Beta (download here: http://arduino.cc/en/Main/Software )
The Due choices are: Programming Port or Native USB port. I recommend you use the Programming Port. Refer to the port labels on the back of the board.

voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

Re: Arduino DUE not loading sketches

Post by voodoochemist »

Thank you for the quick response, but now I have a different error message using the IDE version 1.5.2 (the most current version)

I receive the following error immediately (the IDE never gets far enough to communicate with the Arduino hardware, as it did last time. this error happens about a quarter second after clicking 'upload sketch'):

"Error compiling
dyld: unknown required load command 0x80000022
/Applications/Arduino152.app/Contents/Resources/Java/hardware/tools/g++_arm_non_eabi/bin/arm-none-eabi-g++ returned 133"

In addition, I receive the command prompt:
"The application arm-none-eabi-G+ + quit unexpectedly" although the IDE never actually closes. (options are "ignore", "report..." or "relaunch") I click ignore and the IDE stays open.

Board is set to "DUE"
Programmer "AVR ISP"

Thank you!

voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

Re: Arduino DUE not loading sketches

Post by voodoochemist »

In addition, board is set to DUE (PROGRAMMING), and i'm connected to the programming port.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Arduino DUE not loading sketches

Post by adafruit_support_rick »

I just installed Arduino 1.5.2 on a MacBook Pro running 10.7.5. No driver installation required - it just came up working.
The "Programmer setting" should be irrelevant. FWIW, the first time I ran it, it came up with the programmer set to AVR ISP II.

The errors you're seeing tell me that there is some problem with your installation of 1.5.2. I suggest deleting the app entirely and downloading a fresh copy.

You might also try running MacOSX Software Update, and make sure you're up-to-date on Java.

It's also possible that Arduino 1.5.2 is not compatible with MacOSX 10.5, which is a fairly old version of MacOSX.

voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

Re: Arduino DUE not loading sketches

Post by voodoochemist »

Thanks Driverblock, it was the OS. I tried the DUE with IDE 1.5.2 on my friend's macbook air running 10.6.8 and now sketches are uploading. (now i wish i could figure out why i can't get 10.6 to install on my mac - damn thing freezes on blue screen using the install disc. a question for a different forum, i guess...)

Thanks everyone.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Arduino DUE not loading sketches

Post by adafruit_support_rick »

Hmmm … at a guess, I'd say that your 10.5.8 install is semi-corrupted. That's why Arduino 1.5.2 won't run, and it's probably why the 10.6 installer won't run.

What you want to do is backup your whole system to another disk, then do a clean install of 10.6.

Or, is it that it won't even boot from the install disk? If you've got another mac, you connect the two with a firewire cable. Boot the other mac, and connect your mac in target disk mode. You ought to be able to install the system that way.

voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

Re: Arduino DUE not loading sketches

Post by voodoochemist »

Good ideas Driverblock. I may try that method using the firewire link to initialize my crotchety old mac to get it up to 10.6. In the meantime, I'm borrowing my friend's Macbook Air.

While we have momentum, back to the DUE using this shiny new Macbook Air... it seems all of my sketches trip errors when I try to upload them, but these sketches worked fine on the UNO. (I confirmed both these two sketches still upload fine using this Macbook Air)

1) I attempt to get a little OLED sketch to load, but I get an error. (http://www.adafruit.com/products/661)
2) I try loading a sketch for a temperature/humidity sensor, but I get an error. (http://www.adafruit.com/products/386)
Again, if I hook up the UNO (and set the IDE to "UNO" from "DUE") and load these sketches, they load no problem.

For example, for the temp/humidity sensor, I get "error compiling" followed by:
/Users/name/Documents/Arduino/libraries/DHumidTemp/DHT.cpp: In member function 'boolean DHT::read()':
/Users/name/Documents/Arduino/libraries/DHumidTemp/DHT.cpp:110: error: 'cli' was not declared in this scope
/Users/name/Documents/Arduino/libraries/DHumidTemp/DHT.cpp:140: error: 'sei' was not declared in this scope

For the OLED, the error is:
error: expected initializer before 'logo16_glcd_bmp'

The lazy DUE isn't going to the libraries... not sure why.

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino DUE not loading sketches

Post by adafruit_support_bill »

/Users/name/Documents/Arduino/libraries/DHumidTemp/DHT.cpp:110: error: 'cli' was not declared in this scope
/Users/name/Documents/Arduino/libraries/DHumidTemp/DHT.cpp:140: error: 'sei' was not declared in this scope
Looks like inline assembly code. The Due is a different processor with a different instruction set. I suspect that this library has not been ported to the Due yet.

voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

Re: Arduino DUE not loading sketches

Post by voodoochemist »

So all these peripherals I have won't work on the DUE, if I understand correctly. :evil: Great... is the DUE temporarily incompatible? (is there a plan in the works to upgrade the IDE to make the DUE's core chip compatible with the UNO sketches?)

My goal is to use all these peripherals together. Should I go back to my UNO since at least the libraries are compatible with the processor? I ran out of memory in my UNO when I load all the libraries for the OLED, the temp/humidity sensors, the SD Card, (not to mention the needed variables) -- which is why I thought the DUE was a good next step. Didn't realize the UNO and DUE had such a significant incompatibility.

1) Is there a way of boosting my UNO memory (SRAM?) for sketches?
2) Or is there an Arduino that has more memory for sketches whose processor... processes like the UNO? I guess the MEGA? I went with the DUE because it had the most memory, but maybe I need to take my chances with the smaller MEGA.
3) Or... should I explore microprocessors outside the realm of Arduino?

Thank you!

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino DUE not loading sketches

Post by adafruit_support_bill »

The devices are electrically compatible, but not all libraries have been updated yet. The two most recent Arduino hardware releases (Leonardo and Due) have significant hardware differences requiring substantial re-writes of most libraries. We are still playing catch-up with these, but expect to get to all of them eventually.

There are techniques for optimizing memory utilization on the Uno. If you have a lot of string literals, you should look into the F() macro for storing these in flash.
In the short term, the Mega will give you substantially more memory to work with.

voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

Re: Arduino DUE not loading sketches

Post by voodoochemist »

The Mega 2560 is fully compatible with the UNO sketches, correct?
https://www.adafruit.com/products/191

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino DUE not loading sketches

Post by adafruit_support_bill »

From a software perspective, it is a superset of the UNO. But there are a couple of pin-mapping differences to be aware of:

Hardware SPI and I2C are on different pins from the UNO. http://arduino.cc/en/Main/arduinoBoardMega For shields with SD cards, we typically work around this with soft-SPI.

Software Serial can only be used on digital pins that support pin-change interrupts. (On the UNO, all pins are supported.)
http://arduino.cc/en/Reference/SoftwareSerial

What shields/breakouts etc. are you planning to attach?

voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

Re: Arduino DUE not loading sketches

Post by voodoochemist »

My plan was to use the following:

1) Four DHT11: http://www.adafruit.com/products/386
2) Data logging shield & and the real time clock built in: http://www.adafruit.com/products/1141
3) OLED: http://www.adafruit.com/products/661
4) and possibly this relay shield: http://seeedstudio.com/wiki/Relay_Shield_V1.0

Thank you.

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino DUE not loading sketches

Post by adafruit_support_bill »

Here is a link to a logger sketch for the Mega using software SPI.: http://forums.adafruit.com/viewtopic.php?f=31&t=27245
The display is an SPI display. You should be able to use the Mega's hardware SPI pins for that.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”