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

Unexpected Expression Error in RTX_CM_Lib.h

Build started: Project: WFC
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'WFC 3_5_16bit'
Before Build - User command #2: SubWCRev.exe "../" "template.h" "version.h"
SubWCRev: 'C:\Users\FAl-Obaidi\Desktop\WFC\'
Last committed at revision 0
Updated to revision 0
Unversioned items found
compiling RTX_Conf_CM.c...
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\RTOS\RTX\INC\RTX_CM_lib.h(300): error: #29: expected an expression
if (nr_mutex >= OS_MUTEXCNT) {
RTE\CMSIS\RTX_Conf_CM.c: 0 warnings, 1 error
compiling dex_accounting.c...
compiling service_mode_menu.c...
compiling inter_controller_comm_thread.c...
compiling wfc_dbc.cpp...
".\Output\WFC.axf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:15

code at line 300 from RTX_CM_lib.h:

/*--------------------------- _mutex_initialize -----------------------------*/

int _mutex_initialize (OS_ID *mutex);
int _mutex_initialize (OS_ID *mutex) {
/* Allocate and initialize a system mutex. */

    if (nr_mutex >= OS_MUTEXCNT) {
             /* If you are here, you need to increase the number OS_MUTEXCNT. */
            for (;;);
    }
    *mutex = &std_libmutex[nr_mutex++];
    mutex_init (*mutex);
    return (1);
}
0