This example shows how to use Eclipse™, a free software integration development environment (IDE). You can use Eclipse™ and Cygwin™, a free compiler, for Embedded Coder example modules Integrate Generated Code into External Environment and Test Generated Code.
1. Launch Eclipse.
2. Select File > New > C Project.
3. Use the C Project dialog to:
a. Enter the project name,
b. Select the project location,
c. Select the project type as Makefile,
d. Select the Cygwin GCC toolchain, and click Finish.
4. Select Project > Properties and click Advanced settings to:
a. Select the C/C++ Build properties,
b. Select Generate Makefiles automatically from the Builder Setting tab,
c. Select the Behaviour tab, and
d. Enable Build on resource save (Auto build).
5. Compile generated code with Eclipse.
After you define the files, Eclipse determines the main function builds the project with the managed make environment. The build details appear in the Console window.
1. Select Run > Debug Configurations
2. Use the Debug Configurations dialog to:
a. Select C/C++ Application,
b. Select the new configuration button, and
c. Select the project.
d. Choose Apply (but not Run).
If required, select the executable. Eclipse auto finds the exe file.
3. Select Run > Debug from main window to start the debugger.
The Cygwin environment creates a virtual drive,
/cygdrive/c/ during the build process. To run the debugger, Eclipse either remaps the drive or locates the files. After locating the first file, Eclipse automatically finds the remaining files.
4. Run the debugger on generated code.
These commands are also available from the debugger context menu:
F5: Step into
F6: Step over
F7: Step out
Ctrl+Shift+B: Toggle break point
Ctrl+Shift+R: Run to line
Shift+F5: Use Step Filters