How to create project in keil uvision for mm32g0001 and add resources from mm32 LibSamples_MM32G0001_V2.3.9 library package. Keil tool chain for arm and Keil pack for mm32G is installed and some example from LibSamples_MM32G0001_V2.3.9 like Toggle led are tested and debug using J link.
Since the GPIO_LED_Toggle example from LibSamples_MM32G0001_V2.3.9 already builds and debugs successfully with J-Link, I recommend using this working example as the basis for a new project.
Create a new project in µVision and select the exact MM32G0001 device from the installed MM32G Device Pack.In Manage Run-Time Environment, enable CMSIS → CORE and Device → Startup, if provided by the pack.Add the required MM32 peripheral library sources from LibSamples_MM32G0001_V2.3.9 and configure their header directories under Options for Target → C/C++ → Include Paths.Add only the peripheral drivers required by the application (GPIO, UART, Timer, etc.).Ensure the project contains only one startup file and system initialization implementation.Configure J-Link/SWD under Options for Target → Debug, using the same settings as the working example.
Recommended approach: Copy the working GPIO_LED_Toggle example project, rename it, and replace the application-specific code. This preserves the correct MM32 startup code, include paths, compiler defines, Flash configuration, and J-Link settings and is less error-prone than creating the project completely from scratch.
The MM32G0001 LibSamples package provides CMSIS, peripheral library sources, and MDK examples specifically for this purpose.
How to rename the GPIO_LED_Toggle to myprojectname?
I assume that you mean renaming the copied GPIO_LED_Toggle example into your own µVision project.In this case:
- Copy the complete GPIO_LED_Toggle example folder to a new folder, e.g. myprojectname.- Rename the µVision project file, for example- GPIO_LED_Toggle.uvprojx → myprojectname.uvprojx.- Open myprojectname.uvprojx in µVision.- Open Project → Manage → Project Items and rename the Target if desired.- Check Options for Target → Output → Name of Executable and change the output name to myprojectname.- Build the project and verify that there are no broken relative paths.
There is normally no need to rename the source files, startup files, or MM32 library files. You can now replace/modify the example main.c and add the resources required for your application.
Thank You rkopsch