Configuring RAD for Duemilanove

7 views
Skip to first unread message

stephenfritzle

unread,
Jun 10, 2009, 10:42:50 PM6/10/09
to Ruby Arduino Development
I have been trying the past couple of days to configure RAD to run
with my Duemilanove and atmega 328p. I have tried using arduino-0012,
14, and 15.

I apologize if my problem has been covered, but I checked rigorously
evertwhere I could trying to figure it out and had no luck.

Also sorry this is kind of a noob question I am not very familiar with
Linux or bash.

I set up everything following the instructions at the RAD installation
guide I found on this site (http://radinstallation.blogspot.com/) as
well as a review covered in the RAD avrdude timeout message thread
(http://groups.google.com/group/ruby-arduino-development/browse_thread/
thread/6a0636f29a71ab28) and both times I could compile my sketch
fine. But when I went to upload the sketch I receive an error tell me
that ~arduino-0015/hardware/tools/avr/bin/avrdude doesn't exist, when
I know I created a link to that directory, and I can see the file.

Sorry this isn't the most comprehensive description, I am not infront
of the machine I have been working on, so if any further info, such as
the trace, is necessary I can post it tomorrow.

Thank you very much, I hope I can get this to work I would love to
work with RAD :).

colin h

unread,
Jun 11, 2009, 11:05:10 AM6/11/09
to ruby-arduino...@googlegroups.com
if you are using ubuntu, there is a rake task to handle the
installation for you. ( run "rake -T" to see all rake tasks ) if not,
then you can follow along and confirm that the same steps are taken on
your system.

to get a functional system, i had to do a number of extra steps not
listed in that installation guide you linked to.

Here is the file that lists the steps for a functional linux system

http://github.com/atduskgreg/rad/blob/16d82d37d59100d8d144e0673171a879e3e7ab29/lib/rad/linux_installer.rb


let me know if this works..

-colin
aberant.tumblr.com
last.fm/music/quadratic
--
Learn Dammit!
--T. Tripp

stephenfritzlde

unread,
Jun 12, 2009, 10:07:24 AM6/12/09
to Ruby Arduino Development
Thank you for your reply colin.

I am running ubuntu, I tried rake -T and i didn't see a rake task like
you mentioned, unless I am misunderstanding what you mean.

So I followed along with the steps in the LinuxInstaller.rb and as you
said there were steps that the other guides missed, however I still
got the same result.

cd /usr/local/arduino-0015/sketchbook/my_sketch/my_sketch; make upload
/usr/local/arduino-0015/hardware/tools/avr/bin/avrdude -F -p
atmega328p -P /dev/tty.usbserial* -c stk500 -b 19200 -C /usr/local/
arduino-0015/hardware/tools/avr/etc/avrdude.conf -U
flash:w:my_sketch.hex
/bin/sh: /usr/local/arduino-0015/hardware/tools/avr/bin/avrdude: not
found
make: *** [upload] Error 127

I know that avrdude is linked, I am looking right at it.

Here is the trace:

steve@steve-laptop:/usr/local/arduino-0015/sketchbook/my_sketch$ sudo
rake make:upload --trace
(in /usr/local/arduino-0015/sketchbook/my_sketch)
/usr/local/arduino-0015/sketchbook/my_sketch/vendor/rad/init.rb:8:
warning: already initialized constant PLUGIN_C_VAR_TYPES
** Invoke make:upload (first_time)
** Invoke make:compile (first_time)
** Invoke make:clean_sketch_dir (first_time)
** Invoke build:file_list (first_time)
** Execute build:file_list
** Invoke build:sketch_dir (first_time)
** Invoke build:file_list
** Execute build:sketch_dir
mkdir -p /usr/local/arduino-0015/sketchbook/my_sketch/my_sketch
** Execute make:clean_sketch_dir
rm /usr/local/arduino-0015/sketchbook/my_sketch/my_sketch/
my_sketch.hex
rm /usr/local/arduino-0015/sketchbook/my_sketch/my_sketch/core.a
rm /usr/local/arduino-0015/sketchbook/my_sketch/my_sketch/
my_sketch.elf
rm /usr/local/arduino-0015/sketchbook/my_sketch/my_sketch/Makefile
** Invoke build:sketch (first_time)
** Invoke build:file_list
** Invoke build:sketch_dir
** Invoke build:gather_required_plugins (first_time)
** Execute build:gather_required_plugins
0 of 17 plugins are being loaded:
** Invoke build:plugin_setup (first_time)
** Execute build:plugin_setup
** Invoke build:setup (first_time)
** Execute build:setup
** Execute build:sketch
** Execute make:compile
cd /usr/local/arduino-0015/sketchbook/my_sketch/my_sketch; make
depend; make
if grep '^# DO NOT DELETE' Makefile >/dev/null; \
then \
sed -e '/^# DO NOT DELETE/,$d' Makefile > \
Makefile.$$ && \
mv -f Makefile.$$ Makefile; \
fi
echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' \
>> Makefile; \
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-gcc -M -
mmcu=atmega328p -DF_CPU=16000000 -I/usr/local/arduino-0015/hardware/
cores/arduino -I/usr/local/arduino-0015/hardware/libraries/
SoftwareSerial /usr/local/arduino-0015/hardware/cores/arduino/
pins_arduino.c /usr/local/arduino-0015/hardware/cores/arduino/
wiring.c /usr/local/arduino-0015/hardware/cores/arduino/
wiring_analog.c /usr/local/arduino-0015/hardware/cores/arduino/
wiring_digital.c /usr/local/arduino-0015/hardware/cores/arduino/
wiring_pulse.c /usr/local/arduino-0015/hardware/cores/arduino/
wiring_serial.c /usr/local/arduino-0015/hardware/cores/arduino/
wiring_shift.c /usr/local/arduino-0015/hardware/cores/arduino/
WInterrupts.c >> Makefile
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/cores/arduino/pins_arduino.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/cores/arduino/wiring.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/cores/arduino/wiring_analog.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/cores/arduino/wiring_digital.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/cores/arduino/wiring_pulse.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/cores/arduino/wiring_serial.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/cores/arduino/wiring_shift.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/cores/arduino/WInterrupts.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/cores/arduino/HardwareSerial.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/libraries/SoftwareSerial/SoftwareSerial.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-ar rcs core.a /usr/
local/arduino-0015/hardware/cores/arduino/Print.o
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-gcc -
mmcu=atmega328p -I. -gstabs -DF_CPU=16000000 -I/usr/local/arduino-0015/
hardware/cores/arduino -I/usr/local/arduino-0015/hardware/libraries/
SoftwareSerial -Os -Wall -Wstrict-prototypes -std=gnu99 -o
my_sketch.elf my_sketch.cpp -L. core.a -lm
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for Ada/C/ObjC but not for C++
cc1plus: warning: command line option "-std=gnu99" is valid for C/ObjC
but not for C++
my_sketch.cpp: In function ‘void loop()’:
my_sketch.cpp:84: warning: statement has no effect
/usr/local/arduino-0015/hardware/tools/avr/bin/avr-objcopy -O ihex -
R .eeprom my_sketch.elf my_sketch.hex
** Execute make:upload
cd /usr/local/arduino-0015/sketchbook/my_sketch/my_sketch; make upload
/usr/local/arduino-0015/hardware/tools/avr/bin/avrdude -F -p
atmega328p -P /dev/tty.usbserial* -c stk500 -b 19200 -C /usr/local/
arduino-0015/hardware/tools/avr/etc/avrdude.conf -U
flash:w:my_sketch.hex
/bin/sh: /usr/local/arduino-0015/hardware/tools/avr/bin/avrdude: not
found
make: *** [upload] Error 127
rake aborted!
Command failed with status (2): [cd /usr/local/arduino-0015/sketchbook/
my_s...]
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `sh'
/usr/local/arduino-0015/sketchbook/my_sketch/vendor/rad/tasks/
build_and_make.rake:49
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
`invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
`invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
`invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19



I really hope we can figure this out soon, I have to get this going
for a project for school >.<

If I can't get working soon I think I'm gonna have to give up on rad
for now :(.

Anyway thank you for your time, hope to hear from you soon.


On Jun 11, 11:05 am, colin h <qzz...@gmail.com> wrote:
> if you are using ubuntu, there is a rake task to handle the
> installation for you.  ( run "rake -T" to see all rake tasks ) if not,
> then you can follow along and confirm that the same steps are taken on
> your system.
>
> to get a functional system, i had to do a number of extra steps not
> listed in that installation guide you linked to.
>
> Here is the file that lists the steps for a functional linux system
>
> http://github.com/atduskgreg/rad/blob/16d82d37d59100d8d144e0673171a87...

Brian Riley

unread,
Jun 12, 2009, 11:08:55 AM6/12/09
to ruby-arduino...@googlegroups.com
At least one problem is easy to see. The Duemilanove loads sketches at
57600 baud, NOT 19200!

jdar

unread,
Jun 17, 2009, 1:30:36 PM6/17/09
to Ruby Arduino Development
Anybody out there get a build to work with an ArduinoBT? Right now RAD
seems to assume a USB serial. Haven't found that override yet.

Is there a recommended way to build for other configurations? In my
head, a class inheriting the proper serial baud would seem the right
design. I'll muck with that, or whatever you think the right
architecture is. (Lemme know.)

D
> ...
>
> read more »

JD Barnhart

unread,
Jun 17, 2009, 1:56:35 PM6/17/09
to ruby-arduino...@googlegroups.com
Darius,

Check makefile.erb lines 63 & 77 for ports and upload rates.  Re: building for other configurations -- How about something along the lines of a method call in the sketch like:

arduino_type "bt"

jd

Greg Borenstein

unread,
Jun 17, 2009, 2:02:12 PM6/17/09
to ruby-arduino...@googlegroups.com
A better spot would be in config/hardware.yml. You can add an optional
entry for board_type with defaults.

-- Greg
> > > mmcu=atmega328p -DF_CPU=16000000 -I/usr/local/arduino-0015/
> hardware/
> > > cores/arduino -I/usr/local/arduino-0015/hardware/libraries/
Reply all
Reply to author
Forward
0 new messages