Support the division of long long variables in CodeWarrior for MPC5xxx v2.10 ?

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

Support the division of long long variables in CodeWarrior for MPC5xxx v2.10 ?

635 Views
xianggan
Contributor I


The code that compiles MPC5554 with codewarrior2.10 does not support the division of long long variables.

Long long a = 10;

Long long b = 3;

Long long c = a/b;

error at compile time -  __div2i is not defined.

How should I do it?

0 Kudos
1 Reply

510 Views
stanish
NXP Employee
NXP Employee

Hi,

Since mpc5554 is 32bit MCU there is no hardware instruction for long long division.

Therefore compiler uses routines emulated by software. Long long routines are part of Runtime library (e.g. Runtime.PPCEABI.E.UC.a)

Please make sure this library is included in your project.

pastedImage_1.png

Hope it helps.

Stan

0 Kudos