Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help!!!undefined reference to `SysTimeInit' WINAVR

Status
Not open for further replies.

LIXIAOTIAN

Newbie level 4
Joined
Nov 21, 2008
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,308

I creat a systime.c and a systime.h .
which says,
Code:
#include	"config.h"
#include    "ntrxtypes.h"
#include	"SysTime.h"




void SysTimeInit()
{
   
   TOIE0=1;                    /*定时器x开中断*/
   TCCR0=0;                    /*普通模式选择*/
   
   TCNT0=6;                    /*初值设定*/
			                  
   CS0=3;                      /*时钟源选择 启动时钟?/
}

static MyDword32T SysTime=0;

MyDword32T GetSysTime()
{                
   return SysTime;
}


   
SIGNAL(SIG_OVERFLOW0)           /*1ms中断一次*/
{ 
    TCNT0 = 6; 		            /*重设初值	*/
	;                           /*启动计数器x*/
	SysTime++;
}


AND



Code:
#include "config.h"
#include "ntrxtypes.h"
extern void SysTimeInit(void);
extern MyDword32T GetSysTime(void);


BUT when i use the function SysTimeInit() in app.c like this:


Code:
...
#include	"SysTime.h"
...
void	InitApplication(void)
{
	...
	
	SysTimeInit();
}

AND the program says
app.c:86: undefined reference to `SysTimeInit'

i think i have done all that needed , BUT WHAT IS THEN PROBLEM??
:cry::cry::cry:
 

Hi,

I've got exactly the same problem - how did you change
your makefile that the compilation went smoothly?

Cheers

//Edit: I think the problem is solved, after diving into the makefile.
I updated the section SRC adding all the sources - dependencies are
resolved automatically
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top