增加定时自动保存配置;修改为连接后继续运行程序;关闭openocd的tcl和telnet服务器;版本号更新为V1.2.1

This commit is contained in:
skythinker 2022-03-30 17:11:59 +08:00
parent 2a02d5c519
commit 033393b905
8 changed files with 14 additions and 6 deletions

View File

@ -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.

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<data>
<variable>EnvironmentId</variable>

View File

@ -91,7 +91,7 @@
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;hr width=&quot;300&quot;/&gt;&lt;p align=&quot;center&quot;&gt;版本号V1.2.0&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;更新时间2022/2/18&lt;/p&gt;&lt;hr width=&quot;300&quot;/&gt;&lt;p align=&quot;center&quot;&gt;Developed by Skythinker&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;hr width=&quot;300&quot;/&gt;&lt;p align=&quot;center&quot;&gt;版本号V1.2.1&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;更新时间2022/3/30&lt;/p&gt;&lt;hr width=&quot;300&quot;/&gt;&lt;p align=&quot;center&quot;&gt;Developed by Skythinker&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>

View File

@ -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从远处目标断开

View File

@ -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()

View File

@ -79,7 +79,7 @@ private:
bool connected=false;//标记当前是否已连接
QStandardItemModel *tableModel;//表格数据
QList<VarInfo> varList;//变量列表
QTimer *watchTimer,*tableTimer,*logTimer;//定时器,用于查看变量值、刷新表格和监视日志
QTimer *watchTimer,*tableTimer,*logTimer,*autosaveTimer;//定时器,用于查看变量值、刷新表格、监视日志和定时保存
QElapsedTimer *stampTimer;//时间戳定时器指针
GraphWindow *graph;//绘图窗口指针
bool isWatchProcessing=false;//标记当前是否正在处理变量值查看

View File

@ -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();
}

View File

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