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
解決済! 解決策の投稿を見る。
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
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
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
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