Hi,
I've tried to compile my project from command line under linux without succeeding

For my test I used an old duemilanove with the atmega168 chip.
The code I used is the following
#include <Arduino.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(3,2); // pin 2 = TX, pin 3 = RX (unused)
void setup()
{
mySerial.begin(9600); // set up serial port for 9600 baud
delay(500); // wait for display to boot up
}
void loop()
{
mySerial.write(254); // move cursor to beginning of first line
mySerial.write(128);
mySerial.write(" Hello World! ");
mySerial.write(" Hello World! ");
mySerial.write(124); // save to pic memory
mySerial.write(10);
while(1);
}
The purpose of the code (which works under the standard arduino IDE) changes the splash screen of an lcd display sold by sparkfun.
To compile the code I used avr-gcc and avr-g++ specifying "-mmcu=atmega168" and all the other options found at
this link:
http://playground.arduino.cc/Code/CmakeBuild.
Together with my file (wich I named change_splash.cpp) I compiled all the necessary *.c and *.cpp files which I found
in the version 1.0.3 of the ide. After some tweaking I managed to link everything and got the executable I named "change_splash".
After this I run the following commands:
avr-objcopy -O ihex -R .eeprom change_splash output.hex
sudo avrdude -V -c arduino -p m168 -b 19200 -P /dev/ttyUSB0 -U flash:w:output.hex
The upload worked correctly.
After uploading the arduino board doesn't run the program correctly (the display remains blank instead of showing the new splash screen).
If I use the ide to load the program the boards starts working properly again.
Since I'm new cross-compilation I'm a bit lost at this point.
Is there someone who can help me?
Thanks
Carlo