always breaks in Disassembler

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

I got started by writing a small program on a Mega48 that increments a byte received on the UART by 1 and then send it back.

I run it using debugwire and 90% of the time when I press the stop button in AVRstudio (ver 4.10 b356), it opens a disassembler window like the following instead of the C file from where I started the debugging.

Why does it not stop in the C file and how can I fix it? Any suggestions please?
Does the line ---- No Source --- have anything to do with it?
I did a couple of searches through the forums but found nothing related.

213: val[0]++;
+00000624: 818A LDD R24,Y+2 Load indirect with displacement
+00000625: 5F8F SUBI R24,0xFF Subtract immediate
+00000626: 838A STD Y+2,R24 Store indirect with displacement
216: tmp = Uart0Put(val, 1);
+00000627: E061 LDI R22,0x01 Load immediate
---- No Source ------------------------------------------------------------------------------------
+00000628: 01C8 MOVW R24,R16 Copy register pair
+00000629: DBFC RCALL PC-0x0403 Relative call subroutine
+0000062A: 8389 STD Y+1,R24 Store indirect with displacement
<<<<<< cursor position when I pressed stop >>>>>>>>>
+0000062B: DBC1 RCALL PC-0x043E Relative call subroutine
+0000062C: 2388 TST R24 Test for Zero or Minus
+0000062D: F779 BRNE PC-0x10 Branch if not equal
+0000062E: CFFC RJMP PC-0x0003 Relative jump
@0000062F: Letext
+0000062F: E2A1 LDI R26,0x21 Load immediate
+00000630: 2E1A MOV R1,R26 Copy register
+00000631: 1BAA SUB R26,R26 Subtract without carry
+00000632: 1BBB SUB R27,R27 Subtract without carry
+00000633: 01FD MOVW R30,R26 Copy register pair

Here's the main() function:
int main(void)
{
volatile INT8U tmp, val[3];

tmp = AllInit();
while(1)
{
while(Uart0GetSize())
{
tmp = Uart0Get(val, 1);
val[0]++;
tmp = Uart0Put(val, 1);
}
}
return(0);

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

Well...I'm sure glad to hear this :D It will make me feel at home when I eventually start to use debugwire. It will be just like using the ICE200 all over again :(

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

So are you saying that this is what I can expect from Atmel tools and I should get used to it?

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

Let's say that they have a few teething problems (like other companies).
But don't be discouraged they only last for a short time...well untill the tool becomes obsolete and you are forced to buy another one :D ... then you can start with brand new teething problems...all over again.
Well pretty much like the M$ way...I'm still waiting for my Windows version 1 to get fixed... had to buy a few new versions in between.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly