Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Quasi-Random Jumps of AVR ASM Debugger’s Cursor

2 posters

Go down  Message [Page 1 of 1]

KerimF

KerimF

SimulIDE_1.0.1-R1386_Win32, on Windows 7

I wonder if it is normal (I mean it doesn't need to be fixed) that, during debugging step by step an AVR assembly code (for ATmega8, for example), the cursor continues to the next instruction but, sometimes, not necessarily the one written on the following line. It jumps instead to another line on which there is a similar instruction. Fortunately, after an unexpected big jump, the cursor returns back and continues from where it was.

Wish you all a Happy New Year and a Merry Christmas to those who will celebrate it soon.
Kerim

arcachofo

arcachofo

I wonder if it is normal (I mean it doesn't need to be fixed) that, during debugging step by step an AVR assembly code (for ATmega8, for example), the cursor continues to the next instruction but, sometimes, not necessarily the one written on the following line. It jumps instead to another line on which there is a similar instruction. Fortunately, after an unexpected big jump, the cursor returns back and continues from where it was.
Does not seem normal to me and should be fixed.

Can you share the files? (all the files including lst file)
Or at least the copy/paste here a few lines around the problematic lines in lst file.

KerimF

KerimF

arcachofo wrote:
I wonder if it is normal (I mean it doesn't need to be fixed) that, during debugging step by step an AVR assembly code (for ATmega8, for example), the cursor continues to the next instruction but, sometimes, not necessarily the one written on the following line. It jumps instead to another line on which there is a similar instruction. Fortunately, after an unexpected big jump, the cursor returns back and continues from where it was.
Does not seem normal to me and should be fixed.

Can you share the files? (all the files including lst file)
Or at least the copy/paste here a few lines around the problematic lines in lst file.

Ok, I will try to clean the code first as possible to make the files small enough for attachment.

KerimF

KerimF

After I removed all comment lines and the instructions defined for other cases, the cursor run properly, no more jumps.

The size of the original source is 165,736 bytes; of the cleaned one is 71,880 bytes. And both simulate the circuit the same way.
So, it is not clear what lets the debugger cursor jumps when I run the original big code.

Since I don’t mind uploading anything I have, I removed just the old comment lines and re-test the code.

On your side, try for example to set breakpoints at line 2334 to 2338. On my side, the lines 2334 and 2335 are skipped by the debugger. And from line 2338, the cursor jumps to 3077-3082 (supposed undefined) then returns to 2346... This is just one example. You may find some others.

Quasi-Random Jumps of AVR ASM Debugger’s Cursor Avdc5-10
Attachments
Quasi-Random Jumps of AVR ASM Debugger’s Cursor AttachmentAV5-14-3g.zip
You don't have permission to download attachments.
(27 Kb) Downloaded 3 times
Quasi-Random Jumps of AVR ASM Debugger’s Cursor AttachmentAV5-14-3g_lst.zip
You don't have permission to download attachments.
(36 Kb) Downloaded 3 times
Quasi-Random Jumps of AVR ASM Debugger’s Cursor AttachmentAVDC5-14.zip
You don't have permission to download attachments.
(2 Kb) Downloaded 3 times

arcachofo

arcachofo

Do I need to do something in the circuit to reach line 2334?
If I just start the debugger it never reaches it:
Here
2330    SBRS  B1newAmp
2331    RJMP  VLT2seg

it always jumps to VLT2seg

EDIT: Ok I got it just playing with the voltages.

arcachofo

arcachofo

After I removed all comment lines and the instructions defined for other cases, the cursor run properly, no more jumps.
Well... you found the issue.
By now Simulide debugger does not support conditional compiling, at least not for this compiler (assembler).

KerimF

KerimF

arcachofo wrote:
After I removed all comment lines and the instructions defined for other cases, the cursor run properly, no more jumps.
Well... you found the issue.
By now Simulide debugger does not support conditional compiling, at least not for this compiler (assembler).

Thank you for confirming the issue.

Now, I just need to remember it before debugging.
Some of the boards, I design, could accept different codes for different applications. So, I simply combine them in one code only by using the directives of conditional compiling.

KerimF

KerimF

arcachofo wrote:
EDIT: Ok I got it just playing with the voltages.

Sorry, I forgot to also tell you that the code uses the attached circuit. And the two voltage sources (1.53V and 1.48V) in it need to be activated (instead of being at 0V). Otherwise, the code stays in the boot mode showing, repeatedly, the maximum charging voltage, 14V5 default, and current 20A default (each could be set by the user).

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum