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 for how to download and install ModusToolbox, as well as to run the Eclipse IDE. As noted in the guide, when you first run the IDE, a dialog opens to specify the workspace.
Then, accept the License Agreement, and the Eclipse IDE opens with the Quick Panel and Console by default.
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.
Or, select File > New > ModusToolbox Application.
The Eclipse IDE displays a message and waits for the Project Creator tool to open.
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.
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.
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:
* . “ ‘ / \ [ ] : ; | = ,
Step 4: Create Application¶
Click Create to start creating the application. The tool displays various messages.
When the process completes, a message states that the application was created, and the Project Creator tool closes automatically.
After several moments, the application opens in the Eclipse IDE with the Hello_World project in the Project Explorer, with various files and directories. The README.md file opens in the file viewer/code editor where you can read the text.
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.
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
ModusToolbox > Device Configurator <version>.
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.
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.
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 Project Explorer, click on the Hello_World project. In the Quick Panel, click the “Build Hello_World Application” link. Build information will display in the Console pane.
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.
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.
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.
In the Project Explorer, select the Hello_World application. Then, in the Quick Panel, click the “Hello_World Program (KitProg3_MiniProg4)” link.
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.
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.
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.
For more information about the Eclipse IDE, refer to the following:
Eclipse IDE for ModusToolbox User Guide – This provides more details about features added to the ModusToolbox version of the Eclipse IDE.
Eclipse IDE Survival Guide – This provides a FAQ about how to use Eclipse to perform common tasks.
Eclipse Workbench User Guide – This provides more details about the generic Eclipse environment.
For more information about ModusToolbox software, refer to the ModusToolbox User Guide.