I wanted to set up a new embedded project using MicroC OS-II and use C++.
When I want to create an instance of a class using the new operator, my processor runs into an exception which seems to come from a failing malloc call in the new operator. This is an example that fails:
testC* test = new testC();
with testC being some class with an integer member variable. BTW, I am using Altera Nios 2.
After some research, I came to the conclusion that malloc is not compatible with the RTOS. Therefore my question: Is it possible to use C++ with uC/OS-II? Or is there a way to replace the malloc call in the new operator?
So far, I could not find any additional information about this.
Thank you very much for your help. Best, Roman