Where to change processor number for IPC ?

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

Where to change processor number for IPC ?

跳至解决方案
847 次查看
Maciek
Contributor V

As I see the __DEFAULT_PROCESSOR_NUBER is set to 1 in the header file for the plarform in bsp directory (for ex. in twrk60f120m.h).

What is the prefered way of changing the processor number in application with a few processors communicating with IPC (inter processor communication) feature of MQX ?

Should I change this #define in twrk60f120m.h ?

Why there is no way of setting this in user_config.h ?

Thanks for help

Maciek

标记 (2)
0 项奖励
回复
1 解答
643 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Maciek:

I prefer the second option,  changing the __DEFAULT_PROCESSOR_NUBER definition.

Regarding other members in MQX_init_struct, I think you can change it in user_config.h. These variables are from user_config.h, the default values are defined in twrk60120.h. For example

In twrk60f120m.h  we can see

#ifndef BSP_DEFAULT_MAX_MSGQS

    #define BSP_DEFAULT_MAX_MSGQS                             (16L)

#endif

so if you add the following line in user_config.h,

#define BSP_DEFAULT_MAX_MSGQS 20

then this value will be overwritten and be transferred to MQX_init_struct

Regards

Daniel

在原帖中查看解决方案

0 项奖励
回复
3 回复数
643 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Maciek:

For the Vybrid processor, the Cortes-A5 is core 0, and the Cortex-M4 is core 1

K60 is not a multicore chip, so you can't find it in user_config.h

But for multicore chip, for example, vybrid, you can find it in the user_config.h file.

There is a multicore communication demo in the installation folder

C:\Freescale\Freescale_MQX_4_2\mcc\examples\pingpong\.

Please check the MultiCore Communication Library user guide in the folder.

C:\Freescale\Freescale_MQX_4_2\doc\mcc\MQX_MCC_User_Guide.pdf

Regards

Daniel

0 项奖励
回复
643 次查看
Maciek
Contributor V

Hi Daniel,

thanks for answer, but I'm using K60 and still don't know the preferred way of changing the processor number parameter.

One option is just as I described at the beginning: by changing  __DEFAULT_PROCESSOR_NUBER definition.

On the other hand the IPC example (from MQX distribution) has a full definition of the MQX_init_struct in one of the example's source files. But this variable is already defined in mqx_init.c ?! What is happening here and what is the preferred way ?

Other members of the structure can be changed in user_config.h (MAX_MSGQS for example...).

Waiting for response

Maciek

0 项奖励
回复
644 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Maciek:

I prefer the second option,  changing the __DEFAULT_PROCESSOR_NUBER definition.

Regarding other members in MQX_init_struct, I think you can change it in user_config.h. These variables are from user_config.h, the default values are defined in twrk60120.h. For example

In twrk60f120m.h  we can see

#ifndef BSP_DEFAULT_MAX_MSGQS

    #define BSP_DEFAULT_MAX_MSGQS                             (16L)

#endif

so if you add the following line in user_config.h,

#define BSP_DEFAULT_MAX_MSGQS 20

then this value will be overwritten and be transferred to MQX_init_struct

Regards

Daniel

0 项奖励
回复