Freescale Kinetis SDK FreeRTOS utility files missing

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

Freescale Kinetis SDK FreeRTOS utility files missing

854 Views
dankarm
Contributor II

Using the Freescale Kinetis Software Development Kit (Kinetis SDK 1.2.0), when attempting to display the information about the FreeRTOS tasks used by calling the "vTaskList()" function after enabling the "configUSE_TRACE_FACILITY" flag in "FreeRTOSConfig.h", compile errors are generated in "tasks.c" because "Utility.h" is not found. Related to that are missing functions: "Utility_strcat()", "Utility_chcat()", and "Utility_strcatNum32u()".

 

In comparing the Kinetis-supplied "tasks.c" to the latest "tasks.c" from the FreeRTOS web site, this appears to be due to Freescale modification to that file (by EST). It appears that the Kinetis SDK 1.2.0 is missing the "Utility.h" and "Utility.c" files for the FreeRTOS support.

 

I was able to make it work by implementing the missing functions as follows:

 

void Utility_strcat(uint8_t * dest, uint32_t bufSize, const unsigned char * src)

{

    strncat((char *)dest, (const char *)src, bufSize);

}

 

void Utility_chcat(uint8_t * dest, uint32_t bufSize, unsigned char src)

{

    char buf[2] = {src, 0};

 

    strncat((char *)dest, buf, sizeof(buf));

}

 

void Utility_strcatNum32u(uint8_t * dest, uint32_t bufSize, uint32_t src)

{

    char buf[10];

 

    sprintf(buf, "%ld", src);

    strncat((char *)dest, buf, sizeof(buf));

}

 

with the following example output results:

-> tasks

  NAME        STATE  PRIORITY  STACK   TCB#

------------ ------- -------- ------- -----

CmdLine         R       2       44      2

IDLE            R       0       176     4

LED             B       1       38      1

CDCproc         B       3       28      3

Tmr Svc         B       17      369     5

('R'=ready, 'B'=blocked, 'S'=suspended, 'D'=deleted)

->

 

Dan

Labels (1)
0 Kudos
Reply
2 Replies

465 Views
BlackNight
NXP Employee
NXP Employee

Hi Dan,

that FreeRTOS port is based on a universal port with/for Processor Expert (see Tutorial: FreeRTOS with the Kinetis SDK and Processor Expert | MCU on Eclipse ).

Somehow that utility module was not included with the SDK, so thanks for reporting.

You can find an updated port for the SDK (which includes a newer FreeRTOS v8.2.0) here, along with the utility module:

mcuoneclipse/Examples/KDS/FRDM-K64F120M/Lab_KSDK_FreeRTOS/Sources at master · ErichStyger/mcuoneclip...

That port includes as well FreeRTOS+Trace from Percepio (Updated Percepio Tracealyzer and Trace Library to Version V2.7.0 | MCU on Eclipse ).

If I can find time, I will post an article about this in the near future.

I will work with the SDK engineering team that the next version will include that as well. Until then, you could use that port from above GitHub directory.

I hope this helps,

Erich

465 Views
DavidS
NXP Employee
NXP Employee

Thanks for sharing Dan.  I will report to the powers that be.

Regards,

David

0 Kudos
Reply