Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Nuvoton NuCodeGenNew to Visual Studio Code? Get it now.
Nuvoton NuCodeGen

Nuvoton NuCodeGen

Preview

Nuvoton

| (0) | Free
Streamline your NuMicro firmware development with AI-powered interactive chat, NuMicro BSP-compatible code generation, and automated build testing.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nuvoton NuCodeGen

Description

Nuvoton NuCodeGen is an AI-powered autonomous coding extension that generates code based on the library files of chip series and utilizes tools to edit files, build projects, retrieve functions or macros from the library files, and fix code errors.

Outline

  • Nuvoton NuCodeGen
    • Description
    • Outline
    • Features
    • Requirements
    • Commands
    • Getting Started
    • Troubleshooting
      • Shell Integration Unavailable
        • Solution 1. Enable Shell Integration
        • Solution 2. Configure VSCode to Use the Correct Shell
        • Solution 3. Update PowerShell

Features

  • A chat extension for VSCode building on GitHub Copilot Chat.
    • Use a prompt to generate snippet code based on Nuvoton STDdriver API.
  • Add a custom participant to Copilot Chat
    • Allows customization of how user requests are handled.
  • Add custom commands and tools
    • Support various peripherals
    • Helps with building and correcting bugs.

Requirements

  • Visual Studio Code: Version 1.95.0 or higher is recommended.
  • Install VS Code Extension: GitHub Copilot.
  • Need a GitHub Account to sign in to the Github Copilot extension.

Commands

  1. Chat participant
    • use @nucodegen to communicate with nucodegen participant
  2. Slash commands
    • /{peripheral_name}: handle issues related to the specified peripheral. For example,
      • /pdma: generate code for PDMA functionality
      • /clk: generate code for peripherals' clocks
      • /spi: what are limits for SPI_Open function?
      • /clk: how many clock sources does SPI0 have?
    • /{peripheral_name}_settings:
      • list the relevant settings for the specified peripheral
      • example prompt format for settings
  3. Tools
    • #buildcode: build your project and try to fix any build errors
    • #debugcode: load your code and run the debugger

Getting Started

  1. Preinstall Nuvoton NuMicro Cortex-M Pack.

  2. Follow the "Getting Started" section in the "Overview" of the Nuvoton NuMicro Cortex-M Pack. Downloading the NuMicro BSP project, and then open the VSCode folder within it.

  3. Click copilot icon.

    copilot icon

  4. Set chat mode to Ask and choose model.

    • It is recommended to choose the Claude series, e.g. Claude Sonnet 3.5 or Claude Soonet 4.

      copilot icon

    • The Claude Sonnet 3.7 series cannot be used because it is not supported by the VSCode LLM API.

      claude sonnet 3.7

  5. Generate your code:

    • Use /{peripheral_name}_settings to get configurable settings and an example prompt.

      gencode step1

      example prompt

    • Based on the example prompt, use /{peripheral_name} to generate your code.

      • Each setting can be adjusted based on your needs.
      • Without clear configuration settings, the likelihood of generating incorrect configurations is higher.

      gencode step2

    • Click Always Allow to enable automatic execution of command line operations.

      always allow

Troubleshooting

Shell Integration Unavailable

  • During the process of building the code, you may encounter a Shell integration unavailable issue. shell integration unavailable

Solution 1. Enable Shell Integration

  1. Open VSCode
  2. Click Manage -> Settings

    settings

  3. Search terminal.integrated.shellIntegration.enabled
  4. Make sure this feature is turned on.

    enable shell integration

Solution 2. Configure VSCode to Use the Correct Shell

  1. Open VSCode
  2. Press Ctrl + Shift + P
  3. Type Terminal: Select Default Profile and choose it
  4. Select one of the supported shells: e.g. git bash, or PowerShell.
    • CMD (Command Prompt) does not support shell integration.

Solution 3. Update PowerShell

  • If you still encounter the same issue when using PowerShell, upgrade PowerShell to version 7 or later.
    1. Check current PowerShell version by running: $PSVersionTable.PSVersion
    2. If your version is below 7, update PowerShell.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft