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
已解决! 转到解答。
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.
