使用stlink调试,但是不能捕获断点
This commit is contained in:
24
.vscode/launch.json
vendored
Normal file
24
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
// 使用 IntelliSense 了解相关属性。
|
||||
// 悬停以查看现有属性的描述。
|
||||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"cwd": "${workspaceRoot}/Project",
|
||||
"executable": "./output/stm32.elf",
|
||||
"name": "Debug Microcontroller",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"showDevDebugOutput": "raw",
|
||||
"servertype": "openocd",
|
||||
"configFiles": [
|
||||
"interface/stlink-v2.cfg",
|
||||
"target/stm32f4x.cfg"
|
||||
],
|
||||
"loadFiles": [],
|
||||
"svdFile": "Project/STM32F429.svd",
|
||||
"armToolchainPath": "D:/Program Files/arm-gnu-toolchain/bin"
|
||||
}
|
||||
]
|
||||
}
|
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@@ -6,6 +6,8 @@
|
||||
"stm32f4xx_fsmc.h": "c",
|
||||
"stm32f4xx.h": "c",
|
||||
"libc.h": "c",
|
||||
"*.txt": "c"
|
||||
}
|
||||
"*.txt": "c",
|
||||
"*.tmp": "c"
|
||||
},
|
||||
"cortex-debug.variableUseNaturalFormat": false
|
||||
}
|
36
.vscode/tasks.json
vendored
Normal file
36
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"type": "shell",
|
||||
"command": "python",
|
||||
"args": [
|
||||
"make.py"
|
||||
],
|
||||
"group": "build",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/Project"
|
||||
},
|
||||
},
|
||||
{
|
||||
"label": "download",
|
||||
"type": "shell",
|
||||
"command": "openocd",
|
||||
"args": [
|
||||
"-f",
|
||||
"interface/stlink-v2.cfg",
|
||||
"-f",
|
||||
"target/stm32f4x.cfg",
|
||||
"-c",
|
||||
"program ./output/stm32.elf verify reset exit"
|
||||
],
|
||||
"group": "build",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/Project"
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
@@ -3,14 +3,18 @@
|
||||
|
||||
下载程序
|
||||
|
||||
pyocd flash -t stm32f429xg output/stm32.elf
|
||||
pyocd flash -t stm32f429xi output/stm32.elf
|
||||
|
||||
使用pyocd调试:
|
||||
|
||||
1. 启动pyocd
|
||||
|
||||
pyocd gdbserver -t stm32f429xg
|
||||
pyocd gdbserver -t stm32f429xi
|
||||
|
||||
2. 启动gdb
|
||||
|
||||
arm-none-eabi-gdb -ex "target remote localhost:3333"
|
||||
|
||||
使用openocd下载程序
|
||||
openocd -f interface/cmsis-dap.cfg -f target/stm32f4x.cfg -c "init; halt; flash write_image erase output/stm32.bin 0x08000000 bin; reset; shutdown"
|
||||
|
||||
|
@@ -426,7 +426,7 @@ static u32 WIN_DrawWordAtNormal (char *c,int x,int y)
|
||||
|
||||
//获取字模
|
||||
if (g_font==0) g_font=WIN_CreatFontBuff(FONT_NUM);
|
||||
buff=WIN_GetFontData(g_font,(c[0]<<8)|c[1],&all_byte);
|
||||
buff=WIN_GetFontData(g_font,(c[0]<<16)|(c[1]<<8)|c[2],&all_byte);
|
||||
|
||||
|
||||
|
||||
|
@@ -181,8 +181,8 @@ void baseWin_callback (WIN_WindowStruct *win,WIN_MsgStruct *msg)
|
||||
static int light=1;
|
||||
switch (msg->msg)
|
||||
{
|
||||
case WIN_MSG_INIT:
|
||||
break;
|
||||
case WIN_MSG_INIT:
|
||||
break;
|
||||
case WIN_MSG_KEY:
|
||||
k=msg->data.p;
|
||||
if (k->shortPress&KEY_VALUE_LIGHT)
|
||||
@@ -191,11 +191,11 @@ void baseWin_callback (WIN_WindowStruct *win,WIN_MsgStruct *msg)
|
||||
light=!light;
|
||||
ui_setScreenBackLightPower (light);
|
||||
}
|
||||
else if(k->shortPress&KEY_VALUE_DES)
|
||||
{
|
||||
// 通知窗口线程调用函数
|
||||
WIN_RunInWindow("home",creat_lock,0);
|
||||
}
|
||||
else if(k->shortPress&KEY_VALUE_DES)
|
||||
{
|
||||
// 通知窗口线程调用函数
|
||||
WIN_RunInWindow("home",creat_lock,0);
|
||||
}
|
||||
if (k->longPress&KEY_VALUE_HOME)
|
||||
{
|
||||
//长按关机键
|
||||
|
@@ -116,6 +116,7 @@ void rt_hw_board_init()
|
||||
// NVIC_SetVectorTable(NVIC_VectTab_FLASH,(u32)128*1024);
|
||||
NVIC_SetVectorTable(NVIC_VectTab_FLASH,(u32)0);
|
||||
_SysTick_Config (SystemCoreClock/1000);
|
||||
NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1);
|
||||
LED_Init(); // LED初始<E5889D>?
|
||||
Usart_Config(); // 串口初始<E5889D>?
|
||||
SDRAM_Init(); // sdram要先于emwin之前初始<E5889D>?
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# 1. 目标芯片配置
|
||||
target:
|
||||
# 指定芯片型号(覆盖命令行 -t 参数)
|
||||
name: stm32f429xg
|
||||
name: stm32f429xi
|
||||
|
||||
# 可选:覆盖默认时钟频率(单位 Hz)
|
||||
clock: 180000000
|
||||
|
Reference in New Issue
Block a user