How to add RTCS to my proyect

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

How to add RTCS to my proyect

Jump to solution
1,162 Views
albertolubeiro
Contributor III

Hi everybody,

I'm with KDS 3.0 and KDSK 1.2 with PEX in a FRDMK64F. I have an easy MQX proyect with one task where i toggle a led. Now i want to add ethernet stack but don't know how to add RTCS library to my proyect.

I have made an attempt adding the RTCS folder to my proyect after having built the RTCS library but i get errors. Don't know if it is the correct way to do so, if anyone could help it would be great.

Thanks and best regards

1 Solution
674 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Alberto Lubeiro:

No need to copy the RTCS folder to your project.

You first have to build the RTCS library (lib_rtcs.a) and then link it to your project. Go to Project -> Properties -> C/C++ Build -> Cross ARM C++ Linker -> Libraries and do this:

1) In Library search path (-L) add: "${KSDK_PATH}/middleware/tcpip/rtcs/lib/frdmk64f.kds/debug/rtcs"

2) In Libraries (-l) add: _rtcs

Then in Cross ARM C Compiler -> Includes add the same path as in (1) above: "${KSDK_PATH}/middleware/tcpip/rtcs/lib/frdmk64f.kds/debug/rtcs"

With this you are adding the RTCS library to your existent project.


Regards!,
Jorge Gonzalez

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

View solution in original post

6 Replies
674 Views
ramstell
Contributor III

Hi Jorge

This does work for me also, but I get the following error when I try and include rtcs.h:

C:/Freescale/KSDK_1.2.0/middleware/tcpip/rtcs/lib/twrk64f120m.kds/debug/rtcs/rtcs.h:54:50: fatal error: ethernet.h: No such file or directory

     #include <ethernet.h>   /* ENET driver APU.*/

Looking in rtcs.h it's including <ethernet.h> because it think's PLATFORM_SDK_ENABLED is NOT defined.

What's the correct way of including rtcs.h with PEX?

Kind regards

Roger

0 Kudos
675 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Alberto Lubeiro:

No need to copy the RTCS folder to your project.

You first have to build the RTCS library (lib_rtcs.a) and then link it to your project. Go to Project -> Properties -> C/C++ Build -> Cross ARM C++ Linker -> Libraries and do this:

1) In Library search path (-L) add: "${KSDK_PATH}/middleware/tcpip/rtcs/lib/frdmk64f.kds/debug/rtcs"

2) In Libraries (-l) add: _rtcs

Then in Cross ARM C Compiler -> Includes add the same path as in (1) above: "${KSDK_PATH}/middleware/tcpip/rtcs/lib/frdmk64f.kds/debug/rtcs"

With this you are adding the RTCS library to your existent project.


Regards!,
Jorge Gonzalez

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

674 Views
albertolubeiro
Contributor III

Hi Jorge,

I have solved an issue with the "project_kdsk_path". I don't know why, but it was linking it to the old path of KDSK_1.1.0.

Now i have done the following as you yold me:

     -     (lib_rtcs.a) generated

     -     In Library search path (-L) added: "C:/Freescale\KSDK_1.2.0/middleware/tcpip/rtcs/lib/frdmk64f.kds/debug/rtcs"

     -     In Libraries (-l) added: _rtcs

     -     In Cross ARM C Compiler -> Included: "C:/Freescale\KSDK_1.2.0/middleware/tcpip/rtcs/lib/frdmk64f.kds/debug/rtcs"

With these steps done, now I can build without errors. But as you say in your post i should add RTCS folder.

¿Which RTCS folder should i add?. ¿The one that is in the following path? ${KSDK_PATH}/middleware/tcpip/rtcs. This one conteins a lot of folders with examples to others differents compilers to the one i am using.

Thanks and best regards

0 Kudos
674 Views
santiago_gonzal
NXP Employee
NXP Employee

Hello Alberto,

There is *NO* need to add any folder of RTCS to your project.

What Jorge explained to you are the steps to integrate the RTCS library in your project. Now that you have done that, you can call any RTCS function and it will compile and work without any problem.

Refer to the RTCS examples to see how to use the RTCS functions.

Regards,

Santiago

674 Views
albertolubeiro
Contributor III

Hi Santiago,

Sorry i didn't realised of this "NO".

Jorge was right. This way i have added RTCs to my project.

Thanks guys! i really apreciate your help.

Best regards

674 Views
albertolubeiro
Contributor III

Hi Jorge,

I cannot add this RTCS thing.

I build the RTCS library which is in the following path "KSDK_1.2.0\middleware\tcpip\rtcs\lib\frdmk64f.kds\debug\" and i get "lib_rtcs.a"

I copy the RTCS folder in my project. the folder is in the following path "KSDK_1.2.0\middleware\tcpip\rtcs\".

Inside this folder there are several folders too. "build, examples, lib, source and a txt file".

After copying this folder i do all you have told me in points 1 and 2 and finally add the same path in Cross ARM C Compiler but i get nothing but errors.

This is starting to be so much annoying

Thanks and regards

0 Kudos