Greetings!

cancel
Showing results for 
Search instead for 
Did you mean: 

Greetings!

748 Views
niravnirmal
Contributor II

I am new to programming. Having working knowledge of C programming and initialising ports/hardware and basic understanding of digital electronics. I am trying to run FreeRTOS on my newly bought KL25Z Board and installed KDS 3.0 Eclipse. But unfortunately there is no demo example under C:\Freescale\KSDK_1.3.0\examples\frdmkl25z and also no examples under C:\FreeRTOSV8.2.3\FreeRTOSV8.2.3\FreeRTOS\Demo official installations. On google, I found a tutorial from Erich Styger (mcueclipse.com) but he used Processor Expert (PE). I do not want to use PE for this project.

 

Can anyone please guide me with - 1) Where can I find a demo application about FreeRTOS for KDS Eclipse on M0 architecture? 2) How to include the FreeRTOS library in my current project? I included all source files listed on FreeRTOS website ( like tasks, queue, list, port,etc) in my project but the builder gives always "No rule to make target". I used the full paths to include like #include <C:\FreeRTOSV8.2.3\FreeRTOSV8.2.3\FreeRTOS\Source\include\FreeRTOS.h> for all the header files.

Please help!

Labels (1)
9 Replies

76 Views
niravnirmal
Contributor II

Hello Iva,

thank you! I am only curious to know why did you include the example project "i2c_rtos" using the option "Project of projects" under "right click -> import" in the video. I did the same using "General\Existing Project from Workspace" and my project never worked.

Regards,

Nirav

0 Kudos

76 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Nirav,

By Existing Projects Sets (working sets definition *.wsd) you select working sets= package with all needed libraries.

If you select any of your project from work space, you should check, if your project has compiled library first.

If you have any other issue, please let me know.


Have a great day,
Iva

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

76 Views
niravnirmal
Contributor II

Greetings Iva,

thanks for the prompt response!

Following your suggestion, I tried the example named "i2c_rtos" under "C:\Freescale\KSDK_1.3.0\examples\frdmkl25z\demo_apps\i2c_rtos\i2c_rtos_freertos\kds". When I build this project, i get the error "Description Resource Path Location Type make: *** No rule to make target:/Freescale/KSDK_1.3.0/examples/frdmkl25z/demo_apps/i2c_rtos/i2c_rtos_freertos/kds/../../../../../../lib/ksdk_freertos_lib/kds/KL25Z4/debug/libksdk_platform_freertos.a', needed by `i2c_rtos_freertos_frdmkl25z.elf'. i2c_rtos_freertos_frdmkl25z    C/C++ Problem"

But at the same time, other examples from the same directory like "hello world" or "tsi" or "bubble" works wonderful - without errors. I can also download and debug them on my newly bought KL25Z board.

So do you have any other demo example for FreeRTOS on KL25Z using KDS 3.0.0 ?

Alternatively, I would like to create a sample project from scratch like File -> New -> Kinetis Project and then successfully include the FreeRTOS library in this project. Then alter the main() - by creating two tasks eg. Bubble and TSI. The logic/algorithm will be copied from the example projects supplied with the official installation of KSDK 1.3.0. The problem here is the error "Description Resource Path Location Type make: *** No rule to make target C:/Freescale/KSDK_1.3.0/examples/frdmkl25z/demo_apps/i2c_rtos/i2c_rtos_freertos/kds/../../../../../../lib/ksdk_freertos_lib/kds/KL25Z4/debug/libksdk_platform_freertos.a', needed by `i2c_rtos_freertos_frdmkl25z.elf'. i2c_rtos_freertos_frdmkl25z    C/C++ Problem"

0 Kudos

76 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Nirav,

Hello World, TSI, Bubble examples are without FreeRTOS.

All demo examples for KL25Z are under folder C:\Freescale\KSDK_1.3.0\examples\frdmkl25z

the issue, which you described is caused that you don´t compile library libksdk_platform_freertos.a first. For this case ksdk_freertos_lib_KL25Z4

To avoid this, please either compile the library first/import to your work space or easily- import example as Existing Projects Sets. Here is included project with library together.

Please, see my video:

Best Regards,

Iva

76 Views
niravnirmal
Contributor II

Hello Iva,

thanks for your reply and the video !! I am interested to know why do you use "Project of Projects" instead of "General -> Existing Project" under right-mouse-click -> Import ?

2) Kindly check the attachment screenshot. After I followed all the steps from the above video, I still get many errors. Do you have any idea?

Regards,

Nirav

error_KL25Z.PNG

0 Kudos

76 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Nirav,

it is because you don´t forget import some library necessary for example project. It is easier.

Please, have you cleaned your project and built again?

clean.png

Best Regards,

Iva

76 Views
niravnirmal
Contributor II

Hiii Iva,

it finally worked! I took a sledge hammer and banged it on my laptop!! BOOOMM!

Naaaa, I deleted the KL25Z folder under "C:\Freescale\KSDK_1.3.0\examples" and replaced it with a RTOS SDK Build from Welcome to Kinetis Expert | Kinetis Expert​. It feels like heaven right now :-)

ok. Now back to the original question: I do not see the main function in the "i2c_rtos_freertos" example! It is defined under some #if, #else query. I want to delete the i2c algorithm and use the "xTaskCreate()" API of FreeRTOS and the "hello world" algorithm and blink a LED.

A prompt help will be appreciated! I can offer a Augustiner beer if you are in Munich. just kidding!

Thanks and regards,

Nirav

0 Kudos

76 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Nirav,

Just a tip for you: for modifying examples is better to work with copy of example. Please see New Kinetis SDK Project Generator v2 is available!

Please, see main.c

there is creation for master, slave and sample task.

#if USE_RTOS

    result = OSA_TaskCreate(task_slave,

                    (uint8_t *)"slave",

                    TASK_SLAVE_STACK_SIZE,

                    task_slave_stack,

                    TASK_SLAVE_PRIO,

                    (task_param_t)0,

                    false,

                    &task_slave_task_handler);

    if(result != kStatus_OSA_Success)

    {

        PRINTF("Failed to create slave task\r\n\r\n");

#if (FSL_RTOS_MQX) && (MQX_COMMON_CONFIG != MQX_LITE_CONFIG)

        return;

#else

        return -1;

#endif

    }

    result = OSA_TaskCreate(task_sample,

                    (uint8_t *)"sample",

                    TASK_SAMPLE_STACK_SIZE,

                    task_sample_stack,

                    TASK_SAMPLE_PRIO,

                    (task_param_t)0,

                    false,

                    &task_sample_task_handler);

    if (result != kStatus_OSA_Success)

    {

        PRINTF("Failed to create sample task\r\n\r\n");

#if (FSL_RTOS_MQX) && (MQX_COMMON_CONFIG != MQX_LITE_CONFIG)

        return;

#else

        return -1;

#endif

    }

#endif /* USE_RTOS */

    // create app tasks

    result = OSA_TaskCreate(task_master,

                    (uint8_t *)"master",

                    TASK_MASTER_STACK_SIZE,

                    task_master_stack,

                    TASK_MASTER_PRIO,

                    (task_param_t)0,

                    false,

                    &task_master_task_handler);

    if (result != kStatus_OSA_Success)

    {

        PRINTF("Failed to create master task\r\n\r\n");

#if (FSL_RTOS_MQX) && (MQX_COMMON_CONFIG != MQX_LITE_CONFIG)

        return;

#else

        return -1;

#endif

    }

I hope this helps.
Best Regards,

Iva

76 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Nirav,

Please, check these examples:

I2C Demo with RTOS located under <SDK_Install>/examples/<board>/demo_apps/i2c_rtos/<rtos>/<toolchain>

For more details please refer to KSDK v1.3 Demo Applications User´s Guide

there are also information about pins connection for each device.

kl25z.png

Power Manager RTOS Demo located under <SDK_Install>/examples/<board>/demo_apps/power_manager_rtos_-demo/<configuration>/<toolchain>

with these supported low power modes for KL25Z

kl25z_.png

I hope this helps.

Best Regards,

Iva