Command-line compiling/updating

The command-line hack should be updated:

htttp://w ww. arduino.cc/en/Hacking/CommandLine

because:

  • it doesn't allow to download arduino-0011-core anymore

  • it is somewhat old (arduino...0011?)

I already installed Arduino 0018. Could someone tell me what commands are executed (and where is the Makefile) when I press the compile+send button of the IDE? Thanks!

(sorry for the "htttttp", but the arduino Forum rejects link to arduino.cc website from new users...)

You might want to start here:

http://www.arduino.cc/en/Hacking/BuildProcess
http://johanneshoff.com/arduino-command-line.html

you might also want to consider to NOT use a makefile at all and go for scons instead http://www.scons.org/. This is definitely simpler than a makefile. Compared to make it is foolproof :wink:

Udo

Good!!

My system is a PowerPC-based Ubuntu 9.10 Linux, without Java.

I was able to compile and upload some .pde programs to an Arduino Diecimila, everything from command-line using Johannes Hoff procedure.

I was not able to have pulsedtr.py working (it just stalls there), butpressing the Arduino reset button and then issuing a "make upload" worked.

A few notes (I'll write a detailed page):

  • when installing with apt-get, I found that "avr-gcc" is named "gcc-avr"

  • in the Makefile, the .../hardware/cores/arduino/ is now (arduino-0018) called .../hardware/arduino/cores/arduino/

  • in the Makefile, the "main.cxx" file is now (arduino-0018) called "make.cpp", so I had to change this line:
    cat $(ARDUINO)/main.cxx >> applet/$(TARGET).cpp
    to:
    cat $(ARDUINO)/main.cpp >> applet/$(TARGET).cpp

  • I had to ignore the warnings "the file avr/delay.h has been moved to util/delay.h"

  • the wiring_serial.c does not exist, so I had to erase its dependency in the makefile, in the line:
    $(ARDUINO)/wiring_pulse.c $(ARDUINO)/wiring_serial.c \

  • I had to erase the precompiled avrdude executable (because it is an x86 executable, while my machine is a PPC), and install the Ubuntu one ("apt-get install avrdude"); I had to disable a dozen parallel port access based hardware in the avrdude.conf as well;

  • the USB port can be changed to match always exactly the Arduino one. Instead of ttyUSB4 I used:

/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A70062FM-if00-port0

(I have other USB serial gadgets as well on my system).

Great. However the pulsedtr issue is strange. I basically copied my pulsedtr code from this page and it always worked as it should. Since it fails for you, you might want to consider some alternative implementation (for example in Pearl).

perl -MDevice::SerialPort -e 'Device::SerialPort->new("/dev/ttyUSB0")->pulse_dtr_on(1000)';

Google finds examples in other languages as well.

If you write up a detailed page in the playground (or fix the existing one) this is highly appreciated :slight_smile:

Udo

I got around the sync error by changing the upload baud rate to 57600, and using the stty line to reset the device. Also if you're using a Duemilanove, change the MCU to atmega328p.

See http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1201441300

here is working solution with arduino 0018 (and 0019):

http://code.google.com/p/arscons

Cool :slight_smile: I like it. You could push it a little bit further by inlining the pulsedtr code. SCONS is python hence everything could be done in one single file.

Udo

Udo/ U r right! pulseDTR is embedded in the SConstruct now. thanks for advice :wink: