www.gusucode.com > rtwdemos 工具箱matlab源码程序 > rtwdemos/rtwdemo_pcgd_Install_External_Tools_script.m
%% Installing and Using Cygwin(TM) and Eclipse(TM) % % This example shows how to use Eclipse(TM), a free software integration % development environment (IDE). You can use Eclipse(TM), and Cygwin(TM), % a free compiler, for examples in the modules *Integrating Generated % Code into the External Environment* and *Testing the Generated Code*. % %% Create a New CDT Managed Make C Project % % *1.* Select *File > New > Project*. % % <<New_Project.jpg>> % % *2.* In the New Project dialog, click *C > Managed Make*. % % <<ManagedMake.jpg>> % % *3.* Name the project |PCG_Eval_P5_Eclipse| and set the location to the build folder. % % <<NameAndLocation.jpg>> % % *4.* Set *Project Type* to |Executable (Gnu on Windows)|. % % <<ExecType.jpg>> % %% Configure the Debugger % % *1.* Select *Run > Debug*. % % <<RunDebug.jpg>> % % *2.* Click *C/C++ Local Application* node. % % <<NewConfig.jpg>> % % *3.* Click the *Start New Configuration* toolbar button. % % *4.* Select project name *PCG_Eval_P5_Eclipse* under *C/C++ Local Application*; the name gets populated in the *Name* field. % % *5.* Select the executable file. % %% Start the Debugger % % *1.* Click the *Debug* toolbar button and, from the menu, select project |PCG_Eval_P5_Eclipse|. % % <<StartTheDebugger.jpg>> % % *The first time you run Eclipse(TM), you will get an error related to the Cygwin path.* % % <<CygwinPathError.jpg>> % % *2.* Click |Edit Source Lookup Path|. % % <<AddPathMapping.jpg>> % % *3.* Click *Add* % % *4.* Select *Path Mapping* and click *OK*. % % <<SelectPathMapping.jpg>> % % *5.* Select *Path Mapping*. % % *6.* Click *Edit*. % % *7.* Click *Add*. % % *8.* Type |\cygdrive\c\| in the *Compilation path* field. % % *9.* Type *c:\* in the Local file system path. % %% Use Eclipse(TM) Commands % % * *F5*: Step into % * *F6*: Step over % * *F7*: Step out % * *F8*: Resume % * *Ctrl+Shift+B*: Toggle break point % %% % % Copyright 2007-2013 The MathWorks, Inc.