MQX did not start when printf in CPP constructor

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

MQX did not start when printf in CPP constructor

1,132件の閲覧回数
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 返信

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