Eclipse IDE for ModusToolbox® Quick Start Guide

ModusToolbox software is a set of tools that support Cypress device configuration and application development. These tools enable you to integrate Cypress devices into your existing development methodology.

This guide provides a quick walkthrough for using the Eclipse IDE provided as part of ModusToolbox. If you wish to use other IDEs, such as VS Code, IAR, or µVision, refer to the “Export to IDEs” chapter in the ModusToolbox User Guide

Download/Install ModusToolbox and Run Eclipse IDE

Refer to the instructions in the ModusToolbox Installation Guide. After you accept the License Agreement, the Eclipse IDE opens a dialog to specify the workspace. Then, it opens with an empty Project Explorer by default.

image0

This guide focuses on these areas of the Eclipse IDE:

  • The Project Explorer contains the application folders and files.

  • The Quick Panel provides links to tool commands and documentation.

  • The Console displays various messages when updating the application in some way (building, programming, etc.)

Create New Application

Creating an application includes several steps, as follows:

Step 1: Open Project Creator Tool

In the Quick Panel, click the “New Application” link.

image1

Or, select File > New > ModusToolbox Application.

image2

The Eclipse IDE displays a message and waits for the Project Creator tool to open.

image3

Step 2: Choose Board Support Package (BSP)

When the Project Creator tool opens, click on the Kit Name; see the description for it on the right. For this example, select the CY8CKIT-062-WIFI-BT kit. The following image is an example; the precise list of boards available in this version of ModusToolbox will reflect the platforms available for development.

image4

Step 3: Select Application

Click Next > to open the Select Application page. This page displays example applications, which demonstrate different features available on the selected BSP. In this case, the CY8CKIT-062-WIFI-BT provides the PSoC 62 MCU and the CYW4343W WiFi + Bluetooth Combo Chip. You can create examples for PSoC 6 MCU resources such as CapSense and QSPI, as well as numerous examples for AnyCloud connectivity.

For this example, select Hello World from the list. This example exercises the PSoC 6 MCU to blink an LED.

image5

Note

The actual application names available might vary.

Type a name for your application or leave the default name. Do not use spaces in the application name. Also, do not use common illegal characters, such as:

* . “ ‘ / \ [ ] : ; | = ,

image10

Step 4: Create Application

Click Create to start creating the application. The tool displays various messages.

image6

When the process completes, a message states that the application was created, and the Project Creator tool closes automatically.

Then, the IDE displays a message that the project is being imported.

image7

After several moments, the application opens with the Hello_World project in the Project Explorer, and the README.md file opens in the file viewer.

image8

Add/Modify Application Code

Code example applications work as they are, and there is no need to add or modify code in order to build or program them. However, if you want to update and change the application to do something else, open the appropriate file in the code editor.

Double-click the main.c file to open it.

image9

As you type into the file, an asterisk (*) will appear in the file’s tab to indicate changes were made. The

Save/Save As commands will also become available to select.

View Device Resources

To view peripherals, pins, clocks, etc., open the Device Configurator. Right-click on the project folder and select

image10

The Device Configurator provides access to the BSP resources and settings. Each enabled resource contains one or more links to the related API documentation. There are also buttons to open other configurators for CapSense®, QSPI, Smart I/O™, etc.

Note

If you make changes to settings in any of these configurators, you are making changes to a standard BSP library, which will cause the repo to become dirty. Additionally, if the BSP is in the shared asset repository, changes will impact all applications that use the shared BSP. If you wish to make changes, you should first copy the configuration information to the application and override the BSP configuration or create a custom BSP. For more information, refer to the ModusToolbox User Guide.

Note

The Device Configurator cannot be used to open Library Configurators, such as Bluetooth and USB.

For more information, refer to the Device Configurator Guide, which is also available by selecting View Help from the tool’s Help menu.

Build the Application

Building the application is not specifically required, because building will be performed as part of the programming and debugging process. However, if you are running the Eclipse IDE without any hardware attached, you may wish to build your application to ensure all the code is correct.

In the Quick Panel, click the “Build Hello_World Application” link. Build information will display in the Console pane.

image11

If you have the Hello_World project selected, you can also select Build Project from the Project menu or from the right-click menu. The Eclipse menus change based on what you have selected in the Project Explorer.

image12

Program the Device

There are several different “Launch Configurations” for programming and debugging the various development kits and starter applications within the Eclipse IDE. These Launch Configurations provide details about how to configure the application. This section provides a brief walkthrough for programming this example. For more details about other Launch Configurations and settings, refer to the Eclipse IDE for ModusToolbox User Guide, “Program and Debug” chapter.

Connect the Kit

Follow the instructions provided with the CY8CKIT-062-WIFI-BT kit to connect it to the PC with the USB cable.

Note

This kit’s firmware may be set to KitProg2. To use this kit with the ModusToolbox software, you must upgrade the firmware to KitProg3. Refer to the KitProg3 User Guide for more details.

Program

In the Project Explorer, select the Hello_World application. Then, in the Quick Panel, click the “Hello_World Program (KitProg3_MiniProg4)” link.

image13

If needed, the IDE builds the application and messages display in the Console. If the build is successful, device programming starts immediately. If there are build errors, then error messages will indicate as such. When complete, the LED will start blinking.

image14

Debug the Program

As mentioned under the Program the Device section in this document, there are many different Launch Configurations for different kits and applications. This section provides a brief walkthrough for debugging this example. For more details about other Launch Configurations and settings, refer to the Eclipse IDE for

ModusToolbox User Guide, “Program and Debug” chapter.

In the Project Explorer, select the Hello_World application. Then, in the Quick Panel, click the “Hello_World Debug (KitProg3)” link under Launches.

image15

If needed, the IDE builds the application and messages display in the Console. If the build is successful, the IDE switches to debug mode automatically. If there are build errors, then error messages will indicate as such.

image16

Next Steps

For more information about the Eclipse IDE, refer to the following:

For more information about ModusToolbox software, refer to the ModusToolbox User Guide.