mqxinit.c compilation error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mqxinit.c compilation error

Jump to solution
1,454 Views
SVC2
Contributor II

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

 

 

 

0 Kudos
Reply
1 Solution
855 Views
PetrM
Senior Contributor I

Hello,

 

you also need MQX_IS_MULTI_PROCESSOR set to 1 in user_config.h.

 

Regards,

PetrM

 

View solution in original post

0 Kudos
Reply
3 Replies
856 Views
PetrM
Senior Contributor I

Hello,

 

you also need MQX_IS_MULTI_PROCESSOR set to 1 in user_config.h.

 

Regards,

PetrM

 

0 Kudos
Reply
855 Views
Muffinman
Contributor I

Did IAR support IPC debugging?

My K60 always got exception after seting kernel_data->CONFIG2 = MQX_CNFG2;
What's wrong?

 

Thanks

Jack

0 Kudos
Reply
855 Views
Muffinman
Contributor I

I addresed the issue.

For the 3.8 version, the BSP_DEFAULT_START_OF_KERNEL_MEMORY defined the kernel_data at user level, which make the compiler allocate kernel_data before the MQX itself defined the pointer. So the kernel_data pointer is wrong and cause the ipc error.

0 Kudos
Reply