Link Error: L1822: Symbol TO1_Disable in file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Link Error: L1822: Symbol TO1_Disable in file

4,107 Views
FordFairlaneBen
Contributor I
Hello:
I´m ussing a MC9S08AW16. I have created a bean called TO1 which is a TimerOutBean. I have selected the methods Enable, Unable and SetValue and I add this methods to my code in the next way:
 
#define BEEP_ON         TO1_Enable()
#define BEEP_OFF        TO1_Disable()
 
Then I use this macros in the next way:
 

void ResetBeepX(void)
{
 TiempoON=0;
 TiempoOFF=0;
 NumeroBeeps=0;
 TimeoutBeep=0;
 Beep.BYTE=0;
 BEEP_OFF;
}
 
When I compile I receive this message:
 
Link Error   : L1822: Symbol TO1_Disable in file C:\proyecto\teka\KAG\KAG 6300\software\KAG6300_Data\Standard\ObjectCode\beep.C.o is undefined

Link Error   : L1822: Symbol TO1_Enable in file C:\proyecto\teka\KAG\KAG 6300\software\KAG6300_Data\Standard\ObjectCode\beep.C.o is undefined

Link Error   : Link failed
 
What are the causes than can yield this problem?
Please, I need help because I have spent lot of time and I can solve this problem.
Thanks a lot
Labels (1)
0 Kudos
Reply
5 Replies

1,184 Views
CrasyCat
Specialist III
Hello

According to the messages you are getting you are referencing symbols called TO1_Disable and TO1_Enable in file beep.C.

You need to provide a definition for these symbols or remove the references if you do not need them.

I do not have enough information to investigate further than that.

CrasyCat
0 Kudos
Reply

1,184 Views
alex_spotw
Contributor III
Hi:

You need to explicitly indicate Processor Expert to generate the _Enable and Disable methods for your bean. In the Processor Expert tab (left hand) double click in the TI0 bean. A list of all methods appear. The ones with a red X cross won't be generated. The ones with a green check mark will be generated. Simply double click the Enable and Disable methods and they will be generated.

You will need to run full code generation again, though.

Regards,

Alex.
0 Kudos
Reply

1,184 Views
CrasyCat
Specialist III
This is not related to the original thread. Creating a new thread for the new question.
0 Kudos
Reply

1,184 Views
Alban
Senior Contributor II

Hello,

These errors mean you did not declare the functions TO1_ ...
You need to include the file where these functions are declared.
And at the start of this file, you need to declare the prototype of these functions starting with "extern" to explain they are declared somewhere else and are not a new object.

Code:

extern void TO1_Enable(void);


 
Hope this helps,
Alban.

0 Kudos
Reply

1,184 Views
FordFairlaneBen
Contributor I

Hello again:

I have tried what you explain but I am getting the same error. I don´t know what it´s happening but I´m becoming crazy. For more information I have to say that when I add the bean to my proyect,  draging and droping, it seems that methods Enable and Disable aren´t  recognized because they don´t appear in light blue, they remain in black.

Thanks a lot.

0 Kudos
Reply