From 033393b90547376a98430b5347340b93b74fb268 Mon Sep 17 00:00:00 2001 From: skythinker Date: Wed, 30 Mar 2022 17:11:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=9A=E6=97=B6=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E4=BF=9D=E5=AD=98=E9=85=8D=E7=BD=AE=EF=BC=9B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E8=BF=9E=E6=8E=A5=E5=90=8E=E7=BB=A7=E7=BB=AD?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E7=A8=8B=E5=BA=8F=EF=BC=9B=E5=85=B3=E9=97=AD?= =?UTF-8?q?openocd=E7=9A=84tcl=E5=92=8Ctelnet=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=EF=BC=9B=E7=89=88=E6=9C=AC=E5=8F=B7=E6=9B=B4=E6=96=B0=E4=B8=BA?= =?UTF-8?q?V1.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LinkScope.pro | 2 +- LinkScope.pro.user | 2 +- aboutwindow.ui | 2 +- gdbprocess.cpp | 1 + mainwindow.cpp | 6 ++++++ mainwindow.h | 2 +- openocd.cpp | 2 +- serialocd.cpp | 3 ++- 8 files changed, 14 insertions(+), 6 deletions(-) diff --git a/LinkScope.pro b/LinkScope.pro index b39b534..b30b1dc 100644 --- a/LinkScope.pro +++ b/LinkScope.pro @@ -11,7 +11,7 @@ CONFIG += c++11 # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. 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. # In order to do so, uncomment the following line. diff --git a/LinkScope.pro.user b/LinkScope.pro.user index e769906..fa859e8 100644 --- a/LinkScope.pro.user +++ b/LinkScope.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/aboutwindow.ui b/aboutwindow.ui index 66f5b06..a49613a 100644 --- a/aboutwindow.ui +++ b/aboutwindow.ui @@ -91,7 +91,7 @@ - <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> + <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> diff --git a/gdbprocess.cpp b/gdbprocess.cpp index 741818f..d51066a 100644 --- a/gdbprocess.cpp +++ b/gdbprocess.cpp @@ -45,6 +45,7 @@ void GDBProcess::stop() void GDBProcess::connectToRemote(const QString &addr) { runCmd("target remote "+addr+"\r\n"); + runCmd("monitor resume\r\n");//恢复目标程序运行 } //命令GDB从远处目标断开 diff --git a/mainwindow.cpp b/mainwindow.cpp index fe2239e..aea1179 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -43,6 +43,11 @@ MainWindow::MainWindow(QWidget *parent) logTimer->stop(); 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);//创建并初始化表格 initTable(); @@ -58,6 +63,7 @@ MainWindow::MainWindow(QWidget *parent) loadConfFileList();//从openocd文件夹中读取配置文件列表 loadGlobalConf();//加载软件全局配置 + loadFromFile("autosave.ini");//加载自动保存的工程配置 } MainWindow::~MainWindow() diff --git a/mainwindow.h b/mainwindow.h index 11ec28f..d5345a5 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -79,7 +79,7 @@ private: bool connected=false;//标记当前是否已连接 QStandardItemModel *tableModel;//表格数据 QList varList;//变量列表 - QTimer *watchTimer,*tableTimer,*logTimer;//定时器,用于查看变量值、刷新表格和监视日志 + QTimer *watchTimer,*tableTimer,*logTimer,*autosaveTimer;//定时器,用于查看变量值、刷新表格、监视日志和定时保存 QElapsedTimer *stampTimer;//时间戳定时器指针 GraphWindow *graph;//绘图窗口指针 bool isWatchProcessing=false;//标记当前是否正在处理变量值查看 diff --git a/openocd.cpp b/openocd.cpp index 4d6e8b7..7c5d51b 100644 --- a/openocd.cpp +++ b/openocd.cpp @@ -23,7 +23,7 @@ void OpenOCD::start(const QString &chosenInterface,const QString &chosenTarget,i process->setWorkingDirectory(QCoreApplication::applicationDirPath()+"/openocd/bin");//设置工作路径 process->setProgram(QCoreApplication::applicationDirPath()+"/openocd/bin/openocd.exe");//设置程序路径 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端口 process->start(); } diff --git a/serialocd.cpp b/serialocd.cpp index a22af20..ed3e4a9 100644 --- a/serialocd.cpp +++ b/serialocd.cpp @@ -78,7 +78,8 @@ void SerialOCD::slotSocketReadyRead() {"qOffsets","TextSeg=0"}, {"qTStatus","T1"}, {"qSymbol","OK"}, - {"m0,1","00"} + {"m0,1","00"}, + {"qRcmd,726573756d65","OK"} }; QString input=socket->readAll();//获取接收数据