how to use mutex on mqxlite?

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

how to use mutex on mqxlite?

ソリューションへジャンプ
1,305件の閲覧回数
yarannan
Contributor III

Hi,

I am building a project that is based on platform KDS3.0 +KSDK1.2+PEx.

I am using MQXLite OS. It is not allow me to enable mutex. It said it doesnt

support. I have to run multi threads with some shared variables. Is there

any way that I can get around this issue?

Thanks,

Yaran

0 件の賞賛
返信
1 解決策
1,068件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Yaran:

Here is a document to enable MQX Lite in KSDK1.1 , you can choose "mutexes"   component to enable mutex, and rebuild all. 

How To: Create an MQX RTOS for KSDK project with Processor Expert in Kinetis Design Studio IDE

I tried it with KSDK1.3 , it seems mutex is hidden in this version, it only suuport lightweight events and lightweight message queues in this version

pastedImage_4.png

Regards

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,068件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Yaran:

MQX Lite supports lightweight subset of the MQX componets: LW semaphore, LW evet, Mutex, LW message.

There is an example using mutex

C:\Freescale\CW MCU v10.6\MCU\CodeWarrior_Examples\Processor_Expert\MQXLite\Kinetis\FRDM_KL25Z\MUTEX_KL25Z

Mutex is an optional component, the default state is disable.

I think if you add the below line into user_config.h, and recompile all. it should able to support mutex.

#define MQX_USE_MUTEXES           1

I am attaching the mqxlite user manual here.

Regards

0 件の賞賛
返信
1,068件の閲覧回数
yarannan
Contributor III

I did that and it threw me error when I run the program. It said

DescriptionResourcePathLocationType
#error MUTEX component is currently disabled in MQX kernel. Please set MQX_USE_MUTEXES to 1 in mqx_sdk_config.h and recompile kernel.mutex.h/shiny_v3/SDK/rtos/mqx/mqx/source/includeline 36C/C++ Problem

So how would i be able to recompile the kernel from KDS?

Thanks,

0 件の賞賛
返信
1,069件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Yaran:

Here is a document to enable MQX Lite in KSDK1.1 , you can choose "mutexes"   component to enable mutex, and rebuild all. 

How To: Create an MQX RTOS for KSDK project with Processor Expert in Kinetis Design Studio IDE

I tried it with KSDK1.3 , it seems mutex is hidden in this version, it only suuport lightweight events and lightweight message queues in this version

pastedImage_4.png

Regards

Daniel

0 件の賞賛
返信