Split from: Empty program and RAM in simulator

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

Hello, I am new on this Board and I hope it's the right way to ask you.

 

I have a Problem with simulating programms in Atmel Studio 7,

a few days before it ran correctly, but after some Updates i have Problems with viewing the SRAM Memory (see screenshot below).

The data Iram is correctly adressed, but there are only "??".

I already have installed Studio once again, but it's not working.

 

 

Last Edited: Thu. Jun 8, 2017 - 01:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which chip are you using and which version of AS7? Never used IRAM, just normal RAM window.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I can't easily look it up but does internal RAM start at 0060 or 0100 in Tiny2313?

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

Questionmarks in the Memory Window means that you're reading outside any segment that is declared in the device descriptor (atdf file).

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

Just looked up datasheet so RAM in 2313 *should* start at 0060. Does that mean the ATDF is wrong?

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

Sounds like it ... :) I'll have to check (questionmarks can also come if the read request fails, but that usually also means that the ATDF is wrong...)

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

OK, I'll bite -- what piece of evidence led you gurus to conclude '2313 of some flavour?

 

But indeed, a quick test program showed values starting at 0x150...

 

 

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.

Last Edited: Thu. Jun 8, 2017 - 01:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Both Stefan and I replied to your post Lee but then someone split the thread and our two posts have been left behind in the original.

 

As we said there it was in the screen shot he posted. It shows he's using ATtiny2313 in the Simulator.

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

clawson wrote:

I can't easily look it up but does internal RAM start at 0060 or 0100 in Tiny2313?

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

clawson wrote:
our two posts have been left behind in the original

http://www.avrfreaks.net/comment...

 

http://www.avrfreaks.net/comment...

 

Shame that the forum doesn't automatically add links to show where a split went to & came from...

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

It shows he's using ATtiny2313 in the Simulator.

Ok It is still there in the 1st page blush didn't see that before.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I'm sorry, but I only have some Time at evening to work with.

1st. the Version of Atmel Studio:

 

Atmel Studio 7 (Version: 7.0.1417 - )
© 2015 Atmel Corp.
All rights reserved.

OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
Platform: Win32NT

 

The Chip I'm using is a Tiny2313 and there is 128 Bytes SRAM on (beginning) Adress 0x60

 

Once I start the Debugging I have found following :

looking for the 'ZZZZZ' every step (F11) in Simulator takes the Memory away to another place.

The two screenshots are only one Step apart. Why walkes the area?

 

Sorry for my bad english.

 

Last Edited: Thu. Jun 8, 2017 - 09:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please post your code using the <> button above if you want someone to try things out.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

It's only a test-Project, but the same Problem.

 

Code:

;
; djpetka.asm
;

; Replace with your application code
start:
	lds r16, test
	inc r16
	sts test, r16

	ldi r17, 'Z'
	sts ram1, r17
	sts ram2, r17
	sts ram3, r17
	sts ram4, r17
	sts ram5, r17
rjmp start

.dseg
	test: .byte 1
	ram1: .byte 1
	ram2: .byte 1
	ram3: .byte 1
	ram4: .byte 1
	ram5: .byte 1

 

Last Edited: Thu. Jun 8, 2017 - 10:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I meant you need to use the <> BUTTON not characters when posting code, it's next to the Omega sign. I'll clean it up for you in a minute.

 

so it works ok here

 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Thu. Jun 8, 2017 - 10:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The ATDF looks correct at least

<memory-segment name="IRAM" start="0x0060" size="0x0080" type="ram" external="false"/>

 

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

The issue there almost looks like the DSEG location counter in the assembler was wrong (random) ?!?

 

(thought it's true that does not explain question marks where you might expect RAM locations to be displayed).

 

Can the Atmel assembler produce a listing? It would be interesting to see what locations "test", "ram1", etc. have actually resolved to be.

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

It is not comprehensibly for me, wich Location is used for each cycle or step.

 

I have deleted all parts of Atmel Studio (also the Regedit-Parts)

Then installed a older Version. Now it runs nice again!

 

I will test some Update in the next time, to see if same error occures again.

 

Thanks for your help and ideas!

 

 

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

Hi Guys and Gals!  Hope you have a great new year!

 

Does anybody know if the ?? problem was solved; either EEPROM or IRAM. Have this issue with Studio 7 still. I have done all the updates I can find with no luck.

Seems to work fine as is with Studio 4.

Thanks!

Todh