Show Posts
Pages: [1] 2 3 ... 5
1  Forum 2005-2010 (read only) / Troubleshooting / Re: Makefile doesn't work, but with ide works on: January 05, 2009, 03:25:26 pm
Hi Felipe,

the #include of Print.h happens allready, no matter if you use makefile or the IDE.
But the new Print library itself (i.e. Print.cpp) must be known to the makfile. So you have to add "$(ARDUINO)/Print.cpp" to the CXXSRC variable in the makefile.

I just quickly compared the number of files in the core folders of 0011 and 0012. Print.cpp happens to be the only libary file which has been forgotten to get included in the makefile to be fully compatible with the Arduino IDE 0012.

for your upload problem with makefiles: try hitting the reset button manually just before you do "make upload".
2  Forum 2005-2010 (read only) / Syntax & Programs / Re: Makefiles on: January 05, 2009, 03:38:01 pm
you can also just use the makefile which resides in every standard IDE install directory unter Arduinio-0012/hardware/cores/arduino
3  Forum 2005-2010 (read only) / Interfacing / Re: ArduinoBT using the CALL function on: August 30, 2007, 06:58:56 am
hi bigengineer!

that thread is a great help. thanks!
But could you please confirm, that your SET-request program works on a standard configured arduinobt board?
On my board I see "+++SET+++" when starting the SET request. So the escape sequence is ignored and I don't get feedback.
Could you also confirm, that on an original configured arduinobt board, the escape seqeuence is enabled? I'm really wondering here, because in the arduinobt init sktech it says "SET CONTROL ESCAPE - 00 1" which means no escape sequence is enabled accroding to the iWrap user manual.

Even when I'm direct (serial-usb) connected to the Bluegiga chip I don't get an output with "SET".
(And I also ran the Init Sketch to reset all original settings - just to be shure)
Maybe I screwed some setting up... (the ECHO command setting seems ok smiley-wink )

Could someone please post the default output of the "SET" comand on arduinoBT?
I think this would be very good for the arduinobt documentation page.
4  Forum 2005-2010 (read only) / Interfacing / Re: ArduinoBT using the CALL function on: August 29, 2007, 09:08:32 am

im also wrestling with Arduino BT...
I want to enable the DTR line, so that arduinoBT can be reset wirelessly.

So far I can only strongly recommend to use a direct connection to the bluettoth module  (a wired one!) and test your commands from your computer. (reasons are below)
Its quite easy:
To free the Bluetooth serial lines, the ArdunioBT Board must be in reset state. You can just put a jumper between GND and RESET on the ICSP connector to accomplish this (its the opposit end of pin1 of the ICSP con.).
Then you need another serial device. E.g. an arduino USB board or any usb-serial adapter (with TTL levels) would work.
If you want to use an Arduino USB board, you have to put it also in reset state, like the ArduinoBT above.
Then you simply connect the RX pins from one board with the TX pins form the other and vice versa (digital pins 0 and 1). And don't forget to connect GND between both boards also!

The configuration the bluetooth module has as delivered on ArduinoBTs prevents any configure commands as long as there is any active bluetooth connection. Also the command mode entrance with escape sequences is disabled from my understanding.
See the initialisation sketch

I think this is a design error of ArduinoBT. One has to enable command mode activation first and the can play really with bluetooth module interaction etc.. They could have enabled at least a specific "enable command mode pin", but this is also disabled with "SET CONTROL ESCAPE - 00 1"

I wish there would be much more precise ArduinoBT documentation. What's about the solder jumpers?
At least SJ1 named "HS" sounds interesting... Is this for Arduino IDE controlled serial buffer sending? (Massimo? :-)

good luck,
p.s. does anyone know a command to show all current configuration settings of the bluetooth module?

5  Forum 2005-2010 (read only) / Development / Re: Arduino bundle for TextMate on: September 09, 2007, 05:43:13 pm
shure, the makfile that comes in arduino-0009/lib/tragets/arduino also uses local avr-gcc.
This is why I changed it in my makefile  (see rapidshare link to reference the $(AVR_TOOLS_PATH) dir inside an arduino installation.
6  Forum 2005-2010 (read only) / Development / Re: Arduino bundle for TextMate on: September 09, 2007, 02:04:56 pm
Yeah, it's really quick. I'm happy someone else also finds it usefull!

If you add -I$(ARDUINOLIBS)/LCD4Bit to CXXINCS it should recognize the lib w/o a symbolic link. But I think you need to write again in #include <LCD4Bit.h> (with <>).

There must be a nice way to include all libraries from "/lib/target/librariers" without explicitly menitioning them. Similar like in the line that starts with "@for i in $(OBJ)". This is real makefile science...
7  Forum 2005-2010 (read only) / Development / Re: Arduino bundle for TextMate on: September 09, 2007, 10:30:01 am
You are right, but this is no limitation of makefiles. It's only a question of proper usage. We need to use the -I switches for includes right but I forgot how it's done...

regarding your improved upload process: keep in mind you can allways change preferences.txt if you wan't to change the upload programmer. So there's no need to skip the Arduino IDE only to use a different programmer.
8  Forum 2005-2010 (read only) / Development / Re: Arduino bundle for TextMate on: September 08, 2007, 08:21:47 am
For a quick "hack" you need to add LCD4Bit.cpp to the CXXSRC variable in the makefile.
Then in the .pde it must read #include "LCD4Bit.h" (no < >) to reference the lib as a local file. The last step is to put the LCD4Bit.h/.cpp in the same directory as the makefile and the .pde. Then it compiles -  at least in my case. smiley-wink

I'm still searching for a nice setup, to include the arduino libs nicely in the makefile. Can anybody help?
When it's more polished I'll hopefully find time to do a Playground entry.
9  Forum 2005-2010 (read only) / Development / Re: Arduino bundle for TextMate on: August 30, 2007, 10:42:37 am
I fully understand this. Maybe cmake is worth a try... Though cmake would add many more MBs.

I forgot one thing that's really great about using a makefile now:
You can have your preferences saved with the projects.
E.g. on some boards you prefer to use the bootloader while with others you're setup requires an AVRISP MKII - in any case you just set it once. Esp. ATmega8 vs. ATmega168 switching becomes obsolete! I guess some catch this problem often nowadays when having diecimila and older boards around at the same time. Also you can have different clock speeds and baudrates without changing preferences everytime you switch projects etc...

Yes, this is rather advanced stuff, but it's nice beeing still able to do it with a makefile - just as you said, david. I agree, as long as prototype creation works most of the time, better don't touch it...
10  Forum 2005-2010 (read only) / Development / Re: Arduino bundle for TextMate on: August 30, 2007, 05:22:12 am
Well i'm not after a substitution of the current java compile with a makefile. I just like to keep an alternative, when not working with the IDE.
It's not that I like makefiles, but for microcontroller programming is still not too hard to use it - IMHO.
Although I frequently forget important makefile knowledge... :-)
Speaking of it, i think there is a dependency erro in my makefile. Did anybody try it?

Cproto is interesting, thanks! Maybe mellis will use it in the IDE?
But as long as it's not a standard install on unix systems I wouldn't want to use it in a makefile.

On the other hand I think using a makefile, even if it's only in the background of an IDE, is a better standard than doing some custom java-based compile process in the IDE, like it's now. Esp. for maintainance between different IDE versions a certain compile standard could be better...

Of coruse, I agree that the Ardunio goodness comes with the current software and IDE!
But I think it's also good, that the Ardunio IDE doesn't allow too much simplification of C code.
I think the current state of preprocessing is a perfect compromise.
I hope it won't walk away any further from standard avr-gcc C code. Incorporating an alternative  language than C, though, would be again a different question. E.g. ruby arduino developement:  
11  Forum 2005-2010 (read only) / Development / Re: Arduino bundle for TextMate on: August 29, 2007, 06:59:26 am
hi mellis,

of corse you can do with it what you want. It's anyway just a patchwork between different makfiles I found.
You mean, there could be a problem if people don't create a protoype of a self written function before calling their function? I'm shure there is some regular expression for this... how do you filter the protoypes in java? Do you compare against a list of core funcions?

BTW: I think there is an error in the original makefile in targets/arduino:
I think the line that starts with "$(TARGET).elf:" should also depend on $(TARGET).cpp (in my Makefile it is
$(TARGET).pde). Othwerise it didn't recompile on my system if I changed something in $(TAGET).cpp.

Re: avrdude reset. This was a funny discovery. I saw the reset definition for serial bitbangers and thought "hmmm, wait a minute..." smiley-wink. The reset line is held low during the whole upload process. Thats OK, when we use a capacitor for the connection just as in the Diecimila boards.
 I tested is also with another - rather unusual - usb-serial converter from Silabs (CP2102). It works niceley! So this shouldn't depend on FDTI or other converters.

12  Forum 2005-2010 (read only) / Development / Re: Arduino bundle for TextMate on: August 28, 2007, 08:58:34 am
Ok, forgett what I said about cmake. It's just another beast as automake/autoconfig...

xSmurf, your' right. We actualy don't need a java comand line when a proper makefile exists.

Last night I decided not to sleep and came up with this:
  • An improved makefile, which features the same auto reset feature which the arduino IDE does on Diecimila boards. I found out, that avrdude supports to toggle the DTR line... :-)
  • The Makefile also allows to compile and work with standard .pde files directly. I does automatic preprocessing by simple shell commands. No additions to standard .pde files are needed... at least with led_blink works like a charm! ;-)
  • ¬†I made a small addition to textmate's standard Makefile Bundle. You have now command-R for compiling and command-U for upload. Just as in the Arduino IDE.
  • I upgraded an old Arduino Extreme V2 (atmega8 board) to auto-reset itself from the serial port, just like Diecimila boards can. It's very easy but usefull and described in the makefile.

But there are also some things that need additional work and thoughts:
  • As I compile and "preprocess" (this word is really to much for what happens in the makefile smiley the .pde into a .cpp file, errors that arouse from compiling do refer to that new file. So if you click on an error in the nice Textmate info window, you will be redirected to this file, instead of your .pde file, where you actually wan't to code.
  • The Textmate info windows show output of compiling and uploading only at the end of each process. It would be nice to see everything right when it happens...
  • I couldn't test to include additional .c files. Should it be enough to have .h header files included at the top in the .pde (just like in the Arduino IDE)? Or does the makefile need extra knowledge. Probably putting the extra .c files in $SRC?
  • things I missed so far...

Here's the makefile and the extended TextMate Bundle:

I hope some find this usefull. I enjoy using it! :-) Esp. with auto-reset, the programming is so amazing fast.

Regarding TextMate shortcut keys: Besides CMD-U and CMD-R remember CMD-W to close the compile and upload info windows. Also CMD-< and CMD-> is handy to cycle between all open TextMate windows.

13  Forum 2005-2010 (read only) / Development / Re: Arduino bundle for TextMate on: August 27, 2007, 06:44:32 pm
When working on pure avr-gcc projects (off arduino goodness), I simply hit Comand-R (r like in run) and textmate starts executing the makefile which is living in the same folder.
David once also released a makfile for arduino! See
EDIT: @xSmurf: oops! I just see you allready found the makfile... I missed your edit in the second post. I leave the link here as a reference.

But somewhere on the forum I think I've read, the arduino makefile is now somehow out of date ....
I haven't tested it since the 0007 release. I only know that within the current arduino IDE there's no  makefile beeing used besides java to compile everything.

a comandline preprocessing java for arduino code would be gorgeous. Could you still keep the actuall compiling step in a makefile? I think it's a nice standard.
As everything is still avr-gcc/libc compatible so far, it would be just convenient to stay compatible with a  standardised compiling scheme. Have you heard of It looks like they try to avoid plattform specific issues like you reported with make in first arduino releases.

A textmate bundle could just issue the java preprocessing comand with a dedicated preferences.txt and then start (c)make...


last edited: [timestamp=1188259247]
14  Forum 2005-2010 (read only) / Deutsch / Re: Der Arduino interessiert kein Schwein on: August 04, 2009, 09:19:11 am
Hm, das deutsche Bastler eher konservativ sind und daher evtl. nicht so schnell auf Arduino anspringen, kann ich mir schon vorstellen...

Allerdings gibt es das deutsche Forum hier noch garnicht so lange wie das französische oder spanische! Da darf man sich durch die absolute Anzahl an Posts nicht blenden lassen... :-)
15  Forum 2005-2010 (read only) / Troubleshooting / Re: ArduinoBT setup on: August 29, 2007, 10:40:02 am
Here it works, on OS X, intel, and with Arduino 0009.
I think the timing is more tight. I allways press reset on the board just after I pressed the upload button.

Regarding services: My Mac also doesn't discover a service. But after pairing I have the new serial device "/dev/cu.ARDUINOBT-BluetoothSeri-1". That's all what's needed for the Arduino IDE. In the Bluetooth preference panel you can see the connection state of "ARDUINOBT" under "Devices". It must be alive i.e. "yes". The link itself is only active during an actual transmission. You can also check this. "Connection active" should switch from "no" to "yes" during an upload or any serial monitor action.

The LEDs on ArduinoBT only show the power state. If you want to know if the Board is really alive you can put an LED between digital pin 13 and GND (the shorter LED wire goes there).
After a reset this LED flashes quickly three times. This shows you that the Boatloader is working and waiting for an upload.

Hope this helps,
Pages: [1] 2 3 ... 5