!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