Where to change processor number for IPC ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Where to change processor number for IPC ?

ソリューションへジャンプ
843件の閲覧回数
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 解決策
639件の閲覧回数
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 返答(返信)
639件の閲覧回数
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 件の賞賛
返信
639件の閲覧回数
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 件の賞賛
返信
640件の閲覧回数
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 件の賞賛
返信