Pumpkin, Inc.

Pumpkin User Forums

Image craft 8 compatible?

If you're having difficulty installing Salvo, post it here.

Image craft 8 compatible?

Postby alager » Mon Jul 19, 2010 1:47 pm

I'm trying to test salvo out, but I get the following compiler error:
!ERROR {linker} file 'main.o': undefined symbol '_OSInit'
!ERROR {linker} file 'main.o': undefined symbol '_OSSched'
!ERROR {linker} file 'main.o': undefined symbol '_OSTimer'

What's missing? Here is my code (target is ATmega64a):
Code: Select all
/*
 */

#include <iccioavr.h>
#include <macros.h>
#include <salvo.h>
/************************************************************
****                                                     ****
**                                                         **
Board- and compiler-specific initilaization, etc.

**                                                         **
****                                                     ****
************************************************************/

void board_init ( void )
{
  // Timer1 init.
  TCCR0 =                           0x00;  // Stop Timer1
  TCNT0 =                           0x00;  // Clear Timer1
  OCR0 =                           0x00;  // Set Compare A to 39
  OCR1AL =                           0x26;  //  ((4MHz/1024)/39) = 10ms (9.984ms) timer
//  TIMSK1 =                    BIT(OCIE1A);  // Compare A Interrupt enable
  TCCR1B = BIT(WGM12)|BIT(CS12)|BIT(CS10);  // Start Timer1 with clk/1024
}

void board_enable_interrupt ( void )
{
  SEI();
}

/************************************************************
****                                                     ****
**                                                         **
Active ISRs.

Timer1: Interrupt happens at predefined system tick rate,
          calls OSTimer(). Since this ISR calls a Salvo
          service, it (and all other ISRs that call Salvo
          services) must be disabled by Salvo's interrupt
          hooks.

**                                                         **
****                                                     ****
************************************************************/
#pragma interrupt_handler IntVector:iv_TIMER1_CAPT IntVector:iv_TIMER1_COMPA

void IntVector(void)
{
  OSTimer();
}

void main( void ){
    board_init();
    OSInit();
    while (1) {
        OSSched();
    }
}


Thanks,
Aaron
alager
 
Posts: 2
Joined: Mon Jul 19, 2010 1:25 pm

Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron