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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

667件の閲覧回数
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 件の賞賛
返信
1 返信

542件の閲覧回数
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 件の賞賛
返信