mqxinit.c compilation error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

mqxinit.c compilation error

跳至解决方案
1,866 次查看
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 项奖励
回复
1 解答
1,267 次查看
PetrM
Senior Contributor I

Hello,

 

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

 

Regards,

PetrM

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,268 次查看
PetrM
Senior Contributor I

Hello,

 

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

 

Regards,

PetrM

 

0 项奖励
回复
1,267 次查看
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 项奖励
回复
1,267 次查看
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 项奖励
回复