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();//获取接收数据