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 ?

736 次查看
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 回复

611 次查看
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 项奖励
回复