MQX did not start when printf in CPP constructor

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

MQX did not start when printf in CPP constructor

770 次查看
danny30
Contributor I

Hello, in MQX 4.2 "C plus plus example", when I inserted printf functions in class object constructor, the code compiled fine but MQX task did not start and TAD information showed invalid. Is there any reason for this behavior ?

Thanks !

0 项奖励
回复
1 回复

670 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Adrian Mango

Existing MQX/C++ support depends on third-part toolchain startup routines. All of the supported toolchains invoke static object constructors before the main function -- which starts the MQX.  The _io_printf calls for MQX device access.


Have a great day,
Daniel

0 项奖励
回复