RTCS_Create Error

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

RTCS_Create Error

1,131 Views
Jeff32
Contributor I

I'm using MQX 3.8, IAR 6.30, and a K60 TWR-K60N512 and TWRSER. I'm trying to run the ipc_udp RTCS example but the call to RTCS_Create returns an error and causes the program to enter the idle task loop rather than start sending messages. Debugging shows that the value of error after the error = RTCS_Create(); call is 4406 (which may be the decimal representation of an error code 0x1136?). I haven't been able to find reference to either error code in the code or documentation.

 

This is the provided MQX code for cpu1 of the ipc_udp example and hasn't been modified except for updating \config\twrk60n512\user_config.h from #include "small_ram_config.h" to #include "maximum_config.h" since small_ram_config had MQX_USE_IPC defined as 0. I have rebuilt the MQX libraries since modifying user_config.

 

I don't know why this provided example code isn't working and have been stuck on this for a while now. Has anyone else encountered this or does anyone have any ideas?

 

Thanks,

Jeff

Labels (1)
Tags (1)
0 Kudos
4 Replies

631 Views
miltonsierra
Contributor II

Hi, i was with the same problem in a KSDK Processor expert project and I add the next configuration:

Select menu Project > Properties

Select C/C++ Build > Settings

Select Cross ARM C++ Linker > Libraries

  

Add new Libraries (-I)...

ksdk_platform_mqx

_rtcs

_mqx

_mqx_stdlib

Add new Library search path (-L)...

"${ProjDirPath}/Project_Settings/Linker_Files"

"${KSDK_PATH}/lib/ksdk_mqx_lib/kds/K64F12/Debug"

"${KSDK_PATH}/rtos/mqx/lib/frdmk64f.kds/debug/mqx"

"${KSDK_PATH}/rtos/mqx/lib/frdmk64f.kds/debug/mqx_stdlib"

"${KSDK_PATH}/middleware/tcpip/rtcs\lib/frdmk64f.kds/debug/rtcs"  

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

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

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

For project without processor expert:

Select Cross ARM C++ Linker > General

Script files (-T)

"C:\Freescale\KSDK_1.2.0\platform\devices\MK64F12\linker\gcc\MK64FN1M0xxx12_flash.ld"

Select Cross ARM C++ Linker > Libraries

Add new Libraries (-I)...

ksdk_platform_mqx

_rtcs

_nshell

_mqx

_mqx_stdlib

gcc

c

supc++

m

nosys

Library search path (-L)..

C:\Freescale\KSDK_1.2.0/lib/ksdk_mqx_lib/kds/K64F12/debug

C:\Freescale\KSDK_1.2.0\middleware\tcpip\rtcs\lib\frdmk64f.kds\debug\rtcs

C:\Freescale\KSDK_1.2.0\rtos\mqx\lib\frdmk64f.kds\debug\nshell

C:\Freescale\KSDK_1.2.0\rtos\mqx\lib\frdmk64f.kds\debug\mqx

C:\Freescale\KSDK_1.2.0\rtos\mqx\lib\frdmk64f.kds\debug\mqx_stdlib

Select Cross ARM C++ Linker > Micellaneus

C:\Freescale\KSDK_1.2.0\lib\ksdk_mqx_lib\kds\K64F12\debug\libksdk_platform_mqx.a

"C:\Freescale\KSDK_1.2.0\middleware\tcpip\rtcs\lib\frdmk64f.kds\debug\rtcs\lib_rtcs.a"

C:\Freescale\KSDK_1.2.0\rtos\mqx\lib\frdmk64f.kds\debug\mqx_stdlib\lib_mqx_stdlib.a

C:\Freescale\KSDK_1.2.0\rtos\mqx\lib\frdmk64f.kds\debug\mqx\lib_mqx.a

0 Kudos

631 Views
Jeff32
Contributor I

I found that error code 0x1136 = RTCS: Open queue failed. Does anyone know how to resolve this?

0 Kudos

631 Views
Tgomes
Contributor III

Hi Jeff,

Before calling RTCS_Create (), try to modify and test the value of the following variables:

     _RTCSPCB_init
     _RTCSPCB_grow
     _RTCSPCB_max
     _RTCS_msgpool_init
     _RTCS_msgpool_grow
     _RTCS_msgpool_max
     _RTCS_socket_part_init
     _RTCS_socket_part_grow
     _RTCS_socket_part_max


You can find more information about these settings in the document MQXRTCSUG.pdf.


Good luck

:smileyhappy:

0 Kudos

631 Views
Jeff32
Contributor I

Thanks for the reply Tgomes. I checked the values of those variables just before RTCS_create() was called and tried modifying some of their values but still got the same error. Then I tried changing _RTCSQUEUE_base just to give it a shot. I changed it from 16 to 8 and it worked. I'm not sure exactly what effect this has but all I needed was _RTCSQUEUE_base = 8; before the RTCS_create call. Thanks for help!

0 Kudos