AnsweredAssumed Answered

mqxinit.c compilation error

Question asked by Simon Chamlian on Jun 7, 2011
Latest reply on Nov 21, 2011 by jack yan

Hi,

 

I am trying to compile a simple test program using the source code of MQX. First, I had errors stating:

 

#if (!MQX_USE_IPC) && (! defined (MQX_DISABLE_CONFIG_CHECK))
#error IPC component is currently disabled in MQX kernel. Please set MQX_USE_IPC to 1 in user_config.h and recompile kernel.
#endif

and

 

#if (! MQX_USE_TIMER) && (! defined (MQX_DISABLE_CONFIG_CHECK))
#error TIMER component is currently disabled in MQX kernel. Please set MQX_USE_TIMER to 1 in user_config.h and recompile kernel.
#endif

 

1) The MQX_USE_TIMER and MQX_USE_IPC are not in user_config.h but rather small_ram_config.h

 

2) When I define them as 1

 

i.e.

       #ifndef MQX_USE_IPC
       #define MQX_USE_IPC                         1
       #endif

      //...
      #ifndef MQX_USE_TIMER       
      #define MQX_USE_TIMER                       1
      #endif

I get the following error.

 

     Error   : 'MY_IPC_ID' is not a member of class 'struct kernel_data_struct'
                  mqxiinit.c line 94      kernel_data->MY_IPC_ID = BUILD_TASKID(kernel_data->PROCESSOR_NUMBER, 1); 

The code is:


   /* Set IPC id for compatibility */
#if MQX_USE_IPC
   kernel_data->MY_IPC_ID = BUILD_TASKID(kernel_data->PROCESSOR_NUMBER, 1);
#endif

 

Any hints?

 

Thanks,

S

 

 

 

Outcomes