This section describes how to work with ModusToolbox™ applications using the Infineon ModusToolbox™ for VS Code extension. The extension provides a graphical interface for creating projects, building, programming, debugging, and managing tools and content, without having to use the command line.
When you have a ModusToolbox™ application loaded in VS Code, you can use various tabs and commands to Build, Program, and Debug the application. You can also open additional tools such as Device Configurator to configure your application with device settings and firmware, as well as the Library Manager to add and remove firmware libraries.
Main page
To open the extension's main page, run the Infineon ModusToolbox™: Show Main Page command from the Command Palette, or click the ModusToolbox™ Assistant button in the editor title bar. By default, the main page appears automatically when a ModusToolbox™ application is loaded; you can change this behavior in the settings so that it always opens, or never opens automatically. The page uses a tabbed layout and follows the VS Code dark or light theme.
The main page provides the following tabs:
- Getting Started – orientation, quick actions, and a feature overview.
- Create Project – a guided wizard for creating new applications.
- Recently Opened – reopen applications you have used recently.
- Application – project health, build, program, debug, and memory usage for the loaded application.
- Development Kits – connected kits and BSP association.
- Local Content Storage – manage BSP and middleware content for offline use.
- Settings – extension and workspace preferences.
- Glossary – ModusToolbox™ terminology and definitions.
- User Guide – this built-in documentation.
AI Assistant
The ModusToolbox™ Assistant extension integrates with the Infineon ModusToolbox™ AI Assistant to provide AI-assisted project creation and AI enhancements for your applications. These features are powered by GitHub Copilot Chat, so both the Infineon ModusToolbox™ AI Assistant and GitHub Copilot Chat extensions must be installed and ready before the AI features become available.
Installation, discovery, and dependency detection
The AI features rely on two companion extensions and a supporting runtime:
- The Infineon ModusToolbox™ AI Assistant extension.
- The GitHub Copilot Chat extension.
- Python 3.9 or later, which the AI Assistant uses at runtime.
When you open a ModusToolbox™ application and the AI Assistant is not yet installed, the extension shows a notification offering to install it. Choose Install to add it, Later to dismiss the prompt for the current session, or Don't ask again to stop future prompts.
The extension automatically discovers the companion extensions and detects the supporting dependencies. Discovery re-runs whenever an extension is installed or updated and whenever the VS Code window regains focus, so newly satisfied prerequisites are picked up without a manual refresh. In some cases you are prompted to reload the window so the change takes effect.
AI Assistant readiness
Before the AI features are enabled, every prerequisite must be satisfied. The extension continuously evaluates readiness and surfaces exactly what is missing so you are never left guessing. On the Create Project tab, the AI-Assisted Creation card stays greyed out until the AI Assistant is ready, and it lists every outstanding prerequisite with a one-click action to resolve it:
- AI Assistant not installed – Install AI Assistant.
- GitHub Copilot Chat not installed – Install Copilot Chat.
- Python 3.9 or later not found – Install Python.
- AI Assistant out of date – Update AI Assistant.
After you resolve the listed items, use the Reload button on the card to reload the window so the extension can re-evaluate readiness. The Add AI Enhancements action on the Application tab is likewise disabled while the AI Assistant is not ready, with a tooltip that explains which prerequisite is missing.
Version compatibility validation
The extension validates the installed AI Assistant version against the range of versions that this build of ModusToolbox™ for VS Code supports:
- If the installed AI Assistant is older than the supported range, the extension prompts you to update it (Update AI Assistant).
- If the installed AI Assistant is newer than the supported range, the extension prompts you to update ModusToolbox™ for VS Code to a build that supports it.
This validation keeps the two extensions compatible and prevents AI features from running against an unverified combination.
Once the AI Assistant is ready, you can create projects with AI assistance (see Create Project) and add AI enhancements to an existing application (see Application status and actions).
Recently opened
The Recently Opened tab lists the ModusToolbox™ applications you have opened recently, grouped by time, for example Today, Yesterday, This Week, and Older. Each entry shows the application name, its BSP, and when it was last opened. Click an entry to reopen that application.
Application status and actions
When a ModusToolbox™ application is open, the Application tab gives a complete view of the application and provides one-click actions to build, program, debug, and maintain it.
What you see
- The application name and directory, along with each project in the application.
- Missing-asset indicators that flag content the application needs in order to build.
- The tools and middleware libraries detected for each project, including any available upgrades.
- Documentation links for each project and for the application as a whole.
- The current build configuration and a snapshot of device memory usage (see Memory usage view).
- A Plan tab that displays the generated application plan when the AI Assistant is available and the application includes a plan file (mtb-application-plan.md).
Actions
- Prepare the application for VS Code by creating the required files if they are missing, and update the VS Code tasks and settings as needed.
- Open the project folder or the project README.
- Run build actions: Build, Rebuild, and Clean.
- Program the device using Program or Quick Program.
- Erase the device using Erase (internal memory) or Erase All (internal and external memory).
- Launch the Device Configurator or the Library Manager.
- Run curated Quick Tasks, and refresh the application to rescan the environment.
- Add AI enhancements to the application with Add AI Enhancements, which generates GitHub Copilot support files (instructions, agents, and skills) for the project so Copilot can work more effectively with it. This action is available when the AI Assistant is ready; otherwise it is disabled with a tooltip that explains which prerequisite is missing (see AI Assistant).
Memory usage view
The memory usage view shows how your application uses device memory in a three-level hierarchy: physical memory, then regions, then segments.
- The top summary shows overall physical memory usage on the device, such as SRAM, flash, and any external memory.
- Each region shows its own usage.
- Segments show names, start addresses, and sizes so you can see how the application is laid out in memory.
By default the top-level sections are expanded and the regions are collapsed. Use Expand All and Collapse All to change how much detail is shown.
Development kits
The Development Kits tab lists the Infineon development kits connected to your computer and lets you associate each kit with a Board Support Package (BSP).
- For each kit, see the kit name, serial number, and firmware version.
- View board features, the programmer (KitProg) type, and the USB mode.
- See the current BSP and the BSPs available for the kit, along with a status indicator.
From this tab you can update a kit's firmware when it is out of date, change the BSP associated with a kit, and refresh the list to re-scan for connected kits.
Local content storage
Local Content Storage lets you keep BSP and middleware content on your computer for offline development. You select content by BSP, and all content associated with a BSP is included.
- Two lists are shown: Not Available Locally and Available Locally. Drag and drop BSPs between the lists to add or remove them.
- Use the bulk actions Add All, Remove All, and Revert.
- Use Check For Updates and Update Existing Content to refresh the content you have stored.
Settings
The Settings tab provides a guided editor for the extension and workspace settings, with validation and inline tips.
- Settings are grouped by ownership: ModusToolbox™, the extension, or the workspace.
- Supported value types include text, number, checkbox, choice, URL, directory path, file path, and tools path.
- Choice settings show a short tip for each option, and some settings are enabled only when relevant, for example the proxy server field is disabled when the proxy mode is direct.
- Quick-fixes help you correct invalid paths and mismatched configuration.
Common settings include the manifest database URL mode (default, china, or custom), Local Content mode and the local content storage path for offline use, the toolchain and tools version (including a custom tools path), and the information or logging level.
modusToolbox.autodisplay setting
to choose when the main page opens automatically on startup: always, only when a ModusToolbox™
application is loaded, or never.Documentation and help
The extension gives you quick access to documentation and help from inside VS Code.
- Open the Getting Started and Documentation links in your browser.
- Browse ready-to-use code examples on GitHub.
- Visit the ModusToolbox™ community forums.
- Open the built-in user guide (this document) on the User Guide tab.
- Look up embedded-development terms on the Glossary tab.
In a C source file, right-click and choose Display documentation for symbol, or press Ctrl+Shift+F1, to open the API documentation for the symbol under the cursor.
Commands, menus, and shortcuts
The extension contributes the following commands, available from the Command Palette:
- Infineon ModusToolbox™: Show Main Page – open the extension's main page.
- Infineon ModusToolbox™: Display documentation for symbol – show API documentation for the symbol under the cursor in a C file.
- Infineon ModusToolbox™: Install the LLVM Compiler – install the LLVM toolchain.
- Infineon ModusToolbox™: Add Bootloader To PSOC Edge Application – add bootloader support to a PSOC™ Edge application.
- Infineon ModusToolbox™: Show Bootloader Documentation – open the bootloader documentation.
- Infineon ModusToolbox™: Set Output Channel Level – set the verbosity of the extension's output channel.
In a C source file, you can also right-click and choose Display documentation for symbol from the context menu, or press Ctrl+Shift+F1.
The extension provides a ModusToolbox™ Shell terminal profile for running environment-aware ModusToolbox™ commands in the integrated terminal.