Author Topic: AVR Studios, its about time  (Read 3228 times)

0 Members and 1 Guest are viewing this topic.

Offline Silver_79Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
AVR Studios, its about time
« on: July 30, 2009, 10:15:35 AM »
Hi all, OK I finally got through the ARV tutorial for the Axon and it built without crashing Vista. There was however one error when it completed that I have listed below:


Warning-timer640.c:355: warning: 'BAD_vect' appears to be a misspelled signal

Will this be a problem when I upload to the robot ? Will it run as intended ? Or is my robot going to try to kill my cat ? :P
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I–
I took the one less traveled by,
And that has made all the difference.

-Robert Lee Frost-

Offline sonictj

  • Supreme Robot
  • *****
  • Posts: 416
  • Helpful? 11
    • Tim's Workshop
Re: AVR Studios, its about time
« Reply #1 on: July 30, 2009, 10:48:02 AM »
I'd be willing to bet it should be BADISR_vect .

Offline wil.hamilton

  • Robot Overlord
  • ****
  • Posts: 207
  • Helpful? 6
  • rtfm
Re: AVR Studios, its about time
« Reply #2 on: July 30, 2009, 10:56:06 AM »
just google the warning and see if the results are similar for things like what you're trying to do
use the google.  it's your friend.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: AVR Studios, its about time
« Reply #3 on: August 03, 2009, 02:34:27 PM »
I honestly don't know what that warning is, but it hasn't caused me any problems yet! :P

It'll only give you that warning when you do a rebuild-all.

Offline sonictj

  • Supreme Robot
  • *****
  • Posts: 416
  • Helpful? 11
    • Tim's Workshop
Re: AVR Studios, its about time
« Reply #4 on: August 05, 2009, 12:45:25 AM »
quote from avrlibc
Quote
Catch-all interrupt vector

If an unexpected interrupt occurs (interrupt is enabled and no handler is installed, which usually indicates a bug), then the default action is to reset the device by jumping to the reset vector. You can override this by supplying a function named BADISR_vect which should be defined with ISR() as such. (The name BADISR_vect is actually an alias for __vector_default. The latter must be used inside assembly code in case <avr/interrupt.h> is not included.)

#include <avr/interrupt.h>

ISR(BADISR_vect)
{
    // user code here
}


I checked the code it should be BADISR_vect, BAD_vect is not an interrupt vector.

The moral of the story is you won't have any problems unless you enable an interrupt without the proper ISR vector.  The BADISR_vect will catch a bat interrupt call.  Unless you write interrupt code you won't notice any problems.  Thats why everything still works ;D.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: AVR Studios, its about time
« Reply #5 on: August 05, 2009, 07:47:55 AM »
good investigative work! I just tried it, and the prob went away.

I'll fix the BADISR_vect issue tonight and upload the corrected code as v1.09.


For now, just open up timer640.c, go to the very bottom of the page, and change BAD_vect to BADISR_vect.

 

SMF spam blocked by CleanTalk