RAM accessing problem with Tiny9

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello

I'm using Studio5 latest Version and try to program a Tiny9.
When I define some global variables the compiler and linker will store them in RAM at location 0x0040 where the 32 bytes of RAM are located.

But when I use the simulator and debug to the following code, I wonder about the "unknown" STS instruction.

Also the instructions STD, STS, LDD are not working in simulator.

	myState = STATE_LED_ON;
00000081  LDI R24,0x04		Load immediate 
00000082  ???STS 0x0040,R24	Store direct to data space (Not supported by current part) 

Now I tried with "release" settings and test a small application on hardware.
The result looks like in simulator!
==> Code using STS, LDD, STD instructions doesn't work!

Do I have to do some settings in Studio 5 to fix that problem?

Thanks for any help in advance.
Kind regards

celico67

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Do I have to do some settings in Studio 5 to fix that problem?


It is my take that GCC support for the Tiny10 family "isn't all there". Recent threads:
https://www.avrfreaks.net/index.p...
https://www.avrfreaks.net/index.p...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Don't use current version of AVR Studio 5's built-in C compiler (AVR-GCC) to compile code for the ATtiny4/5/9/10 family or the ATtiny20/40 family. Its support for the "reduced core" AVR is currently unfinished.

Either program in assembly (using Atmel's proprietary assembler, not the GNU assembler -- the GNU assembler's support for the "reduced core" AVR is currently unfinished), or else use a commercial C compiler that advertises proper support for these families.