| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | |
| 3 | <html> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> |
| 6 | <meta http-equiv="Content-Style-Type" content="text/css"> |
| 7 | <link rel="STYLESHEET" href="MakeProjectCreator.css" charset="ISO-8859-1" |
| 8 | type="text/css"> |
| 9 | |
| 10 | <title>MPC: WB26 Project Type</title> |
| 11 | </head> |
| 12 | |
| 13 | <body> |
| 14 | <div> |
| 15 | <h1 class="Head1">WB26 Project Type documentation</h1> |
| 16 | |
| 17 | <div> |
| 18 | <p class="Body"> |
| 19 | Starting with ACE/TAO x.6.3 it is possible to generate project files |
| 20 | for the WindRiver Workbench version 2.6 (VxWorks 6.4). We have validated |
| 21 | the MPC support for the ACE lib, TAO libs and the TAO tests. |
| 22 | </p> |
| 23 | <p class="Body">With VxWorks we have to do a cross build. The first step is to setup a host |
| 24 | build, from this host build we use the gperf and TAO_IDL tools |
| 25 | in the cross build. |
| 26 | </p> |
| 27 | <p class="Body">The Workbench is using eclipse as framework and then has several |
| 28 | WindRiver specific extensions. Part of the generation done by |
| 29 | MPC is then specifically for the WindRiver tools, part is for the |
| 30 | eclipse environment. The Workbench uses the fixed project filenames |
| 31 | <em class="Code">.project</em>, <em class="Code">.wrproject</em>, and <em class="Code">.wrmakefile</em>. |
| 32 | In the <em class="Code">.project</em> file the files in the project are listed, |
| 33 | in the <em class="Code">.wrproject</em> the compiler and linker flags are |
| 34 | defined, and in the <em class="Code">.wrmakefile</em> the custom build rules |
| 35 | are defined, like triggering the IDL compiler.</p> |
| 36 | <p class="Body">By default the files are generated in the same directory as the MPC file. |
| 37 | When you have multiple projects in one directory you have to add |
| 38 | <em class="Code">-make_coexistence</em> to the invocation of <em class="Code">mwc.pl</em> |
| 39 | Then for each project a new subdirectory will be created to |
| 40 | store the files the workbench needs. If you run <em class="Code">mwc.pl -make_coexistence</em> from the |
| 41 | ACE_wrappers directory you will get a lot of subdirectories in your tree. |
| 42 | </p> |
| 43 | <p class="Body"> |
| 44 | By default we generate for the flexible build support, when you want to use |
| 45 | standard build use <em class="Code">-value_template standard_build=1</em>. |
| 46 | </p> |
| 47 | <p class="Body"> |
| 48 | To get a project with all dependencies create a new workspace file, f.e. vxworks.mwc |
| 49 | <blockquote> |
| 50 | <p class="Code">workspace(vxworks) {</p> |
| 51 | <p class="Code"> ace</p> |
| 52 | <p class="Code"> TAO/tao</p> |
| 53 | <p class="Code"> TAO/tests/Hello</p> |
| 54 | <p class="Code">}</p> |
| 55 | </blockquote> |
| 56 | </p> |
| 57 | <p class="Body"> |
| 58 | You should generate the project files |
| 59 | from a VxWorks development shell or should have executed the wrenv script. With x.6.4 or newer |
| 60 | you do execute: |
| 61 | <blockquote> |
| 62 | <p class="Code">set ACE_ROOT=your_path</p> |
| 63 | <p class="Code">cd %ACE_ROOT%</p> |
| 64 | <p class="Code">perl %ACE_ROOT%\bin\mwc.pl vxworks.mwc -type wb26 -make_coexistence</p> |
| 65 | </blockquote> |
| 66 | </p> |
| 67 | <p class="Body"> |
| 68 | After you have generated the project files you have to import them |
| 69 | into your current Workbench workspace with the following steps |
| 70 | <ul> |
| 71 | <li><p class="Body">Open the workbench</p></li> |
| 72 | <li><p class="Body">Select File, Import, General, Existing Projects into Workspace</p></li> |
| 73 | <li><p class="Body">Select your ACE_ROOT directory and let the Workbench search for projects</p></li> |
| 74 | <li><p class="Body">Select now the projects you want to import in the Projects list and select Finish</p></li> |
| 75 | <li><p class="Body">After importing close the workbench</p></li> |
| 76 | <li><p class="Body">Copy the prefs file to its location, see below</p></li> |
| 77 | <li><p class="Body">Start the workbench again</p></li> |
| 78 | </ul> |
| 79 | </p> |
| 80 | <p class="Body">The build order of the projects is stored in an eclipse file that |
| 81 | is generated as workspace by the <em class="Code">wb26</em> generator. After |
| 82 | you have imported the projects into the Workbench close it and then |
| 83 | copy the generated <em class="Code">org.eclipse.core.resources.prefs</em> file to |
| 84 | the <em class="Code">.metadata\.plugins\org.eclipse.core.runtime\.settings</em> |
| 85 | directory of the Workbench and then restart the workbench again. Do note |
| 86 | that the build order can only be generated for the projects that are listed |
| 87 | in the MPC workspace. The other option is to use subprojects to which |
| 88 | you can enable with <em class="Code">-value_template enable_subprojects=1</em>. There is a bug |
| 89 | in Workbench 2.6/3.0 related to the build order, it is ignored if you use |
| 90 | <em class="Code">wrws_update</em> to build the workspace from the commandline.</p> |
| 91 | <p class="Body">When compiling TAO you need to have tao_idl and gperf available. You can copy tao_idl and |
| 92 | gperf manually to the ACE_wrappers\bin directory of your target build or you can specify an |
| 93 | alternative tao_idl when generating the workspace like below. |
| 94 | <blockquote> |
| 95 | <p class="Code">perl %ACE_ROOT%\bin\mwc.pl vxworks.mwc -type wb26 -value_template tao_idl=$(HOST_TAO_IDL)</p> |
| 96 | <p class="Code">perl %ACE_ROOT%\bin\mwc.pl vxworks.mwc -type wb26 -value_template tao_idl=c:\tmp\tao_idl</p> |
| 97 | </blockquote> |
| 98 | </p> |
| 99 | <p class="Body">When using the <em class="Code">-expand_vars</em> by default only the environment variables which match |
| 100 | the wildcard <em class="Code">*_ROOT</em> are expanded. If you want to get other environment variables expanded (like <em class="Code">WIND_BASE</em>) |
| 101 | you can specify these through the <em class="Code">-relative</em> argument or use a file that you specify with <em class="Code"> |
| 102 | -relative_file</em>. For example you can use the following relative_file which expands the environment variables |
| 103 | listed. |
| 104 | <blockquote> |
| 105 | <p class="Code">*_ROOT</p> |
| 106 | <p class="Code">TAO_ROOT, $ACE_ROOT/TAO</p> |
| 107 | <p class="Code">CIAO_ROOT, $TAO_ROOT/CIAO</p> |
| 108 | <p class="Code">*_BASE</p> |
| 109 | </blockquote> |
| 110 | </p> |
| 111 | <p class="Body"> |
| 112 | We do have some limitations at this moment because of restrictions in MPC or the Workbench. We are working |
| 113 | on resolving the MPC restrictions, the Workbench restrictions have been reported to WindRiver and are already |
| 114 | converted to enhancement requests. It is important to get these enhancement requests implemented by |
| 115 | WindRiver. As user you can have impact on the importancy of these enhancement requests, create a new TSR |
| 116 | for WindRiver and ask WindRiver to implement these enhancement requests. Pleas let us know that you have |
| 117 | done this so that we can inform our local WindRiver contacts. We also have a large list of POSIX enhancement |
| 118 | requests, if you are interested in more POSIX compliance contact us to get this list. |
| 119 | </p> |
| 120 | <ul> |
| 121 | <li><p class="Body">You need to close the workbench when generating the project files. The WB doesn't detect that the .project/.wrproject/org.eclipse.core.resources.prefs files got changed on disk (WIND00116553)</p></li> |
| 122 | <li><p class="Body">You need to import, close, and then change the build order file (WIND00116553)</p></li> |
| 123 | <li><p class="Body">When using includes/recursive_includes do not use . as path, but an environment variable which can be expanded to a full path (combined WB/MPC restriction)</p></li> |
| 124 | <li><p class="Body">We need to generate full paths in the .project file because WB doesn't support relative files like ../MyHeader.h (WIND00116641)</p></li> |
| 125 | <li><p class="Body">There is no dependency between the IDL file and the resulting *C.{h,cpp,inl} and *S.{h,cpp,inl} files. This is because the IDL compiler |
| 126 | can't be integrated as a real build tool because a custom clean step can't be defined (WIND00117037)</p></li> |
| 127 | </ul> |
| 128 | </p> |
| 129 | |
| 130 | </div> |
| 131 | <hr> |
| 132 | |
| 133 | </body> </html> |