增加定时自动保存配置;修改为连接后继续运行程序;关闭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
|
||||
# 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.
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -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从远处目标断开
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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;//标记当前是否正在处理变量值查看
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();//获取接收数据
|
||||
|
|
Loading…
Reference in New Issue