Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Latif
Level 1
Level 1
First question asked 25 sign-ins First like given

Hello Together.

I wrote the following code to read the CCT_Timer Capture Registers and then calculate the Duty Cycle.

When I compile this Code with ADS, I get the following Error

main.c:(.text.code.main+0x8a): error: undefined reference to `__mulint_PARM_2'

main.c:(.text.code.main+0x95): error: undefined reference to `__mulint'

main.c:(.text.code.main+0xc5): error: undefined reference to `__divulong_PARM_2'

main.c:(.text.code.main+0xda): error: undefined reference to `__divulong'

Does anyone have an Idea where this Error comes from and how can I fix it?

thanks a lot in advance!! v

void main()

{

volatile unsigned int Capture_Value_1 = 0;

volatile unsigned int Capture_Value_2 = 0;

volatile unsigned long Capture_Value_sum = 0;

volatile unsigned long temp;

volatile unsigned char Duty_Cycle = 0;

while(1)

{

Capture_Value_sum = Capture_Value_2 + Capture_Value_1;

temp = (unsigned long )((unsigned int)Capture_Value_1 * 100);

Duty_Cycle = (unsigned char) ((unsigned long)temp /Capture_Value_sum);

}

0 Likes
1 Reply
Erick_G
Moderator
Moderator
Moderator
100 sign-ins 25 solutions authored 50 replies posted

Hi @Latif,

Are you using a different compiler from the ones used by ADS?

Without the casting at Capture_Value_1 * 100 does it throw the error as well?

Best regards,

Erick

0 Likes