MQX did not start when printf in CPP constructor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX did not start when printf in CPP constructor

684 Views
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 Kudos
1 Reply

584 Views
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 Kudos