Getting started
This section provides a basic walkthrough for how to create a couple applications using the IDE, selecting a BSP. It also covers how to build and program them using the IDE and basic launch configurations supplied for the applications.
Installing Eclipse IDE
Beginning with the ModusToolbox™ tools package version 3.4.0, the Eclipse IDE for ModusToolbox™ is no longer included by default. Instead, it is a separate package that you can install via the ModusToolbox™ Setup program.
The Setup program is located on our website here: https://softwaretools.infineon.com/tools/com.ifx.tb.tool.modustoolboxsetup. It is used to install base packages and additional packages on Windows, Linux, and macOS. Refer to the
ModusToolbox™ software installation guide
for specific instructions.
Launch Eclipse IDE
The Eclipse IDE is installed in the following directory, by default:
C:\Users<UserName>\Infineon\Tools\ModusToolboxEclipse
Note:
If the software is not installed in the default location, you will need to set an environment variable. Refer to the
ModusToolbox™ software installation guide
for details.
To launch the Eclipse IDE:
On Windows, select the Eclipse IDE for
ModusToolbox™ <version> item
from the
Start
menu.
For other operating systems, run the "modustoolbox" executable file.
You can also launch Eclipse IDE from the dashboard for all operating systems. For more information refer to the
dashboard user guide
.
When launching the Eclipse IDE, it provides an option to select the workspace location on your machine. This location is used by the IDE for creating and storing the files as part of application creation for a particular platform. The default workspace location is a folder called "mtw" in your home directory. You may add additional folders under the "mtw" folder or to choose any other location for each workspace.
For more details about Eclipse, refer to the Eclipse documentation, as well as the
Eclipse survival guide
.
Open Project Creator tool
Click the
New Application
link in the Eclipse IDE Quick Panel.

You can also select
File > New > ModusToolbox™ Application
.

These commands launch the Project Creator tool, which provides several applications for use with different development kits. The kits available may change over time.

For more details about using this tool, refer to the
Project Creator user guide
.
Create an application
This section provides a walkthrough for creating a ModusToolbox™ application.
Choose board support package
The Project Creator tool displays a list of boards, showing the Kit Name, MCU, and Connectivity Device (if applicable). As you select each of the kits shown, the description for that kit displays on the right. Depending on the settings for your system, you may see different categories, including PSoC™ 4, PSoC™ 6, and AIROC™ Bluetooth® BSPs. For this example, select the CY8CKIT-062-WIFI-BT kit.

Select application
Click
Next >
to open the Select Application page. This page lists various applications available for the selected kit. As you select an application, a description displays on the right. You can select multiple applications for the selected BSP by enabling the check box next to the applicable applications.

For this example:
Select the check box next to the "Hello World" application.
If desired, type a name for the application and/or BSP. Do not use spaces.
Create application
Click
Create
to begin the application creation process.

Note:
The application creation process performs a
git clone
operation, and downloads the selected application from the GitHub website. Depending on the selected application, this process can take several minutes.
When complete, the Project Creator tool closes automatically if there are no errors or warnings. If there are warnings only, click
Close
and the application will open in the IDE. In the IDE, a message will display about importing the project:

If there are errors, project creation will fail.
After several moments, the application opens with the Hello_World in the
Project Explorer
, and the
README.md
file opens in the file viewer.

Note:
Many AIROC™ Bluetooth® applications contain multiple projects. For example, the BLE-20819EVB02 application contains projects for Bluetooth® Low Energy services such as anc, ans, bac, bas, beacon, etc.
Build application
After loading an application, build it to generate the necessary files. Select a project. Then, in the Quick Panel, click the
Build Application
link. The following images show the Quick Panel for a typical PSoC™ MCU application and an AIROC™ Bluetooth® application.
Messages display in the Console, indicating whether the build was successful or not. For more details about building applications and the various Consoles available, see the
Build applications
chapter.

Program application
There are many more details about programming an application. This section only covers it briefly. For more detailed information, see the
Program and debug
chapter.
In the Project Explorer, select the desired project. Then, in the Quick Panel, click the
<app-name> Program (KitProg3_MiniProg4)
link for a PSoC™ MCU application, and
<app-name> Program
for an AIROC™ Bluetooth® application.

Export/share application
There are several ways to share a ModusToolbox™ application. Refer to the
ModusToolbox™ tools package user guide
in the "Version Control and sharing applications" chapter for more general details.
Using the Eclipse IDE, you can use the export function to essentially make a copy of your application that you can share with a colleague. There are several ways to export using Eclipse. The option we recommend is to select the application and then use
File > Export > General > Archive File
, which creates a ZIP file.

Keep in mind that a typical ModusToolbox™ application includes many libraries that are available on GitHub. These get regenerated during the make getlibs command. Therefore, you can substantially reduce the size of your exported application by excluding the libraries. Plus, the exported
mtb_shared
folder might retain hard-coded paths that would cause issues after importing the application.
For multi-core applications, the Eclipse IDE export function shows the core project folders along side the main application folder. These project folders are included in that main application folder, so you should exclude them from the export process as well.
On the Export dialog, select only the main application folder(s) to export. You may need to review your application in Eclipse to determine which folders you should exclude. By default, subproject folders include an extension after the application name.

Note:
Ignore the extra project folders shown at the bottom of the window under the destination archive files. They are a byproduct of the Eclipse IDE and unnecessary to the export process.
Click
Browse…
to navigate to the location to save the archive and provide a file name.
Click
Finish
to generate the archive file.
Note:
Make sure build, libs, and mtb_shared are not selected to exclude them from the archive.
Import application
If you have a ModusToolbox™ application that you want to import into the Eclipse IDE, run the make getlibs command before importing it into Eclipse.
Note:
If the application is included in a ZIP file, you will need to extract it before running various commands.
Then, either use the
Import Existing Application In-Place
link on the Quick panel or open through the
File > Import ModusToolbox™ > Import Existing Application In-Place
option.
Note:
This option does not copy or move the application location on disk; it only makes a reference for Eclipse to the current application location.

On the next page, click the
Browse…
button, navigate to the application directory, and click
Select Folder
.

Click
Finish
to begin the import process. This will take a few moments, and then the application will display in the Eclipse IDE Project Explorer.
If the Console displays a message, such as "Error creating Eclipse configurations," open the Library Manager and click
Update
. This runs the
make getlibs
operation to generate the necessary files and libraries.
Note:
There are various ways to import examples into Eclipse. If you prefer a different method, make sure that all of the project files are copied into the workspace directory.
Search online for code examples
Infineon provides many code examples. These examples allow you to explore the capabilities provided by the SDK, create applications based on them, examine the source code demonstrated in them, and read their associated documentation. The Quick Panel provides a link to access online code examples. Click the
Search Online for Code Examples
link. This opens a web browser to the GitHub repository to select and download the appropriate examples.

Search online for libraries/BSPs
Infineon also provides all the libraries and BSPs online at GitHub. The Quick Panel provides a link to access these. Click the
Search Online for Libraries and BSPs
link. This opens a web browser to the GitHub repository that shows the ModusToolbox™ software page.

Access training material
Infineon also provides training material at GitHub. The Quick Panel provides a link to access these. Click the
Training Material
link. This opens a web browser to the GitHub repository that shows the ModusToolbox™ training page.
