 RE: RTX166Tiny & EC++ have problem! Stephane Georget Oleg, Ignore my previous post, as it is confusing. Short answer: define a main() anyway, and see what happens. Long answer: There is an example in Keil\C166\Rtx_Tiny which is supposed to show how to use EC++ and RTX Tiny. It doesn't work on my machine! _main() is never called, I believe there is a problem with this example. It seems that RTX Tiny defines a symbol called main, which in turn calls os_start() (look at the source code for RTX Tiny) One workaround is to define, and it can by anywhere in your cpp code really:
int main() {}
This symbol will override the one in RTX Tiny's library, which means that this function will be called, rather than the one inside the real time library. Then, the EC++ parser will recognize this special function and call _main() automatically, as soon as main() is executed (look at how main() is modified inside the .ic. file) Other workaround: modify the .a66 initialization file so it calls _main instead of main. Look for the lines of code that say:
...
EXTRN main:Model
...
$IF TINY
JMP main
$ELSE
JMP FAR main
$ENDIF
and replace all main with _main. Not sure if this makes sense, but I hope this helps... -Stéphane |