增加定时自动保存配置;修改为连接后继续运行程序;关闭openocd的tcl和telnet服务器;版本号更新为V1.2.1
This commit is contained in:
parent
2a02d5c519
commit
033393b905
|
@ -11,7 +11,7 @@ CONFIG += c++11
|
||||||
# depend on your compiler). Please consult the documentation of the
|
# depend on your compiler). Please consult the documentation of the
|
||||||
# deprecated API in order to know how to port your code away from it.
|
# deprecated API in order to know how to port your code away from it.
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS \
|
DEFINES += QT_DEPRECATED_WARNINGS \
|
||||||
APP_VERSION=\\\"1.2.0\\\"
|
APP_VERSION=\\\"1.2.1\\\"
|
||||||
|
|
||||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
# You can also make your code fail to compile if it uses deprecated APIs.
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 4.11.0, 2022-02-18T22:25:23. -->
|
<!-- Written by QtCreator 4.11.0, 2022-03-30T17:03:19. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><hr width="300"/><p align="center">版本号:V1.2.0</p><p align="center">更新时间:2022/2/18</p><hr width="300"/><p align="center">Developed by Skythinker</p></body></html></string>
|
<string><html><head/><body><hr width="300"/><p align="center">版本号:V1.2.1</p><p align="center">更新时间:2022/3/30</p><hr width="300"/><p align="center">Developed by Skythinker</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -45,6 +45,7 @@ void GDBProcess::stop()
|
||||||
void GDBProcess::connectToRemote(const QString &addr)
|
void GDBProcess::connectToRemote(const QString &addr)
|
||||||
{
|
{
|
||||||
runCmd("target remote "+addr+"\r\n");
|
runCmd("target remote "+addr+"\r\n");
|
||||||
|
runCmd("monitor resume\r\n");//恢复目标程序运行
|
||||||
}
|
}
|
||||||
|
|
||||||
//命令GDB从远处目标断开
|
//命令GDB从远处目标断开
|
||||||
|
|
|
@ -43,6 +43,11 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
logTimer->stop();
|
logTimer->stop();
|
||||||
connect(logTimer,SIGNAL(timeout()),this,SLOT(slotLogTimerTrig()));
|
connect(logTimer,SIGNAL(timeout()),this,SLOT(slotLogTimerTrig()));
|
||||||
|
|
||||||
|
autosaveTimer=new QTimer(this);//创建自动保存定时器
|
||||||
|
autosaveTimer->setInterval(5000);//5s自动保存
|
||||||
|
autosaveTimer->start();
|
||||||
|
connect(autosaveTimer,&QTimer::timeout,this,[=]{saveToFile("autosave.ini");});
|
||||||
|
|
||||||
tableModel=new QStandardItemModel(this);//创建并初始化表格
|
tableModel=new QStandardItemModel(this);//创建并初始化表格
|
||||||
initTable();
|
initTable();
|
||||||
|
|
||||||
|
@ -58,6 +63,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
|
|
||||||
loadConfFileList();//从openocd文件夹中读取配置文件列表
|
loadConfFileList();//从openocd文件夹中读取配置文件列表
|
||||||
loadGlobalConf();//加载软件全局配置
|
loadGlobalConf();//加载软件全局配置
|
||||||
|
loadFromFile("autosave.ini");//加载自动保存的工程配置
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
|
|
@ -79,7 +79,7 @@ private:
|
||||||
bool connected=false;//标记当前是否已连接
|
bool connected=false;//标记当前是否已连接
|
||||||
QStandardItemModel *tableModel;//表格数据
|
QStandardItemModel *tableModel;//表格数据
|
||||||
QList<VarInfo> varList;//变量列表
|
QList<VarInfo> varList;//变量列表
|
||||||
QTimer *watchTimer,*tableTimer,*logTimer;//定时器,用于查看变量值、刷新表格和监视日志
|
QTimer *watchTimer,*tableTimer,*logTimer,*autosaveTimer;//定时器,用于查看变量值、刷新表格、监视日志和定时保存
|
||||||
QElapsedTimer *stampTimer;//时间戳定时器指针
|
QElapsedTimer *stampTimer;//时间戳定时器指针
|
||||||
GraphWindow *graph;//绘图窗口指针
|
GraphWindow *graph;//绘图窗口指针
|
||||||
bool isWatchProcessing=false;//标记当前是否正在处理变量值查看
|
bool isWatchProcessing=false;//标记当前是否正在处理变量值查看
|
||||||
|
|
|
@ -23,7 +23,7 @@ void OpenOCD::start(const QString &chosenInterface,const QString &chosenTarget,i
|
||||||
process->setWorkingDirectory(QCoreApplication::applicationDirPath()+"/openocd/bin");//设置工作路径
|
process->setWorkingDirectory(QCoreApplication::applicationDirPath()+"/openocd/bin");//设置工作路径
|
||||||
process->setProgram(QCoreApplication::applicationDirPath()+"/openocd/bin/openocd.exe");//设置程序路径
|
process->setProgram(QCoreApplication::applicationDirPath()+"/openocd/bin/openocd.exe");//设置程序路径
|
||||||
process->setNativeArguments(
|
process->setNativeArguments(
|
||||||
QString("-f interface/%1 -f target/%2 -c \"gdb_port %3\"")
|
QString("-f interface/%1 -f target/%2 -c \"gdb_port %3\" -c \"tcl_port disabled;telnet_port disabled\"")
|
||||||
.arg(chosenInterface).arg(chosenTarget).arg(gdbPort));//设置参数为所选的调试器、目标芯片和gdb端口
|
.arg(chosenInterface).arg(chosenTarget).arg(gdbPort));//设置参数为所选的调试器、目标芯片和gdb端口
|
||||||
process->start();
|
process->start();
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,8 @@ void SerialOCD::slotSocketReadyRead()
|
||||||
{"qOffsets","TextSeg=0"},
|
{"qOffsets","TextSeg=0"},
|
||||||
{"qTStatus","T1"},
|
{"qTStatus","T1"},
|
||||||
{"qSymbol","OK"},
|
{"qSymbol","OK"},
|
||||||
{"m0,1","00"}
|
{"m0,1","00"},
|
||||||
|
{"qRcmd,726573756d65","OK"}
|
||||||
};
|
};
|
||||||
|
|
||||||
QString input=socket->readAll();//获取接收数据
|
QString input=socket->readAll();//获取接收数据
|
||||||
|
|
Loading…
Reference in New Issue