Jump to content

Chameleon compile errors with NOVO, switch statement.

Recommended Posts

Using MPLabX ver 5.15 with SourceBoost 7.43.

Working to compile an existing project with the Chameleon compiler, found these problems(which compiled OK with BoostC):

1)Got a strange error when trying to compile a switch statement using an enumeration:

Attached file newmain.c failed with this error:

newmain.c(28):  error: missing closing curly bracket (1)

Compile succeeds if the statement case SSStart: is replaced with case 0:


2)Definition of enum EN_TASK_STATUS in novo.h fails compile due to trailing comma:

    TS_NOT_STOPPED        = 00000111b,
    TS_IN_RUN_Q            = 00000001b,
    TS_IN_SLEEP_Q        = 00000010b, // a task can be in the event queue
    TS_IN_EVENT_Q        = 00000100b, // and wait queue at the same time
    TS_EVENT_TIMEOUT    = 00001000b,
    TS_IS_WAKING        = 00010000b,  //***** remove this trailing comma to fix! *******


3)Novo Sys_Sleep(TICK_COUNT) compile fails because TICK_COUNT defined as unsigned int and Sysi_Sleep wants unsigned short or unsigned char arg.

   Strangely, I could not fix this by editing the TICK_COUNT typedef in novocfg_PICxxxxx.h file, I had to define the variable I used in Sys_Sleep call as unsigned short.



usTicks = 10;



unsigned short usTicks;

usTicks = 10;




Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...