Loading the sketchbook examples problem

Hi there,

I've just started to play with my Arduino NG rev c which I bought a few weeks ago. I've gone through all the steps on the beginners tutorial and installed everything on my (Windows Vista) machine.
When I come to upload the blink file to my Arduino, I get the following error:

"The selected serial port -> C:\Program Files\arduino\arduino-0008\examples\Digital\Blink\applet\Blink.hex does not exist or your board is not connected"

further:

Binary sketch size: 1112 bytes (of a 14336 byte maximum)

Atmel AVR ATmega168 is found.
Error: No such file or directory
Firmware Version: 1.15
Firmware Version: 1.15
-> C:\Program Files\arduino\arduino-0008\examples\Digital\Blink\applet\Blink.hex

My board is definitely connected, and I have the right serial port and microcontroller selected. The Blink.hex file does not exist, indeed the /applet/ directory doesn't either. This is as came with the 0008 download. I even downloaded the 0007 zip file to see if the examples structure was more complete there.

So, could anyone help me?

  • Am I doing anything wrong in uploading my Blink file (I press the reset button then immediately hit upload)
  • Have I mistakenly downloaded the wrong set of files
  • Does my Vista operating system change things?
  • Why does the LED blink when I put it in pins 13 & ground without having uploaded the blink file? is it preinstalled?

Thanks,

Martin Sweeney.

  • Why does the LED blink when I put it in pins 13 & ground without having uploaded the blink file? is it preinstalled?

the NG usually comes preloaded with the blink program.

D

Strange error - it may have something to do with Vista (Arduino hasn't been tested under it). Can you change the upload.verbose setting in your Arduino preferences file to true and try again? (You can find the location of the preferences file in the preferences dialog in the environment. Be sure to exit from the environment before editing the file.) It should display the command line used to upload the code, which should help explain what's wrong.

I've got a similar problem on my Windows XP computer. I can't upload sketches to my NG rev.c board. I know the board is connected through COM3: I use the Serial Monitor to send characters to the board, and the RX led on the board always blinks appropriately.

But when I try to compile the Blink program, I get back "Couldn't determine program size: " with no further information. When I try to upload to the Arduino, I get this:

C:\Program Files\arduino-0008\tools/avr/bin/uisp -v=4 -dpart=atmega168 -dprog=stk500 -dserial=/dev/com3 -dspeed=19200 --upload --verify if=C:\Documents and Settings<name>\Application Data\Arduino\Blink2\applet\Blink2.hex

All my paths seem to be correct: the preferences file is pointing at the correct folder to find the *.pde file. There's just no *.hex file on my harddrive.

When you try to upload, do you get an error message following the command line? Sometimes the Arduino software gives the "Couldn't determine program size" error even when the sketch compiles successfully, so that may not be a problem. Can you also enable build.verbose in your preferences.txt? And then post the full text of the messages you get when you upload (this will also compile your sketch)?

When you try to upload, do you get an error message following the command line? Sometimes the Arduino software gives the "Couldn't determine program size" error even when the sketch compiles successfully, so that may not be a problem. Can you also enable build.verbose in your preferences.txt? And then post the full text of the messages you get when you upload (this will also compile your sketch)?

When I compile the program I get this:

C:\Program Files\arduino-0008\tools/avr/bin/avr-gcc -c -g -Os -IC:\Program Files\arduino-0008\lib\targets\arduino -w -mmcu=atmega168 -DF_CPU=16000000L C:\Program Files\arduino-0008\lib\targets\arduino\pins_arduino.c -oC:\Documents and Settings<name>\Application Data\Arduino\Blink2\applet\pins_arduino.c.o
Couldn't determine program size:

When I try to upload to the Arduino I get this:

C:\Program Files\arduino-0008\tools/avr/bin/uisp -v=4 -dpart=atmega168 -dprog=stk500 -dserial=/dev/com3 -dspeed=19200 --upload --verify if=C:\Documents and Settings<name>\Application Data\Arduino\Blink2\applet\Blink2.hex

And the files pins_arduino.c.o and Blink2.hex do not exist on my hard drive.

Weird. It sounds like avr-gcc and uisp are never actually running. Am I right in assuming that you replaced your name with in the path? Or does the message actually include the string ? Are there any non-ASCII characters in your username?

Does C:\Program Files\arduino-0008\tools/avr/bin/avr-gcc exist? Can you from a command prompt in the C:\Program Files\arduino-0008\ directory run tools/avr/bin/avr-gcc (it should say something like avr-gcc: no input files). From the same directory, can you run the first command line you posted (the one with pins_arduino.c)? Does it generate the pins_arduino.c.o file?

Some idea for debugging: do you have any versions of cygwin installed? If so, make sure they're not running. Also try moving arduino to a directory without any spaces in its name.

Does C:\Program Files\arduino-0008\tools/avr/bin/avr-gcc exist? Can you from a command prompt in the C:\Program Files\arduino-0008\ directory run tools/avr/bin/avr-gcc (it should say something like avr-gcc: no input files). From the same directory, can you run the first command line you posted (the one with pins_arduino.c)? Does it generate the pins_arduino.c.o file?

Now this is weird -- I moved the arduino-0008 directory to the root of my C: drive, and I changed my sketchbook to use the arduino-0008 directory's sketchbook. None of the directories have spaces in their name. All the environment variables point to where they're supposed to point. And it still doesn't work.

I opened a command prompt, went to the C:\arduino-0008/tools/avr/bin directory, and tried to run avr-gcc with no inputs. I got no text response: the computer paused for fraction of a second, and then returned the command prompt. No message along the lines of "no input files" or anything else. I tried to manually run all the other *.exe files in that directory, and got nothing: no error messages. I tried to run each program with "-h", "--h", "-help" and "--help" switches, and still got no response.

I then deleted the Arduino-0008 directory, re-downloaded the arduino-0008 software from the arduino website, and tried everything again. I'm still unable to compile, and manually running the *.exe files returns no error messages.

Hmm, that is strange.

The avr binaries (avr-gcc, etc.) rely on some DLLs provided by cygwin. I'm guessing that you have similar but incompatible versions of the DLLs somewhere and that those are being used instead of the ones that come with Arduino. What happens if you cd to c:\arduino-0008 and run tools\avr\bin\avr-gcc (the cygwin DLLs are in the root Arduino directory, so you should be there when you run avr-gcc)? Do you have WinAVR installed? Can you search for cygwin1.dll in your windows directory (or a subdirectory of it)?

Hmm, that is strange.

The avr binaries (avr-gcc, etc.) rely on some DLLs provided by cygwin. I'm guessing that you have similar but incompatible versions of the DLLs somewhere and that those are being used instead of the ones that come with Arduino. What happens if you cd to c:\arduino-0008 and run tools\avr\bin\avr-gcc (the cygwin DLLs are in the root Arduino directory, so you should be there when you run avr-gcc)? Do you have WinAVR installed? Can you search for cygwin1.dll in your windows directory (or a subdirectory of it)?

DONE!!!

The compile process wasn't finding the cyg*.dlls. I put the PATH right, and now it works!

Thank you so very much for taking all this time to help!

No problem. Glad you got it working.

But when I try to compile the Blink program, I get back "Couldn't determine program size: " with no further information.

I get this error in Arduino-0008 on my MacBook Pro, most often on the first compile/upload tryy ... I just hit Upload again and it goes away!

cheers ... BBR

Yea... the "couldn't determine program size" won't hurt anything... it just means that you don't get the little message telling you how big your compiled sketch is. But everything should still be working.

Hmm, that is strange.

The avr binaries (avr-gcc, etc.) rely on some DLLs provided by cygwin. I'm guessing that you have similar but incompatible versions of the DLLs somewhere and that those are being used instead of the ones that come with Arduino. What happens if you cd to c:\arduino-0008 and run tools\avr\bin\avr-gcc (the cygwin DLLs are in the root Arduino directory, so you should be there when you run avr-gcc)? Do you have WinAVR installed? Can you search for cygwin1.dll in your windows directory (or a subdirectory of it)?

I am having a similar problem using 0009 on vista. When I run the compile from the command line, this is what I get:

C:\Util\arduino\arduino-0009>C:\Util\arduino\arduino-0009\tools/avr/bin/avr-gcc
-c -g -Os -IC:\Util\arduino\arduino-0009\lib\targets\arduino -w -mmcu=atmega168
-DF_CPU=16000000L C:\Util\arduino\arduino-0009\lib\targets\arduino\pins_arduino
c -oc:\Util\arduino\arduino-0009\examples\Digital\Blink\applet\pins_arduino.c.o
Assembler messages:
Can't open /cygdrive/c/Users/shiblaj/AppData/Local/Temp/ccsfeOdE.s for reading:
No such file or directory

I finally got this working with Vista ( version 0009 ) - After installing, then deleting the tools\avr\avr folder, installing the 20070525 version of winavr, moving the cygwin1.dll that came with winavr and then turning off UAC ( User access control ) in Vista - all is now working!

Awesome. I'm glad you figured it out. The current top priority for the software is making it compatible with Vista, so hopefully everything should just work in Arduino 0010.