CodeWarrior 4.5 for HCS12:long variables in printf

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CodeWarrior 4.5 for HCS12:long variables in printf

跳至解决方案
1,972 次查看
eddie
Contributor I
Using CodeWarrior 4.5 for HCS12(MC9S12NE64).
Does printf support long 32 bit variables?Don't seem
to be able to make it work.Any help would be appreciated.
Eddie
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,075 次查看
CompilerGuru
NXP Employee
NXP Employee
yes, it does support it, but make sure you have enough stack space defined.
Also consider that printf is both large in flash and in stack usage, using something more specifically tuned for your purpose may safe memory, but if space (RAM/FLASH) is not an issue, (s)printf does work for longs.

Daniel

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,076 次查看
CompilerGuru
NXP Employee
NXP Employee
yes, it does support it, but make sure you have enough stack space defined.
Also consider that printf is both large in flash and in stack usage, using something more specifically tuned for your purpose may safe memory, but if space (RAM/FLASH) is not an issue, (s)printf does work for longs.

Daniel
0 项奖励
回复