Go Down

Topic: Arduino Tiny (Read 66384 times) previous topic - next topic

Coding Badly


dlar

Hi all,

I have a AtT4313 and want to use its inboard UART. When ever it try to upload the sketch it fails with this error:

Quote
Binary sketch size: 2350 bytes (of a 4096 byte maximum)
avrdude: ERROR: address 0x0810 out of range at line 129 of C:\Users\xxx\AppData\Local\Temp\build7553309411575013505.tmp\RX_Blink_ATT2313.cpp.hex
avrdude: write to file 'C:\Users\xxx\AppData\Local\Temp\build7553309411575013505.tmp\RX_Blink_ATT2313.cpp.hex' failed


Im trying to get a Serial LCD to display data. Here is the code:
Code: [Select]
const int CR = 13;

void setup(){
  Serial.begin(9600);
  for (int i=0; i<15; i++){
    Serial.print(CR, BYTE);
  }
}

void loop(){
}

void LCDWrite(int s) {
  Serial.print("ad");
  Serial.print(s);
  Serial.print(CR, BYTE);
}


I know the Attiny2313 only has 2048 of flash but the Attiny4313 has 4096 of flash.

I have increased the size in boards.txt.
Quote
attiny2313at1.upload.maximum_size=4096


and i have updated the core to support the Attiny4313.

Can anybody help?

Thanks

leo72

Question about SoftwareSerial support. Is there any change to have the new SoftwareSerial lib that is shipped with Arduino 1.0 works with the last Tiny core 1.0? I tried today an example but I get some errors during compilation. Or should I continue to use the old NewSoftSerial modded to work with Tiny cores?

Coding Badly


@dlar: The Tiny Core has support for the ATtiny4313.  Just use the latest version.

Coding Badly

Is there any change to have the new SoftwareSerial lib that is shipped with Arduino 1.0 works with the last Tiny core 1.0?


I don't know.  I believe the Arduino 1.0 SoftwareSerial is very very similar to the previous NewSoftSerial.  If they are similar then SoftwareSerial, like NewSoftSerial has to be modified to work on ATtiny processors.

Quote
I tried today an example but I get some errors during compilation. Or should I continue to use the old NewSoftSerial modded to work with Tiny cores?


There does not appear to be any new bug fixes and just one new feature...
http://arduiniana.org/libraries/newsoftserial/
http://code.google.com/p/arduino/issues/list?q=softwareserial

So, it looks like the best course is to continue using the modified "old" NewSoftserial.

leo72

The libraries are different. SoftwareSerial has been changed and if you download NewSoftSerial1.2 you can check that libraries don't match.
SoftwareSerial has taken the "write" method instead of "print" one, following the new trend of the Arduino IDE 1.0 but those methods conflict the some code in the tiny/cores/tiny/Print.h file.
I will try to use the "old" & modded NewSoftSerial1.2 instead of the SoftwareSerial.

leo72

#156
Feb 12, 2012, 04:21 pm Last Edit: Feb 12, 2012, 04:27 pm by leo72 Reason: 1
One question. Why did you remove the links to the old Tiny core from Google code?
Isn't it possible to download the old 0022 version?

Forget about it.... I had just to click on "deprecated downloads"  :smiley-sweat:

Osgeld

using linux mint I followed the instructions on arduinos page to install 1.0 on ubuntu, everything works fine until I hit the tiny, using the latest and greatest core I get the following

Code: [Select]
In file included from /usr/share/arduino/hardware/arduino/cores/tiny/WProgram.h:17,
                 from /usr/share/arduino/hardware/arduino/cores/tiny/Arduino.h:4,
                 from Blink.cpp:8:
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:629: error: 'TINY_DEBUG_SERIAL_REGISTER' was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:629: error: 'TINY_DEBUG_SERIAL_BIT' was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:629: error: template argument 1 is invalid
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:629: error: template argument 2 is invalid
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:629: error: invalid type in declaration before ';' token
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:630: error: 'TINY_DEBUG_SERIAL_REGISTER' was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:630: error: 'TINY_DEBUG_SERIAL_BIT' was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:630: error: template argument 1 is invalid
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:630: error: template argument 2 is invalid
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:630: error: invalid type in declaration before ';' token
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:631: error: 'TINY_DEBUG_SERIAL_REGISTER' was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:631: error: 'TINY_DEBUG_SERIAL_BIT' was not declared in this scope
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:631: error: template argument 1 is invalid
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:631: error: template argument 2 is invalid
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:631: error: invalid type in declaration before ';' token
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h: In member function 'void TinyDebugSerial::begin(long int)':
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:682: error: cannot convert 'TinyDebugSerialWriter_9600*' to 'TinyDebugSerialWriter*' in assignment
/usr/share/arduino/hardware/arduino/cores/tiny/TinyDebugSerial.h:686: error: cannot convert 'TinyDebugSerialWriter_38400*' to 'TinyDebugSerialWriter*' in assignment


while uploading a simple blink sketch ... help?
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

Coding Badly


Which board do you have selected?

Osgeld

attiny 84 @ 8 mhz
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

Coding Badly


I can't find any problems.

Quote
using the latest and greatest core


Did you get it from the Source tab, Downloads tab, or the Home tab?  Maybe one of the links is pointing to something out-of-date.

Osgeld

downloads tab

I think I figured it out, using the instructions here

http://arduino.cc/playground/Linux/Debian

under

Arduino 1.0 and Arduino UNO on Debian squeeze (6.0.3)

arduino would not work correctly, so looking back though what I did I installed arduino and arduino core from the normal repositories, which gives you version 18, then ran the above which gives you 1.0 functioning, but apparently it does not upgrade everything. I tried the version of tiny for arduino 19 and guess what, it works

least for me

so yea I have 1.0 as the IDE and apparently .18 for most of the core files ... !@*#$! linux
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

Kyrill

#162
Mar 10, 2012, 08:44 pm Last Edit: Mar 10, 2012, 08:58 pm by Kyrill Reason: 1
Hello, Coding Badly!
Huge thanks for your tiny core!

I've been playing around with a small sketch for Tiny85 (a multifunction 1-Wire slave). I'm not using real Tiny85 yet, but Proteus simulation.
I'm using Arduino v0.22.
At some point I started to get R_AVR_13_PCREL error on each compile.
Then I upgraded WinAVR according to your instructions in your post:
http://arduino.cc/forum/index.php/topic,51984.msg371307.html#msg371307
The error has gone and I accomplished everything I wanted.

Today I tried to write some code for Uno board. The code compiles without errors, but when uploading I get error:
avrdude: stk500_getsync(): not in sync: resp=0x00
I can only get rid of it after renaming the old backup "avr_old" folder back to "avr".
Does it mean, that I'll always need to use obsolete toolchain when working with Uno? Or I'm just doing someting wrong?

And 2 more questions:
- Is it possible to run Tiny85 at 16Mhz using internal oscillator and PLL as clock source?
- delay() seems not to work on Tiny85 at 8Mhz (int. osc.). (might be Proteus simulation bug, but it works ok with HLT core).

Coding Badly

Hello Kyrill,

Quote
Huge thanks for your tiny core!


You are welcome.

Quote
Does it mean, that I'll always need to use obsolete toolchain when working with Uno?


I have not had to.  I've been using the latest version of WinAVR since long before I created that post.  I use my Uno nearly everyday and have had no upload problems.

Quote
Or I'm just doing someting wrong?


Could be.  Collect verbose output from an upload attempt and post it to the forum.

Quote
- Is it possible to run Tiny85 at 16Mhz using internal oscillator and PLL as clock source?


Yes.  I think the latest version has a boards entry for it ... yup ... http://code.google.com/p/arduino-tiny/source/browse/trunk/hardware/tiny/boards.txt#131

Quote
- delay() seems not to work on Tiny85 at 8Mhz (int. osc.). (might be Proteus simulation bug, but it works ok with HLT core).


By default, the Tiny Core uses timer 1 for millis on the ATtiny85 processor whereas the HLT core uses timer 0.  Timer 1 on the ATtiny85 is unique in the AVR world.  I suspect Proteus does not simulate the timer correctly.

Kyrill

Quote
Collect verbose output from an upload attempt and post it to the forum.

I get only one red line:
avrdude: stk500_getsync(): not in sync: resp=0x00
The behaviour of board LEDs is also different. When using old toolchain, after compilation finishes the board resets, then Rx/Tx LEDs flash several times (1/2 seconds for small 2K code), then the board starts to execute code.
With new version, after compilation the board only resets and starts old code execution. The arduino environment still waits about 20 sec with status "uploading", then displays the above described single red line.
By the way, I tried to upload to a Mega1280 board, erevything works ok with both old and new version.
Quote
I think the latest version has a boards entry for it

That's cool, didn't notice version 0012 is out. Will definitely try it ASAP.
Quote
Timer 1 on the ATtiny85 is unique in the AVR world.  I suspect Proteus does not simulate the timer correctly.

OK. Thanks for clarification.

Go Up