Is it possible to build an MQX Processor Expert project using pre-compiled MQX libraries?

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to build an MQX Processor Expert project using pre-compiled MQX libraries?

737 Views
kylehamilton
Contributor II

I am trying to build a Processor Expert project using MQX with KSDK.  Using the "Linked" PE project option, the MQX files are not copied into the project space but are linked via KDS and are compiled as a part of the KDS project.  I would like to take this a step further and simply link to pre-compiled MQX libraries (ksdk_platform_mqx, _mqx_stdlib, _mqx - like in the MQX example projects).  I have tried turning off code generation for most of the components, but it seems like there should be an easy way to do what I'm asking since the example projects are built this way.

 

Thanks,
Kyle

Labels (1)
Tags (2)
0 Kudos
7 Replies

398 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Kyle,

my understanding is that you want to create a project without any include path nor files, just the library (.a). Is this right?

Well, in this case you are not able to have such project because library is used by the linker, but the compiler is not aware the content of the library. It is necessary to include header files with function prototypes that are defined in the library, this way the compiler will let this job to the linker. Otherwise the compiler will yell an error.

Regards,

Carlos

0 Kudos

398 Views
kylehamilton
Contributor II

Hi Carlos,

Thanks for your response.  You are right about the include paths - they definitely have to be there whether or not you compile the MQX files or link to a library.  I am interested in linking to the ksdk_platform_mqx, mqx_stdlib, and mqx libraries rather than compiling the individual files that those libraries use.  PE copies or virtual-links a ton of files could come from pre-compiled libraries.  The example projects for MQX use these libraries, but I can't find a way to maintain and PE project that does this.

As an experiment, I created a non-PE project and added the Generated_Code, Static_Code, and Sources from a PE project.  I then added the necessary defines, include paths, library search paths, libraries, etc.  I found that the only extra files needed to build the project were the bsp files (bsp_config.h, bsp.h, init_bsp.c).  Once I added a bsp folder with those files, the project built and ran successfully.  Everything else was already assembled into the libraries.  This results in much shorter builds and a smaller number of files in each project to maintain.

Thanks,
Kyle

0 Kudos

398 Views
vfilip
NXP Employee
NXP Employee

Hi,

if you would like to stay with PE project, you could modify mqx_manifest.xml in KSDK (rtos\mqx\mqx_manifest.xml). This manifest file defines what files are added to the project for MQX_KSDK component when you press Generate Code button. Removing *.c files reference from this file could do the similar job for you.

rgds

VF

0 Kudos

398 Views
kylehamilton
Contributor II

Vojtech,

Your suggestion worked.  Thanks a lot.  I was able to add MQX_KSDK without bringing in all of the files (only kept the bsp files in the manifest).  Is there also a way to do this with KSDK, using the ksdk_platform_mqx library instead of compiling all of the fsl_.*_driver files local to the project?  I found the ksdk manifest file, but removing sources from it caused PE to have errors.  It seems like PE requires that there be sources.

Thanks!
Kyle

0 Kudos

398 Views
vfilip
NXP Employee
NXP Employee

Hi,

there is option in KSDK specific menu in project options (Right click on project -> Properties -> Processor Expert ). When you check a check-box source files from components marked as driver/hal/startup in ksdk_manifest.xml (in root) are not added to the project. Linking particular lib is user responsibility.

pastedImage_2.png

rgds

VF

0 Kudos

398 Views
kylehamilton
Contributor II

Vojtech,

I tried these settings previously with no success.  Checking the "startup_lib" box causes system_MK64F12.c to be excluded from the project, but checking "platform_lib" seems to have no effect.  I did a full directory tree compare on a project with this option selected against one without but found no differences.  All of the drivers are still being copied even though "platform_lib" is selected.

It seems like this feature is not working.  Have you tried it yourself?

Thanks,

Kyle

0 Kudos

397 Views
vfilip
NXP Employee
NXP Employee

Hi,

this options did not work correctly in 1.2. This bug has been fixed in 1.3, you can download it here:

https://freescale.flexnetoperations.com/control/frse/product?entitlementId=167373377&lineNum=1&authC...

We are sorry for inconvenience.

best regards

Vojtech Filip

0 Kudos