Good day!
I have a problem with using RTX166 Tiny OS with EC++. If I try to define tasks in .cpp file, I dont see JUMP to _main() function.
In technical support: "RTX166 TINY: CAN'T DEFINE TASKS IN EC++" http://www.keil.com/support/docs/2812.htm advises to "Simply define your _task_ and interrupt functions in a .C file". In this case Can I use C++ features (ex. define objects) in tasks functions?
In file C:\Program Files\Keil\C166\Rtx_Tiny\readme5.txt I have read following note:
Function os_start for EC++ compatiblity ======================================= The function os_start enables the usage of RTX166 Tiny together with EC++. EC++ requires special initalizations that are performed in the main routine. After this initalizations, the os_start function can be called to start the RTX166 Tiny kernel. EXTERN_C void _main () { init_mempool (mempool, sizeof (mempool)); // create memory pool for new & delete __sti__init__ (); // call initializer functions os_start (); // start RTX166 kernel }
But senselessly try to call os_start(), if _main() is not called.
P.S. Problem "expected {" I resolve using replace _task_ with __task. Is it correct?
Hello Reinhard,
This example seems to be broken (at least for me), that's the problem.
_main() is never called, which is an issue because then EC++ classes are not initialized, neither is the memory pool...
This example is so simple (no constructors, not even a single data member) that it appears to be working, whereas in fact the EC++ initialization is not done at all.
-Stephane