Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: [AVR-Chat] Studio problem, "invalid opcode"

Re: [AVR-Chat] Studio problem, "invalid opcode"

2007-06-18 by John Samperi

At 12:05 PM 18/06/2007, you wrote:
>Any call I make AFTER the SEI, ends up in this wierd place.
>That means that it's almost certainly an ISR that's vectored to the
>wrong place, but it's not jumping to the interrupt vectors

You are using JMP and NOT RJMPs in the vectors I hope.


Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.9.0/852 - Release Date: 17/06/2007 8:23 AM

Re: [AVR-Chat] Studio problem, "invalid opcode"

2007-06-18 by David VanHorn

On 6/17/07, John Samperi <samperi@ampertronics.com.au> wrote:
> At 12:05 PM 18/06/2007, you wrote:
> >Any call I make AFTER the SEI, ends up in this wierd place.
> >That means that it's almost certainly an ISR that's vectored to the
> >wrong place, but it's not jumping to the interrupt vectors
>
> You are using JMP and NOT RJMPs in the vectors I hope.

Correct.

I've been playing with this some more..

nop
nop
nop
... (more nops)

in  temp,sreg
ori temp,$80
out sreg,temp

nop
nop
....
nop

Now in the above code, if I manually set the GIE bit in SREG at the
first nop, a few instructions later, it does a jump to $00F020!

If I let it set the bit using the code above, it does the same thing,
just at a different point.

I just can't turn on interrupts!
Worse, there isn't any int that should vector to $00F020, that I'm aware of.

Re: [AVR-Chat] Studio problem, "invalid opcode"

2007-06-18 by David VanHorn

Interesting!

It appears to be a problem with the boot vector select.
I never turned on the boot vector, I haven't even done an app with a
boot loader yet, but it's apparently on by default.  Someone correct
me if I'm wrong, but AFAIK that should NOT be.

If I manually click IVCE, and on the next instruction click IVSEL,
then that allows normal execution.  It was jumping to the T0 overflow
vector of the boot loader ISR table that dosen't exist!

Grr.. I bet they never tested this against an app that didn't have a bootloader.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.