1. ModusToolbox Installation
I use Linux machine for most of my projects. To be specific, it's Ubuntu 18.04 LTS. I already had ModusToolbox v2.2 and v2.3 installed but I noticed there's a new version 2.4 available. Thus I downloaded it from here and installed it. The installation is very straightforward if you follow the installation guide. One of the great features of ModusToolbox is you can install multiple versions on the same machine and can still use each of them.
Update KitProg3 Firmware
After you install ModusToolbox, you may need to update the firmware of KitProg3 - the on-board programmer/debugger. You can first check your firmware version using the following command from tools_2.4/fw-loader/bin folder
$ ./fw-loader --device-list
Cypress Firmware Updater, Version: 3.3.0.1370
(C) Copyright 2018-2021 by Cypress Semiconductor Corporation (an Infineon company)
All Rights Reserved
Info: Start API initialization
Info: Connected - KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400
Info: Hardware initialization complete 458 ms
Warning: The KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400 device supports bridging over HID protocol only. The data transfer rate will be significantly higher if you upgrade to the newer firmware version with USB Bulk bridging enabled.
Connected supported devices:
1: KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400 FW Version 2.00.809 [outdated]
Warning: Firmware on KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400 device(s) is outdated. Use --update-kp3 [device-name|all] to update.
You can see my firmware is out of date. Using the following command can update the firmware:
$ ./fw-loader --update-kp3
Cypress Firmware Updater, Version: 3.3.0.1370
(C) Copyright 2018-2021 by Cypress Semiconductor Corporation (an Infineon company)
All Rights Reserved
Info: Start API initialization
Info: Connected - KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400
Info: Hardware initialization complete 473 ms
Found KP firmware image: "/home/cm/ModusToolbox/tools_2.4/kp-firmware/kitprog3.cyacd"
Warning: The KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400 device supports bridging over HID protocol only. The data transfer rate will be significantly higher if you upgrade to the newer firmware version with USB Bulk bridging enabled.
Device 'KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400' opened successfully
Info: Kit FW is 'KitProg3' ver. 2.00 b809. Upgrade file is 'KitProg3' ver. 2.30 b1155.
Info: Disconnected - KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400
Info: Connected - KitProg3 Bootloader-A40002151D1E2A94
Info: Bootloader Version: Major 1, Minor 1, Build 60
Info: FW Upgrade to version: 2.30 b1155
Info: Bootloading of KitProg FW...
Info: Verifying of KitProg FW...
Info: Bootloading of DAPLink...
Info: Verifying of DAPLink...
Info: Upgrade completed
Info: Disconnected - KitProg3 Bootloader-A40002151D1E2A94
Info: Connected - KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400
FW update completed successfully
Check the firmware version again
$ ./fw-loader --device-list
Cypress Firmware Updater, Version: 3.3.0.1370
(C) Copyright 2018-2021 by Cypress Semiconductor Corporation (an Infineon company)
All Rights Reserved
Info: Start API initialization
Info: Connected - KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400
Info: Hardware initialization complete 460 ms
Connected supported devices:
1: KitProg3 CMSIS-DAP BULK-1E1D15A4002A9400 FW Version 2.30.1155
Now, the firmware is updated to the latest version (no [outdated] mark anymore).
2. “Hello World” Application
Creating a new application in ModusToolbox IDE is very simple. Just a few steps we can easily run the "Hello World" application on PSoC 6S2 + AIROC Wi-Fi/BT kit.
Create a New Application
Start with the New Application button in the Quick Panel as shown below.
Choose the correct kit - CY8CKIT-062S2-43012 in the Project Creator window
Check on the Hello World template followed by clicking on Create button.
The new application is created and shows up in the Project Explorer tab.
Serial Terminal inside IDE
ModusToolbox version 2.4 added a new feature - you can open a serial terminal inside the IDE. Thus you don't need an external terminal software such as putty, minicom, tera term, etc. To set up the serial terminal is pretty simple. Click on Terminal tab at the lower window frame, Open Terminal button() should show up at the right hand side.
Click on this button, the terminal set up window should show up. Use the highlighted settings below then click OK button.
A new terminal window titled with the serial port name will show up.
You can change the terminal's color. In my case, I checked the box "Invert terminal colors" so the background become black and text white.
Obviously, you can also use external terminal software if you wish.
Build & Run Application
After opening the serial terminal, you can build and run the application by simply clicking on the button shown below.
Here's the output on the serial terminal after running the application.
I really like ModusToolbox software because
1. Very easy to use;
2. Lot of template/example projects;
3. Smoothly upgrade component's version;
4. Painlessly updating project to use new ModusToolbox version;
5. Easy migration from one hardware to another.