rockbox/utils/regtools/qeditor/main.cpp
Amaury Pouly c323381f0b regtools: add graphical register explorer + analyser
This tool allows one to explore any register map. Register dumps
(like produced by hwstub tools) can be loaded and decoded by the
tool. Finally some analysers are provided for specific soc analysis
like clock tree and emi on imx233 for example.

Change-Id: Iaf81bd52d15f3e44ab4fe9bc039153fcf60cf92a
2013-08-21 20:18:37 +02:00

30 lines
916 B
C++

#include <QApplication>
#include <QDir>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Backend *backend = new Backend;
QDir dir(QCoreApplication::applicationDirPath());
dir.cdUp();
dir.cd("desc");
dir.setFilter(QDir::Files);
printf("%s\n", dir.absolutePath().toStdString().c_str());
QFileInfoList list = dir.entryInfoList();
for(int i = 0; i < list.size(); i++)
{
QFileInfo fileInfo = list.at(i);
if(fileInfo.fileName().right(4) != ".xml" || fileInfo.fileName().left(5) != "regs-")
continue;
backend->LoadSocDesc(fileInfo.absoluteFilePath());
}
QCoreApplication::setOrganizationName("Rockbox");
QCoreApplication::setApplicationName("Register Editor");
QCoreApplication::setOrganizationDomain("rockbox.com");
MainWindow win(backend);
win.show();
return app.exec();
}