Debian does not seem to support SoftwareSerial library

I hve been trying to get the code on TechBitar - Home to compile using the Arduino IDE in the project detailed at The Gertboard for the Raspberry Pi | Gordons Projects.. This uses the System Programming (ISP) method to program the ATMega on the Gertboard.

It fails to comply with the following errors:
/usr/share/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp:128:2: error: #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors
/usr/share/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp: In member function ‘void SoftwareSerial::begin(long int)’:
/usr/share/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp:383:31: error: ‘table’ was not declared in this scope
/usr/share/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp: In member function ‘virtual size_t SoftwareSerial::write(uint8_t)’:
/usr/share/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp:458:26: error: ‘XMIT_START_ADJUSTMENT’ was not declared in this scope

The two SoftwareSerial example sketches also fail to compile successfully.

What makes you think the problem has anything to do with Debian?

Problems compiling Arduino programs have nothing to do with the host PC operating system.

The first of the error messages might prove a fruitful line of enquiry.

Have you studied the code in SoftwareSerial.cpp that the errors reference?

...R

impartit:
It fails to comply with the following errors:
/usr/share/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp:128:2: error: #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors

It's right there. It does not support 12MHz, as you have.

OK thanks for the replies received and as I have been informed that it has nothing to do with Debian I have looked further into the Arduino Software. The processor in question is on the Gertboard and is an ATMEGA 328P whose architecture supports up to 20MIPS. The SoftwareSerial.cpp library file contains settings for 8, 16 and 20 so I don't get it. I have checked the former NewSoftSerial.cpp and the table is configured for 8, 16 and 20 cpu's also. What clock speed is the ATMEGA 328P and what would be the required inclusions in the .cpp file? What other speed could it be?

I think I may have answered my own question in that the Gertboard ATMega328P runs at 3.3v restricting the CPU speed to 12Mhz.
Could I therefore add a new entry into the SoftwareSerial.cpp file for this cpu speed? The existing entries for 8, 16 and 20 meg cpus have entries for baud, rxcenter, rxintra, rxstop and tx for baud rates 115200 - 300 baud.

Any suggestions as to what may be required for a 12 meg cpu?

There must be a need for this for anyone using the "Gertboard" to program the ATMega328P processor and use the Debian Arduino IDE.

"Gertboard ATMega328P runs at 3.3v restricting the CPU speed to 12Mhz."

While it may not be possible or advisable to run above 12MHz at 3.3v it is NOT the voltage that sets the frequency. Can you find out what frequency it actually runs at?

Can you change the frequency down to 8MHz? - which would then match with the other settings.

...R

I have no way of checking the frequency the chip is running at and do not know how it can be changed. I think it is a hardware configuration.

The reference to the frequency being the product of the voltage is made in the Gertboard .pdf document on page 41 -

"Note that the ATmega device on the Gertboard operates at 3.3Volts. That is in contrast to the ‘Arduino’ system which runs at 5V. (This is the reason why the device does not have a 16MHz clock.In fact at 3V3 the maximum operating frequency according to the specification is just under 12MHz.)"

Seems to me it would be easier to modfiy the SoftwareSerial.cpp file and benefit from the current 12Meg speed.

I suppose they mean it is operating at 12MHz but why didn't they say so directly?

Sorry, but I haven't studied how to modify SoftwareSerial.

Be careful not to connect your 3.3v device directly to another device that outputs 5v logic.

...R