RTEMS Development Environment Guide
This sample application is in the following directory:
${RTEMS_ROOT}/tests/samples/cdtest/
This sample application demonstrates that RTEMS is compatible with C++ applications. It uses constructors, destructor, and I/O stream output in testing these various capabilities. The board support package responsible for this application must support a C++ environment.
This sample application uses the printf function from the RTEMS Standard C Library to output the following messages:
Hey I'M in base class constructor number 1 for 0x400010cc. Hey I'M in base class constructor number 2 for 0x400010d4. Hey I'M in derived class constructor number 3 for 0x400010d4. *** CONSTRUCTOR/DESTRUCTOR TEST *** Hey I'M in base class constructor number 4 for 0x4009ee08. Hey I'M in base class constructor number 5 for 0x4009ee10. Hey I'M in base class constructor number 6 for 0x4009ee18. Hey I'M in base class constructor number 7 for 0x4009ee20. Hey I'M in derived class constructor number 8 for 0x4009ee20. Testing a C++ I/O stream Hey I'M in derived class constructor number 8 for 0x4009ee20. Derived class - Instantiation order 8 Hey I'M in base class constructor number 7 for 0x4009ee20. Instantiation order 8 Hey I'M in base class constructor number 6 for 0x4009ee18. Instantiation order 6 Hey I'M in base class constructor number 5 for 0x4009ee10. Instantiation order 5 Hey I'M in base class constructor number 4 for 0x4009ee08. Instantiation order 5 *** END OF CONSTRUCTOR/DESTRUCTOR TEST *** Hey I'M in base class constructor number 3 for 0x400010d4. Hey I'M in base class constructor number 2 for 0x400010d4. Hey I'M in base class constructor number 1 for 0x400010cc.
RTEMS Development Environment Guide
Copyright © 1988-2004 OAR Corporation