共1条
1/1 1 跳转至页
在torn2下创建多project的超级工程
下文讲述如何克服TornadoII工程管理的缺点
创建包括多个工程的超级工程
我有本文的示例代码, 有要的告诉我, 也可在网上找:)
====================================================
Multiple Projects
This is an instruction on how to overcome one of the shortcomings of the TornadoII Project Facility:
How can I link multiple Projects together to make one single SuperProject.
The setup may seem like too much work, but once it is done, it does not have to be changed unless another project or build.
The idea is to have a super project which includes other projects. The project file structure is as follows:
\myProject\superProject /* the super project directory */
\myProject\projectN /* n project directories */
\myProject\super_link /* a magic file to make a super project */
\myProject\superProject\super.mk /* another super project magic file */
The directory and file names for superProject, projectN, and workspace may be anything you want. However, whatever you change the name of superProject to, the file and directory names must match. Also, the build specification names must match for all projectN and superProject. The method for taking existing files and adding them to the project is as
follows:
1. Fire up Tornado II
2. Create the workspace and superProject:
File
Open Workspace
New
Create downloadable application modules for VxWorks
Name: superProject
Location: \target\proj\superProject
Workspace
Add to a New or Existing workspace
\target\proj\MyWorkspace.wsp
A Toolchain: (select one)
In the Files tab of the workspace
Select superProject
Right click to Add Files
Add superProject.c (this file may be empty, but must exist)
Right click to calculate Dependencies
3. Create each projectN
File
New project
New
Create downloadable application modules for VxWorks
Name: projectN
Location: \target\proj\projectN
Workspace
Add to current workspace
A Toolchain: (select one)
4. Add files to each projectN
In the Files tab of the workspace
Select projectN
Right click to Add Files
When all of the files have been added, right click on projectN to calculate Dependencies.
5. Modify build for superProject
In the Builds tab of the workspace double click on superProject Builds
In the Macros tab:
Change the name field to: SUB_PROJS
Change the value field to: project1 project2 ... projectN
Click Add/Set
Click Apply
In the Rules tab
Click New/Edit
Target: -include
Dependencies: ../super.mk
Uncheck Invoke this rule before building project
Click OK
Click New/Edit
Target: superProject.out
Dependencies: Super
Uncheck Invoke this rule before building project
Click OK
Make sure superProject.out is the visible Rule
Click Apply
Click OK
6. Modify each build for projectN
In the Builds tab of the workspace double click on projectN Builds
In the Macros tab change the name field to: include ../../super_link #
Erase the value field
Click Add/Set
Click Apply
Click OK
7. The Miracle
Copy the file super.mk into the superProject directory.
\myProject\superProject\super.mk /* another super project magic file */
Copy the file super_link into the directory above the projectN directories:
\myProject\super_link /* a magic file to make a super project */
8. Build
In the Files tab
Right click on each projectN (do these first)
Select Rebuild All
Right click on superProject (do this last)
Select Rebuild All
You can now download superProject.out.
Files may be added to any projectN or superProject without having to change any of the build specifications. Building the superProject executes each projectN make. This will recompile any projectN file that has been changed.
You can still build and download each projectN separately.
You can add additional builds to each projectN (for different architectures or the simulator). You can also have more than one superProject build. The only restriction is that there must be the same build name in each projectN (e.g. SIMNTgnu). Remember to add the Macros and Rules for each build if it is to be part of the superProject.
An example of this can be found here. It consists of 5 subprojects, each containing one file containing one function. It's supposed to be logical: project1 one contains file1, which contains a function called 'f1' printing "Function 1". Sorry, I know it is not very highly sophisticated, but it works. The superProject has the above described file 'superProject' containing one function 'super', which calls the functions of project1 to projet5. To control if it works, just compile all projects, then download subproject.out and run sp super. Now you should see the printouts of the functions of all subprojects.
关键词: torn2 创建 project 超级 工程 su
共1条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
与电子爱好者谈读图四被打赏50分 | |
与电子爱好者谈读图二被打赏50分 | |
【FRDM-MCXN947评测】Core1适配运行FreeRtos被打赏50分 | |
【FRDM-MCXN947评测】双核调试被打赏50分 | |
【CPKCORRA8D1B评测】---移植CoreMark被打赏50分 | |
【CPKCORRA8D1B评测】---打开硬件定时器被打赏50分 | |
【FRDM-MCXA156评测】4、CAN loopback模式测试被打赏50分 | |
【CPKcorRA8D1评测】--搭建初始环境被打赏50分 | |
【FRDM-MCXA156评测】3、使用FlexIO模拟UART被打赏50分 | |
【FRDM-MCXA156评测】2、rt-thread MCXA156 BSP制作被打赏50分 |