This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ucos ii and c++ compiler

Hello,
I'm trying to move a c project in c++. I just tried to change extension to main.c to main.cpp but I get an error including ucos_ii.h at OsTaskCreateExt and I cannot find what i going wrong with the function declaration.
Can anyone help me?
Thanks
Michele

Parents
  • That's what I wrote in my main.cpp

    and that's waht I found checking the main.ic

    int main(void)
    { INT8U ucErr; static INT16U sdata Ram_test_result = 0; static INT16U sdata led_blink = 0; static INT16U sdata led_switch = 0;

    #define LED_TIMEOUT 40000

    //SignInit(); P7_P7 = 0; //disable bypass scr CC1_SEE = 0x0000; //disabilita gli out-compare CC1_OUT_CC6IO = 0; //disable input scr R P1L_P0 = 0; //disable input scr T P1L_P1 = 0; //disable input scr S P9_P5 = 0; //disable battery+ scr P1L_P7 = 0;

    #line 549
    int main(void)
    {

    static INT16U sdata Ram_test_result = 0U;
    static INT16U sdata led_blink = 0U;
    static INT16U sdata led_switch = 0U;
    #line 551
    auto INT8U ucErr;
    #line 550
    _main();
    #line 559
    P7_P7 = 0U;
    CC1_SEE = ((unsigned int)0U);
    CC1_OUT_CC6IO = 0U;

    .. it seems it add a call to function _main() and that is the error I get.

Reply
  • That's what I wrote in my main.cpp

    and that's waht I found checking the main.ic

    int main(void)
    { INT8U ucErr; static INT16U sdata Ram_test_result = 0; static INT16U sdata led_blink = 0; static INT16U sdata led_switch = 0;

    #define LED_TIMEOUT 40000

    //SignInit(); P7_P7 = 0; //disable bypass scr CC1_SEE = 0x0000; //disabilita gli out-compare CC1_OUT_CC6IO = 0; //disable input scr R P1L_P0 = 0; //disable input scr T P1L_P1 = 0; //disable input scr S P9_P5 = 0; //disable battery+ scr P1L_P7 = 0;

    #line 549
    int main(void)
    {

    static INT16U sdata Ram_test_result = 0U;
    static INT16U sdata led_blink = 0U;
    static INT16U sdata led_switch = 0U;
    #line 551
    auto INT8U ucErr;
    #line 550
    _main();
    #line 559
    P7_P7 = 0U;
    CC1_SEE = ((unsigned int)0U);
    CC1_OUT_CC6IO = 0U;

    .. it seems it add a call to function _main() and that is the error I get.

Children