MCUXpresso - How to link ARM RTOS2 library?

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

MCUXpresso - How to link ARM RTOS2 library?

723 Views
bgraham
Contributor IV

I would like to use a RTX library provided by Keil with my MCUXpresso project.

I copied the GCC library file:

C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.4.0\CMSIS\RTOS2\RTX\Library\GCC\libRTX_CM0.a

into my project directory:

E:/Workspace/src/libRTX_CM0.a

In MCUXpresso, I added the libRTX_CM0.a library to the project,

* Properties | C/C++ general | Paths and Symbols | Libraries

* added the library

I get a link error that indicates that the file does not exist.

e:/nxp/mcuxpressoide_10.2.1_795/ide/tools/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lE:/Workspace/src/libRTX_CM0.a

File exists, so what is wrong?

Thanks,

Bruce

0 Kudos
3 Replies

539 Views
bgraham
Contributor IV

Yes, I figured that out.

Now I am am trying to figure out why the linker can't find osRtxConfig. I am guessing I need to build the sources, with the desired #defines. I think that is normally done within the Keil IDE.

Do you have a suggestion how that is done when using MCUXpresso?

Thanks,

Bruce

0 Kudos

539 Views
bgraham
Contributor IV

I added another directory to my project, and added RTX_Config.c, RTX_Config.h, rtx_lib.c, and rtx_lib.h.

I added the directory to the project's path.

I links now.

Now to sort out the run time problems.

Thanks,

Bruce

0 Kudos

539 Views
converse
Senior Contributor V

When adding a library, you must 

1. Specify the raw library name - so if it is called libLibrary.a, you add just Library in the library name

2. Add the path where it can be found separately, so if the library is located at E:/Workspace/src/libRTX_CM0.a, specificy E:/Workspace/src in the library path

0 Kudos