Setup an independent MQX project

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

Setup an independent MQX project

Jump to solution
1,471 Views
K70_Beginner
Contributor I
Hello I'm new with MQX programming and I have to setup an independent MQX project for a K70 controller so that there are no links to the installed MXQ library files. I basically wanna have a copy of my customized library in my workspace. The reason is that we are using a source code repository and each developper should get out the same configured MQX library. Does someone have an idea how I have to do this? According to the freescale readme files it is not recommended to make a copy of the library because of possible compiling problems. I started with the CW 10.2 suite, but we also evaluate the IAR suite. Thanks for any help.
0 Kudos
Reply
1 Solution
996 Views
c0170
Senior Contributor III

Hi K70_Beginner,

 

I advise you to check any of the mqx example. It's quite intuitive if you check it first provided example then create your own one. Build your MQX libraries and copy them to the project folder (libraries are located in MQX ROOT/lib).

 

Create project through Wizard in CW 10.2 ( Create MQX 3.8 Project).

This project is generated with paths to the MQX_ROOT (C/C++ general - Paths and symbols). You have to remove MQX_ROOT and replace it with path to your project. I use for example variable ${ProjDirPath} ("${ProjDirPath}/../mqx_lib/twrk70f120m.cw10/bsp"). You find this settings in project properties.

Next step is to replace MQX_ROOT in Linker and Compiler settings in CW10.2. Example provided in brackets :

C/C++Build - Settings - Tool Settings (tab) - Linker - Input - LIBRARY SEARCH PATHS (("${ProjDirPath}/../mqx_lib/twrk70f120m.cw10/bsp")

C/C++Build - Settings - Tool Settings (tab) - Linker - Input - ADDITIONAL LIBRARIES ("psp_twrk70f120m_d.a")

Set linker command file  to .ICF file from bsp folder.

 

Same procedure for search paths in the C/C++Build - Settings - Tool Settings (tab) - Compiler - Input.

 

 

IAR:

Create new project.

Use variable $PROJ_DIR$ to include your libraries.

C/C++ Compiler - Preprocessor (tab) - Additional incclude directories : Place here all folders where are your libs and code ($PROJ_DIR$\..\mqx_lib\twrk70f120m.iar\bsp)

Set linker configuration file in linker - config (tab) to .ICF file from bsp folder. Check override default and include the path.

Link the builded MQX libraries into your project.

 

If any problems, reply and i'll edit this post to be clear and simple to understand.

 

Regards,

Martin K

 

View solution in original post

0 Kudos
Reply
5 Replies
997 Views
c0170
Senior Contributor III

Hi K70_Beginner,

 

I advise you to check any of the mqx example. It's quite intuitive if you check it first provided example then create your own one. Build your MQX libraries and copy them to the project folder (libraries are located in MQX ROOT/lib).

 

Create project through Wizard in CW 10.2 ( Create MQX 3.8 Project).

This project is generated with paths to the MQX_ROOT (C/C++ general - Paths and symbols). You have to remove MQX_ROOT and replace it with path to your project. I use for example variable ${ProjDirPath} ("${ProjDirPath}/../mqx_lib/twrk70f120m.cw10/bsp"). You find this settings in project properties.

Next step is to replace MQX_ROOT in Linker and Compiler settings in CW10.2. Example provided in brackets :

C/C++Build - Settings - Tool Settings (tab) - Linker - Input - LIBRARY SEARCH PATHS (("${ProjDirPath}/../mqx_lib/twrk70f120m.cw10/bsp")

C/C++Build - Settings - Tool Settings (tab) - Linker - Input - ADDITIONAL LIBRARIES ("psp_twrk70f120m_d.a")

Set linker command file  to .ICF file from bsp folder.

 

Same procedure for search paths in the C/C++Build - Settings - Tool Settings (tab) - Compiler - Input.

 

 

IAR:

Create new project.

Use variable $PROJ_DIR$ to include your libraries.

C/C++ Compiler - Preprocessor (tab) - Additional incclude directories : Place here all folders where are your libs and code ($PROJ_DIR$\..\mqx_lib\twrk70f120m.iar\bsp)

Set linker configuration file in linker - config (tab) to .ICF file from bsp folder. Check override default and include the path.

Link the builded MQX libraries into your project.

 

If any problems, reply and i'll edit this post to be clear and simple to understand.

 

Regards,

Martin K

 

0 Kudos
Reply
996 Views
K70_Beginner
Contributor I

Thanks for your replay Martin. I'll tray out your steps. Thanks also for your IAR guide.

 

Regards,

Ron S

0 Kudos
Reply
996 Views
K70_Beginner
Contributor I

Hi Martin

 

Your solution seams to work for precompiled libraries. Is there a possibility to include the source code of MQX

in the same project as our application source code and compile it each time? We want to work in a version controlled environment and therefore we plan to use Microsoft Visual Source Safe 2005. If we only copy the precompiled libraries to our application directory we loose the connection to the MQX source code and it would be difficult to set up a fail safe build environment. Specially if we have to change something in the source code of the MQX library (bug etc.)

 

Thanks for any reply

 

Ron S

0 Kudos
Reply
996 Views
K70_Beginner
Contributor I

Thread bump...

 

Anyone else an idea how to work with a version controlled environment? For more information see my last post.

 

Thanks

 

Ron S

0 Kudos
Reply
996 Views
c0170
Senior Contributor III

Hi Ron,

 

It might be theoretically possible but we have never done it. If you test it , share the results with us.

 

Regards,

MartinK

0 Kudos
Reply