Hi,
I've got a bit of a problem... I run arduino 0017 on my Mac and I wrote a (long) program with several libraries included. It fits on Atmega168 perfectly (12,5kB ) but I need 5 more kB and I wanted to use atmega328 (tryed to compile "original 12,5kB code), but it went OK with all boards but with ones using 328. It returns an error:
In function 'char s_write_byte(unsigned char)':
error: 'PB1' was not declared in this scope In function 'unsigned char s_read_byte(unsigned char)':
In function 'void s_transstart()':
In function 'void s_connectionreset()':
Any idea what is different if I use other processor?
There is an issue with the short form port/pin names (e.g. PB1) not being defined within the AVR AtMega328 header files.
The solution is to change "PB1" in the source to "PORTB1". This is just a longer form name for the same constant and will work for all the AtMega based Arduino's.
The one coming with arduino-17 on windows and mac only has this:
#if defined(PB0)
# define PORTB0 PB0
#endif
Up to date version of the toolchain have it fixed, so on linux this may work, depending on the version of avr-libc. Hopefully this will be fixed in 018.