MQX lite on the kinetis K10 supports one thread

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX lite on the kinetis K10 supports one thread

1,175 Views
luc28
Contributor II

I am trying to get MqxLite to work on the kinetis MK10DX128VLL7 with out very much success.

So far only one thread works. To get there, I have created a barebone project for the MK10DX128VLL7 and then imported the MqxLite component.

I have notice that when I create an MqxLite project, only the KL series of kinetis processors are available.

So I am wandering if freescale supports MqxLite for other series.

Note : I am using the lastest version of CodeWarrior (V10.3) for MCU (the free version).

5 Replies

645 Views
c0170
Senior Contributor III

Hello luc28,

only Kinetis L is supported at the moment.  What difficulties you are facing with one thread and MK10? Share with us more.

Regards,

MartinK

645 Views
luc28
Contributor II

Hello Kojto,

Since I have a freedom board at my disposal KL25, I am trying AN4610 and added a second task.

Unfortunatly, I was not able to break in the second task (similar to what I have done for K10) and

putting code in the second task has no effect (similar to what I have done for K10). 

Do I need special code to start the second thread. The MQX_AUTO_START_TASK is set.

Furthermore, I got the following warnings:

arm-none-eabi-gcc: warning: '-x assembler-with-cpp' after last input file has no effect

arm-none-eabi-gcc: warning: '-x assembler-with-cpp' after last input file has no effect

../MQXLITE/psp/cortex_m/core/M0/boot.S: Assembler messages:

../MQXLITE/psp/cortex_m/core/M0/boot.S:49: Warning: ignoring changed section attributes for .text

../MQXLITE/kernel/idletask.c: In function '_mqx_idle_task':

../MQXLITE/kernel/idletask.c:57:37: warning: variable 'kernel_data' set but not used [-Wunused-but-set-variable]

../MQXLITE/kernel/sched.c: In function '_sched_boost_priority_internal':

../MQXLITE/kernel/sched.c:532:28: warning: variable 'kernel_data' set but not used [-Wunused-but-set-variable]

../MQXLITE/kernel/sched.c: In function '_sched_unboost_priority_internal':

../MQXLITE/kernel/sched.c:569:37: warning: variable 'kernel_data' set but not used [-Wunused-but-set-variable]

../MQXLITE/kernel/task.c: In function '_task_set_parameter_for':

../MQXLITE/kernel/task.c:1742:29: warning: variable 'kernel_data' set but not used [-Wunused-but-set-variable]

../MQXLITE/kernel/task.c: In function '_task_restart':

../MQXLITE/kernel/task.c:2406:19: warning: variable 'dummy_stack_start_struct' set but not used [-Wunused-but-set-variable]

../MQXLITE/kernel/task.c: In function '_task_sync_priority_internal':

../MQXLITE/kernel/task.c:3411:13: warning: unused variable 'stack_ptr' [-Wunused-variable]

0 Kudos

645 Views
c0170
Senior Contributor III

Hello luc28,

is there any progress with your MQX Lite application? If you don't share at least some lines of code, we are not able to assist you. Providing only that flag MQX_AUTO_START_TASK is set, it's apparently not sufficient.

Unused variables warning can be suppressed (compiler flag disabled) or code rewritten removing all unused variables. They were brought in from MQX. That's what I was able to find out.

Regards,

MartinK

645 Views
luc28
Contributor II

I am building a system using the K10. To responds to the need of the hardware designer, I have expedited design. However, to move forward I need to use a slew of state machine or look into a design using and OS. I was hoping to use MQX on K10. So far, only one thread is active (thread 1), the others are sitting pretty. Any plans to support K10 in the future?. When? 

0 Kudos

644 Views
petr_uhlir
NXP Employee
NXP Employee

Hi Luc,

there is another point regarding tasks it has to be mentioned. If you have more then 1 task defined in your application, you have to add some blocking calls in tasks with higher priority to let the other task with lower priority running.

Lets consider simple example with 2 tasks: task_a with priority 8 and task_b with priority 9

void task_a(uint32_t task_init_data)

{

    int counter = 0;


    while (1)

    {

        /**

         * Block task_a for 10 ticks to let the task_b running

          * You can use also semaphores, events, mutexes or message queues

          * for blocking.

         */

        _time_delay_ticks(10);

        counter++;

    }

}


void task_b(uint32_t task_init_data)

{

    int counter = 0;


    while (1)

    {

        _time_delay_ticks(100);

        counter++;

    }

}


Other examples demonstrating mqxlite can be found here

"c:\Freescale\CW MCU v10.3\MCU\CodeWarrior_Examples\Processor_Expert\MQXLite"

or here if you are using DriverSuite

"c:\Freescale\PExDrv v10.0\eclipse\ProcessorExpert\Projects\MQXLite"

The full support for Kinetis K derivatives will be in CW10.3 #Update 1 which is going to be released in second half of March 2013

0 Kudos