Compiling Issues w/ Error Message

Hi! When I first open the Arduino IDE, I get this error message:

as: unrecognized option '-mmcu=atmega168'

At first I ignored this, but then when I compiled the code, I got

Couldn't determine program size: avr-size: '/tmp/build3344314702811629145.tmp/fader_blink.hex': No such file

and it doesn't finish compiling.

I'm on Kubuntu 8.10, using IDE version 0015 (I upgraded from 0012 in case that was the issue), and have an Arduino Duemilanove.

This is similar to a report of the same option being rejected by gcc.

Do you have any other version of the AVR GCC tools on this host? What platform are you on? Make sure you check the environment for any GCC stuff from previous installations.

It compiles now! But when I try to upload the sketch, I get a really long string of error messages:

processing.app.SerialException: Error opening serial port '/dev/ttyUSB0'.
      at processing.app.Serial.<init>(Serial.java:142)
      at processing.app.Serial.<init>(Serial.java:72)
      at processing.app.Uploader.flushSerialBuffer(Uploader.java:66)
      at processing.app.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:73)
      at processing.app.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:48)
      at processing.app.Sketch.upload(Sketch.java:1632)
      at processing.app.Sketch.exportApplet(Sketch.java:1701)
      at processing.app.Editor$41.run(Editor.java:2004)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
      at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:171)
      at processing.app.Serial.<init>(Serial.java:132)
      ... 15 more

After some more fiddling, I got it to work! For those who have the same problem, change serial.debug_rate to 9600 (that's in preferences.txt, on Linux it's at ~/.arduino/preferences.txt) and chown-ing /dev/ttyUSB0 to my username.

Note that there are several locations for files with the name preferences.txt Make sure you modify the correct one.

Meanwhile, I continue to have the problem that I cannot build for Arduino Duemilanove with ATMEGA328. I can build for other versions. I have removed my old preferences.txt. The problem persists.

This is on Ubuntu 8.04 hardy. Arduino versions 0013 and 0015.