解決済! 解決策の投稿を見る。
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
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
Thanks for your replay Martin. I'll tray out your steps. Thanks also for your IAR guide.
Regards,
Ron S
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
Thread bump...
Anyone else an idea how to work with a version controlled environment? For more information see my last post.
Thanks
Ron S
Hi Ron,
It might be theoretically possible but we have never done it. If you test it , share the results with us.
Regards,
MartinK