admin
launch.json
{
"version": "0.2.0",
"configurations": [
{
"cwd": "${workspaceRoot}",
"type": "cortex-debug",
"request": "launch",
"name": "cortex-debug launch",
"servertype": "jlink",
"interface": "swd",
"executable": ".\\out\\Release\\STM32XX_EIDE模板.elf",
"runToMain": true,
"svdFile": ".\\pack\\Keil\\STM32F1xx_DFP.2.3.0\\SVD\\STM32F103xx.svd",
"device": "STM32F103C8"
},
{
"cwd": "${workspaceRoot}",
"type": "cortex-debug",
"request": "launch",
"name": "pyocd",
"servertype": "pyocd",
"executable": ".\\out\\Release\\GD32E10X_EIDE_template.elf",
"runToMain": true,
"targetId": "GD32E103C8",
"cmsisPack": ".\\GigaDevice.GD32E10x_DFP_1.2.0.pack",
"svdFile": ".\\pack\\GigaDevice\\GD32E10x_DFP_1.2.0\\SVD\\GD32E10x.svd"
},
{
"cwd": "${workspaceRoot}",
"type": "cortex-debug",
"request": "launch",
"name": "openocd",
"servertype": "openocd",
"executable": ".\\out\\Release\\GD32E10X_EIDE_template.elf",
"runToMain": true,
"configFiles": [
"interface/<debugger-type>.cfg",
"target/<target-name>.cfg"
]
},
{
"cwd": "${workspaceRoot}",
"type": "cortex-debug",
"request": "launch",
"name": "stlink",
"servertype": "openocd",
"executable": ".\\out\\Release\\GD32E10X_EIDE_template.elf",
"runToMain": true,
"configFiles": [
"interface/stlink.cfg",
"target/<target-name>.cfg"
]
}
]
}`
c_cpp_properties.json
{
"configurations": [
{
"name": "win32",
"includePath": [
"${default}",
".\\.eide\\deps",
".\\..\\..\\..\\Keil_v5\\ARM\\ARMCC\\include",
".\\..\\..\\..\\Keil_v5\\ARM\\ARMCC\\include\\rw",
".\\pack\\GigaDevice\\GD32E10x_DFP_1.2.0\\Device\\Include",
".\\.eide\\deps\\GD32E10x_DFP\\Startup",
".\\.eide\\deps\\GD32E10x_DFP\\GD32E10x_StdPeripherals.MISC",
".\\.eide\\deps\\GD32E10x_DFP\\GD32E10x_StdPeripherals.RCU",
".\\.eide\\deps\\GD32E10x_DFP\\GD32E10x_StdPeripherals.FMC",
".\\.eide\\deps\\GD32E10x_DFP\\GD32E10x_StdPeripherals.RTC",
".\\.eide\\deps\\GD32E10x_DFP\\GD32E10x_StdPeripherals.GPIO",
".\\lib\\CMSIS",
".\\USER",
".\\USER\\sys"
],
"defines": [
"${default}",
"USE_STDPERIPH_DRIVER",
"GD32E10x",
"__VSCODE_CPPTOOL"
],
"intelliSenseMode": "${default}",
"browse": {
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": "${default}"
},
"forcedInclude": [
"c:\\Users\\Neng\\.vscode\\extensions\\cl.eide-2.4.1\\bin\\include\\internal_headers\\armcc_intr.h"
]
}
],
"version": 4
}
pyocd.yaml
pack:
- E:\GD32E103_Build\GD32E10x_Code\GD32E10X_EIDE_template\GigaDevice.GD32E10x_DFP_1.2.0.pack
main.c
#include "gd32e10x.h"
#include "systick.h"
#define LED_ON gpio_bit_reset(GPIOB,GPIO_PIN_0) //GPIO_ResetBits
#define LED_OFF gpio_bit_set(GPIOB,GPIO_PIN_0) //GPIO_SetBits
int main(void)
{
systick_config();
rcu_periph_clock_enable(RCU_GPIOB);
//RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);
gpio_init(GPIOB, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ,GPIO_PIN_0);
while (1)
{
LED_ON;
delay_1ms(1000);
LED_OFF;
delay_1ms(1000);
}
}