ATtiny45 TinyDebugSerial wont compile

I'm having a compiling issue with TinyDebugSerial

I have searched the forums but can't seem to find the answer (this was the closest, http://arduino.cc/forum/index.php/topic,123388.0.html)

I can get the SoftwareSerial working fine but I can't get TinyDebugSerial to compile.

The error is
tiny_serial:5: error: 'TinyDebugSerial' does not name a type
tiny_serial.cpp: In function 'void setup()':
tiny_serial:9: error: 'mySerial' was not declared in this scope
tiny_serial.cpp: In function 'void loop()':
tiny_serial:15: error: 'mySerial' was not declared in this scope
tiny_serial.cpp: At global scope:
tiny_serial:20: error: function definition does not declare parameters

I have the arduino tiny library installed under hardware and TinyDebugSerial.h is in there
I'm convinced this an error on my MAC rather than an arduino issue.

Can anyone confirm if this compiles please.

The code is this.

#include <TinyDebugSerial.h>
// Definitions
#define rxPin 2
#define txPin 0

TinyDebugSerial mySerial = TinyDebugSerial();

void setup()
{
mySerial.begin(9600);
}
void loop()
{
mySerial.print("test");
delay(1000);
}

If you use this core:

Google Code Archive - Long-term storage for Google Code Project Hosting. the TinyDebugSerial is part of the core.

Example

void setup() {                
Serial.begin(9600);
}

void loop() {
 Serial.println(" Loop\n");
}

You can use baud rates 9600, 38400 and 115200

The TX pin is PB3

Another possibility, is to use TinyISP. This is much easyer, because you don't have to swap connections from programmer to serial/usb connectors.

http://arduino.cc/forum/index.php/topic,123388.30.html

Erni

As always thanks for the response.

I found the issue and this may be useful to others.
When I extracted the Google Code Archive - Long-term storage for Google Code Project Hosting. I created the directory "hardware" and copied the folder into it and closed and reopened Arduino.
The problem was MAC OSX created a folder called "arduino-tiny-0100-0015" with the Tiny library sat inside (folder name is the zip name)

e.g
hardware/arduino-tiny-0100-0015/arduino-tiny/tiny etc....

However when I restarted and checked under Tools>Board none of the Tiny Library boards where there.
So I dropped the Library down one level
e.g
hardware/arduino-tiny/tiny etc....

Restarted and now it all works fine.

I assume there is some limit on the amount of directories before Arduino stops looking?

Also for those who get garbled text when they get this working I haven't been able to get any of my Uno or Due boards to display clear text so i have just hooked up and FTDI (USB to Serial board) and it works fine.

Has anybody else had success using the Uno board (pin0) as the RS232 interface?

Enri

Again thanks for the prompt in the right direction.

123tcpip:
Has anybody else had success using the Uno board (pin0) as the RS232 TTL-serial interface?

Yes but, if you use an Arduino as the programmer, there is an easier way. Start reading about here...

Coding Badly

Thanks for the reply & this look likes the ideal solution.

I had a read then downloaded the master and dropped it into the library as TinyISP (MAC OSX IDE 1.01)
If I compile I get a lot of errors, before I continue I assume it works with 1.01?

TinyISP/KnockBangParser.cpp.o: In function TinyDebugKnockBangParserClass::process()': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/KnockBangParser.cpp:51: multiple definition of TinyDebugKnockBangParserClass::process()'
KnockBangParser.cpp.o:KnockBangParser.cpp:51: first defined here
TinyISP/KnockBangParser.cpp.o:/Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/KnockBangParser.cpp:51: multiple definition of TinyDebugParser' KnockBangParser.cpp.o:KnockBangParser.cpp:51: first defined here TinyISP/TinyISP_AispLED.cpp.o: In function AispLEDClass::setMode(AispLEDClass::mode_t)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_AispLED.cpp:94: multiple definition of AispLEDClass::setMode(AispLEDClass::mode_t)' TinyISP_AispLED.cpp.o:TinyISP_AispLED.cpp:94: first defined here TinyISP/TinyISP_AispLED.cpp.o: In function AispLEDClass::update()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_AispLED.cpp:108: multiple definition of AispLEDClass::update()' TinyISP_AispLED.cpp.o:TinyISP_AispLED.cpp:108: first defined here TinyISP/TinyISP_AispLED.cpp.o: In function AispLEDClass::flash()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_AispLED.cpp:77: multiple definition of AispLEDClass::flash()' TinyISP_AispLED.cpp.o:TinyISP_AispLED.cpp:77: first defined here TinyISP/TinyISP_AispLED.cpp.o: In function AispLEDClass::error()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_AispLED.cpp:66: multiple definition of AispLEDClass::error()' TinyISP_AispLED.cpp.o:TinyISP_AispLED.cpp:66: first defined here TinyISP/TinyISP_AispLED.cpp.o: In function AispLEDClass::begin(unsigned char)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_AispLED.cpp:53: multiple definition of AispLEDClass::begin(unsigned char)' TinyISP_AispLED.cpp.o:TinyISP_AispLED.cpp:53: first defined here TinyISP/TinyISP_AispLED.cpp.o:/Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_AispLED.cpp:94: multiple definition of StatusIndicator'
TinyISP_AispLED.cpp.o:TinyISP_AispLED.cpp:94: first defined here
TinyISP/TinyISP_Monitor.cpp.o: In function monitor_run(unsigned char&)': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_Monitor.cpp:123: multiple definition of monitor_run(unsigned char&)'
TinyISP_Monitor.cpp.o:TinyISP_Monitor.cpp:123: first defined here
TinyISP/TinyISP_Programmer.cpp.o: In function programmer_toggle_hold_in_reset()': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_Programmer.cpp:820: multiple definition of programmer_toggle_hold_in_reset()'
TinyISP_Programmer.cpp.o:TinyISP_Programmer.cpp:820: first defined here
TinyISP/TinyISP_Programmer.cpp.o: In function programmer_error_occurred()': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_Programmer.cpp:857: multiple definition of programmer_error_occurred()'
TinyISP_Programmer.cpp.o:TinyISP_Programmer.cpp:857: first defined here
TinyISP/TinyISP_Programmer.cpp.o: In function programmer_release_target_from_reset()': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_Programmer.cpp:829: multiple definition of programmer_release_target_from_reset()'
TinyISP_Programmer.cpp.o:TinyISP_Programmer.cpp:829: first defined here
TinyISP/TinyISP_Programmer.cpp.o: In function programmer_hold_target_in_reset()': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_Programmer.cpp:852: multiple definition of programmer_hold_target_in_reset()'
TinyISP_Programmer.cpp.o:TinyISP_Programmer.cpp:852: first defined here
TinyISP/TinyISP_Programmer.cpp.o: In function programmer_reset_target()': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_Programmer.cpp:834: multiple definition of programmer_reset_target()'
TinyISP_Programmer.cpp.o:TinyISP_Programmer.cpp:834: first defined here
TinyISP/TinyISP_Programmer.cpp.o: In function programmer_toggle_hold_in_reset()': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_Programmer.cpp:820: multiple definition of param'
TinyISP_Programmer.cpp.o:TinyISP_Programmer.cpp:820: first defined here
TinyISP/TinyISP_Programmer.cpp.o: In function programmer_process_command(unsigned char)': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_Programmer.cpp:689: multiple definition of programmer_process_command(unsigned char)'
TinyISP_Programmer.cpp.o:TinyISP_Programmer.cpp:689: first defined here
TinyISP/TinyISP_Programmer.cpp.o: In function programmer_toggle_hold_in_reset()': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_Programmer.cpp:820: multiple definition of programmer_active'
TinyISP_Programmer.cpp.o:TinyISP_Programmer.cpp:820: first defined here
TinyISP/TinyISP_SPI.cpp.o: In function spi_begin()': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_SPI.cpp:67: multiple definition of spi_begin()'
TinyISP_SPI.cpp.o:TinyISP_SPI.cpp:67: first defined here
TinyISP/TinyISP_SPI.cpp.o: In function spi_end()': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_SPI.cpp:102: multiple definition of spi_end()'
TinyISP_SPI.cpp.o:TinyISP_SPI.cpp:102: first defined here
TinyISP/TinyISP_SPI.cpp.o: In function spi_send': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_SPI.cpp:120: multiple definition of spi_transaction(unsigned char, unsigned char, unsigned char, unsigned char)'
TinyISP_SPI.cpp.o:TinyISP_SPI.cpp:120: first defined here
TinyISP/TinyISP_SPI.cpp.o: In function spi_transaction2(unsigned long)': /Applications/Arduino.app/Contents/Resources/Java/libraries/TinyISP/TinyISP_SPI.cpp:183: multiple definition of spi_transaction2(unsigned long)'
TinyISP_SPI.cpp.o:TinyISP_SPI.cpp:183: first defined here

123tcpip:
I had a read then downloaded the master and dropped it into the library as TinyISP (MAC OSX IDE 1.01)

It's a sketch not a library. Move it up one directory level (move it to the sketchbook directory).

If I compile I get a lot of errors, before I continue I assume it works with 1.01?

Yes (just verified).

Erni:
If you use this core:

Google Code Archive - Long-term storage for Google Code Project Hosting. the TinyDebugSerial is part of the core.

Are there any instructions for installing that core? I couldn't find any.

Are there any instructions for installing that core?

Yes, it is in the readme.txt file

Coding Badly

FYI I moved the sketch and it compiled OK, Thanks.
Also the README is Zero Byte

123tcpip:
FYI I moved the sketch and it compiled OK, Thanks.

Excellent. You are welcome.

Also the README is Zero Byte

Thank you for letting me know about the possible problem.

I have not taken the time to compose a README and Github requires one.

I did find a readme file after more searching, it was in one of the subdirectories of the zip. I was expecting to find documentation on the github page or in the root directory of the zip, which is why I didn't find it initially. However, after trying another attiny core (from MIT I think) and being alarmed by the compiler warnings that it evoked, I decided to use AVR Studio 6 instead. I didn't want unnecessary port drivers cluttering up the memory anyway, so I think this was a good choice for me.

Coding Badly

The Sketch works perfectly, this will certainly save some time.

Thanks for the great work.

Rob

123tcpip:
The Sketch works perfectly, this will certainly save some time.

Excellent.

If you like Tiny Debug Serial + Serial Relay you'll really like Knock-Bang! All the benefits of Serial, faster more reliable communications, less Flash, and uses a pin already connected to the Uno. It's actually small enough to be useful with the ATtiny13 processor.

Thanks for the great work.

Thanks!