Nuvoton NuMicro Cortex-M Pack integrates essential extensions, configuration files, SVD support, OpenOCD setup, and template projects to simplify embedded development from setup to debugging.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
The extension pack integrates essential components to simplify embedded development, including:
Essential extensions for VS Code.
Configuration files.
SVD (System View Description) support.
OpenOCD setup for debugging.
The PinView and LCDView help you with debugging.
Template projects to help you get started.
Extension version control prevents automatic extension upgrades from causing usage issues.
Caveat: You might be forced to use specific, fixed versions of the relevant extensions. For details, please see the sub-extension: Nuvoton Extension Version Manager.
Ensure your settings in "Manage Solution" are properly configured
Click on CMSIS in the active bar and then click on Manage Solution to set a context for your solution.
configure the Run & Debug settings.
Debug Configuration: Nuvoton Debug
Check Device Status
Make sure the device is recognized in Device Manager.
If a new VS Code instance is opened, the device in the Device Manager may be taken over by the newly opened VS Code. Close all instances of VS Code and restart to ensure proper device recognition.
Execute Build, Run and Debug
Build
Run
Debug
(Optional) Zephyr Project Setup Guide for Nuvoton NuMicro Cortex-M
Install Required Extension Packs
Install the following extension packs:
Nuvoton NuMicro Cortex-M Pack
Zephyr IDE Extension Pack
Use the Zephyr IDE buttons in the following steps to create the environment.
Creating a Zephyr Project from Sample Code
Create a new project using sample code.
Choose a project template provided by the Zephyr IDE.
Add a build configuration and choose your target board, e.g., NuMaker-PFM-M467.
Add Runner Configuration (OpenOCD)
Configure the project runner to use OpenOCD.
Update Zephyr Project Runner Settings
Go to View → Command Palette and run Update Zephyr Project Runner. Select the project to update the runner settings and refresh the settings.
Build Project and Flash to Target
Use the build button to build and flash the firmware to your target board.
Create launch.json
Create the launch.json file used for debugging.
Set the runToEntryPoint (optional)
If you don’t want execution to stop at the main function when running in debug mode, set the runToEntryPoint parameter and specify the symbol function where you want it to stop (for example, Zephyr’s execution entry point z_arm_reset; for Nuvoton BSP projects, the entry point is Reset_Handler).
Set the target type
Please choose the target type for debugging according to the project.