KDA v1.0修改细节适配keil命令行运行

This commit is contained in:
nikola 2023-07-22 16:45:14 +08:00
parent 5599bb19b8
commit f566318a57
8 changed files with 325 additions and 84 deletions

View File

@ -1,8 +1,10 @@
QT += core gui xml charts printsupport
QT += core gui xml charts
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11
#CONFIG += c++11
win32:QMAKE_CXXFLAGS += -std=c++11
CONFIG += console
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
@ -64,3 +66,5 @@ DISTFILES += \
RESOURCES += \
R.qrc
TARGET = KDA

104
main.cpp
View File

@ -4,6 +4,10 @@
#include <QSharedMemory>
#include <QMessageBox>
#include <QString>
#include <QTextCodec>
MainWindow* main_window=nullptr;
#include "only_run_by_file.h"
@ -15,44 +19,104 @@ void onAppExit()
QString project_path;
QString map_path;
bool only_printf=false;
QString gb2312ToQString(const char *gb2312Data) {
QTextCodec *gb2312Codec = QTextCodec::codecForName("GB2312");
if (!gb2312Codec) {
qWarning("GB2312 codec not available. Cannot convert to QString.");
return QString();
}
QByteArray byteArray = QByteArray::fromRawData(gb2312Data, strlen(gb2312Data));
return gb2312Codec->toUnicode(byteArray);
}
//QString executeCmdCommand(const QString& cmdCommand) {
// QProcess process;
// // Set the command to be executed (cmd in this case)
// QString command = "cmd.exe";
// // Set the arguments to pass to the command
// QStringList arguments;
// arguments << "/c" << cmdCommand;
// // Start the process
// process.start(command, arguments);
// // Wait for the process to finish
// process.waitForFinished();
// // Read the output from the process
// QString output = process.readAllStandardOutput();
// return output;
//}
int main(int argc, char *argv[])
{
// for(int i=0;i<argc;i++)
// qDebug() <<argv[i];
if(argc>3)
{
project_path=argv[1];
map_path=argv[2];
only_printf=argv[3];
}else if(argc>2)
// Execute the cmd command and get the output
// QString result = executeCmdCommand("cd ");
// Display the output
// qDebug() << "Output:" << result;
for(int i=0;i<argc;i++)
qDebug() <<argv[i];
if(argc==3)
{
project_path=map_path=argv[1];
only_printf=argv[2];
}
if(argc>1)
project_path=gb2312ToQString(argv[1]);
map_path=gb2312ToQString(argv[2]);
project_path.replace("\"", "");
map_path.replace("\"", "");
project_path.replace("", "");
project_path.replace("", "");
map_path.replace("", "");
map_path.replace("", "");
}else if(argc==2)
{
project_path="./";
map_path="./";
only_printf=argv[1];
project_path=map_path=gb2312ToQString(argv[1]);
project_path.replace("\"", "");
map_path.replace("\"", "");
project_path.replace("", "");
project_path.replace("", "");
map_path.replace("", "");
map_path.replace("", "");
}else
{
project_path=map_path="";
}
QApplication a(argc, argv);
only_run_by_file programController;
QObject::connect(&programController, &only_run_by_file::runFileDeleted, &a, &QCoreApplication::quit);
// only_run_by_file programController;
// QObject::connect(&programController, &only_run_by_file::runFileDeleted, &a, &QCoreApplication::quit);
// 注册程序退出的处理函数
QObject::connect(&a, &QCoreApplication::aboutToQuit, onAppExit);
MainWindow w;
MainWindow w;
if(!only_printf) w.show();
w.show();
return a.exec();
}

View File

@ -8,9 +8,15 @@
#include "flatui.h"
#include <QDebug>
#include <QDesktopServices>
extern MainWindow* main_window;
#pragma execution_character_set("utf-8")
#pragma execution_character_set("utf-8")
void MainWindow::winow_on_top(bool is_top)
{
if(is_top)
setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint);
else
setWindowFlags(windowFlags()&(~Qt::WindowStaysOnTopHint));
}
@ -18,6 +24,8 @@ MainWindow::MainWindow(QWidget *parent) : FramelessMainWindow(parent), ui(new Ui
{
ui->setupUi(this);
this->initForm();
winow_on_top(true);
// winow_on_top(false);
}
MainWindow::~MainWindow()
@ -45,12 +53,10 @@ void MainWindow::initForm()
list << "#titleBar{background:#BBBBBB;}";
list << "#titleBar{border-top-left-radius:8px;border-top-right-radius:8px;}";
list << "#widgetMain{border:2px solid #BBBBBB;background:#FFFFFF;}";
//list << "#widgetMain{border-bottom-left-radius:8px;border-bottom-right-radius:8px;}";
list << "#widgetMain{border-bottom-left-radius:8px;border-bottom-right-radius:8px;}";
this->setStyleSheet(list.join(""));
FlatUI::setScrollBarQss(ui->ram_scrollArea->verticalScrollBar(), 8, 120, 20, "##E5E5E5", "#D0D0D0", "#1ABC9C", "#E74C3C");
FlatUI::setScrollBarQss(ui->ram_scrollArea->horizontalScrollBar(), 8, 120, 20, "#E5E5E5", "#D0D0D0", "#1ABC9C", "#E74C3C");
FlatUI::setScrollBarQss(ui->ram_scrollArea->verticalScrollBar(), 8, 120, 20, "#E5E5E5", "#D0D0D0", "#1ABC9C", "#E74C3C");
FlatUI::setScrollBarQss(ui->flash_scrollArea->verticalScrollBar(), 8, 120, 20, "#E5E5E5", "#D0D0D0", "#1ABC9C", "#E74C3C");
FlatUI::setScrollBarQss(ui->flash_scrollArea->horizontalScrollBar(), 8, 120, 20, "#E5E5E5","#D0D0D0", "#1ABC9C", "#E74C3C");
FlatUI::setScrollBarQss(ui->ram_table->horizontalScrollBar(), 8, 120, 20, "#E5E5E5", "#D0D0D0", "#1ABC9C", "#E74C3C");
FlatUI::setScrollBarQss(ui->ram_table->verticalScrollBar(), 8, 120, 20, "#E5E5E5", "#D0D0D0", "#1ABC9C", "#E74C3C");
@ -63,28 +69,16 @@ void MainWindow::initForm()
main_window=this;
map_path="P:/AT32_F403A_FreeRTOS/MDK_Project";
project_path="P:/AT32_F403A_FreeRTOS/MDK_Project";
//map_path="./";
//project_path="./";
ui->map_path->setText(map_path);
ui->project_path->setText(project_path);
ram_pieseries=new QPieSeries();
flash_pieseries=new QPieSeries();
cpu= new parse_keil_project(ui->project_path->text());
cpu->to_parse_keil_project(ui->project_path->text());
if(cpu->getCpu_core_name()!="8051")
{
map= new parse_map_from_keil( ui->map_path->text(),cpu->IRAM.getBase_addr(),cpu->IRAM.getMax_size(),cpu->IROM.getBase_addr(),cpu->IROM.getMax_size());
if(map->to_parse_map_from_keil(ui->map_path->text()))
map_calculate_size_by_address(map);
}else {
m51 =new parse_m51_from_keil(ui->map_path->text(),cpu->IRAM.getMax_size(),cpu->XRAM.getMax_size(),cpu->IROM.getMax_size());
}
ram_chart=new QChart();
flash_chart=new QChart();
@ -103,12 +97,14 @@ ram_chart->legend()->hide();
ram_chart->setTheme(QChart::ChartThemeQt);
ram_chart->setBackgroundBrush(QBrush(Qt::gray));
ram_chart->setTitleBrush(Qt::white);; // 数据集分类标题文字颜色
flash_chart->addSeries(flash_pieseries);
flash_chart->setTitle("文件flash分布饼图");
flash_chart->legend()->hide();
// Set the theme to one of the predefined themes
flash_chart->setTheme(QChart::ChartThemeQt);
flash_chart->setBackgroundBrush(QBrush(Qt::gray));
flash_chart->setTitleBrush(Qt::white);
ui->ram_chart_view->setChart(ram_chart);
ui->ram_chart_view->setRubberBand(QChartView::RectangleRubberBand);
@ -116,17 +112,46 @@ ui->ram_chart_view->setRubberBand(QChartView::RectangleRubberBand);
ui->flash_chart_view->setChart(flash_chart);
ui->flash_chart_view->setRubberBand(QChartView::RectangleRubberBand);
update_cpu_info();
if(map_path.length()>1&&project_path.length()>1)
{
cpu= new parse_keil_project(ui->project_path->text());
if(cpu->to_parse_keil_project(ui->project_path->text()))
{
update_cpu_info();
if(cpu->getCpu_core_name()!="8051")
{
update_map_info();
}else {
update_m51_info();
if(cpu->getCpu_core_name()!="8051")
{
}else {
}
}
if(cpu->getCpu_core_name()!="8051")
{
map= new parse_map_from_keil( ui->map_path->text(),cpu->IRAM.getBase_addr(),cpu->IRAM.getMax_size(),cpu->IROM.getBase_addr(),cpu->IROM.getMax_size());
if(map->to_parse_map_from_keil(ui->map_path->text()))
{
map_calculate_size_by_address(map);
update_map_info();
}
}else {
m51 =new parse_m51_from_keil(ui->map_path->text(),cpu->IRAM.getMax_size(),cpu->XRAM.getMax_size(),cpu->IROM.getMax_size());
if(m51->to_parse_m51_from_keil(ui->map_path->text()))
{
update_m51_info();
}
}
}
fflush(stdout);
}
@ -238,7 +263,6 @@ void MainWindow::on_update_info_clicked()
cpu=nullptr;
}
cpu= new parse_keil_project(ui->project_path->text());
if(cpu->to_parse_keil_project(ui->project_path->text()))
update_cpu_info();
@ -252,10 +276,11 @@ void MainWindow::on_update_info_clicked()
}
map= new parse_map_from_keil(ui->map_path->text(),cpu->IRAM.getBase_addr(),cpu->IRAM.getMax_size(),cpu->IROM.getBase_addr(),cpu->IROM.getMax_size());
if(map->to_parse_map_from_keil(ui->map_path->text()))
{
map_calculate_size_by_address(map);
update_map_info();
}
}else {
@ -272,7 +297,7 @@ void MainWindow::on_update_info_clicked()
}
fflush(stdout);
}
@ -295,7 +320,7 @@ void MainWindow::on_ram_table_itemSelectionChanged()
QPieSlice *slice = ram_pieseries->slices().at(row);
slice->setExploded();//突出这一块
slice->setLabelVisible();//设置这一块可见数据
slice->setLabelBrush(Qt::white);
}
@ -319,6 +344,7 @@ void MainWindow::on_flash_table_itemSelectionChanged()
QPieSlice *slice = flash_pieseries->slices().at(row);
slice->setExploded();//突出这一块
slice->setLabelVisible();//设置这一块可见数据
slice->setLabelBrush(Qt::white);
}
@ -371,7 +397,21 @@ void MainWindow::update_m51_info(void)
clearLayout(ui->flash_scrollAreaWidgetContents->layout());
// 移除并释放布局中的所有小部件
for(uint64_t row_cnt=0;row_cnt<ui->ram_table->rowCount();row_cnt++)
{
ui->ram_table->removeRow(row_cnt);
}
ui->ram_table->clear();
ram_pieseries->clear();
for(uint64_t row_cnt=0;row_cnt<ui->flash_table->rowCount();row_cnt++)
{
ui->flash_table->removeRow(row_cnt);
}
ui->flash_table->clear();
flash_pieseries->clear();
for(i=0;i<m51->ram_list.size();i++)
{
@ -421,6 +461,12 @@ set_bar_style(ui->ram_used_bar,ram_all_used_size/1.0/ram_all_max_size/1.0);
}
set_bar_style(ui->flash_used_bar,ram_all_used_size/1.0/ram_all_max_size/1.0);
if(ui->ram_scrollArea->verticalScrollBar()!=nullptr)
FlatUI::setScrollBarQss(ui->ram_scrollArea->verticalScrollBar(), 8, 120, 20, "##E5E5E5", "#D0D0D0", "#1ABC9C", "#E74C3C");
if(ui->ram_scrollArea->verticalScrollBar()!=nullptr)
FlatUI::setScrollBarQss(ui->flash_scrollArea->verticalScrollBar(), 8, 120, 20, "#E5E5E5", "#D0D0D0", "#1ABC9C", "#E74C3C");
}
void MainWindow::setPieSliceStyle(QPieSlice* slice, qreal percentage, qreal maxPercentage)
@ -452,6 +498,10 @@ void MainWindow::setPieSliceStyle(QPieSlice* slice, qreal percentage, qreal maxP
void MainWindow::update_map_info(void)
{
if(map->ram_list.length()==0)
return;
if(map->flash_list.length()==0)
return;
uint64_t ram_all_max_size=0;
uint64_t ram_all_used_size=0;
uint64_t ram_min_base_addr=map->ram_list.at(0)->getBase_addr();
@ -471,14 +521,14 @@ for(uint64_t row_cnt=0;row_cnt<ui->ram_table->rowCount();row_cnt++)
ui->ram_table->removeRow(row_cnt);
}
ui->ram_table->clear();
ram_pieseries->clear();
for(uint64_t row_cnt=0;row_cnt<ui->flash_table->rowCount();row_cnt++)
{
ui->flash_table->removeRow(row_cnt);
}
ui->flash_table->clear();
flash_pieseries->clear();
@ -531,7 +581,7 @@ set_bar_style(ui->ram_used_bar,ram_all_used_size/1.0/ram_all_max_size/1.0);
ui->flash_used->setText(QString().sprintf("占用:%.4f MB / (%.4f MB)",flash_all_used_size/1024.0/1024.0,flash_all_max_size/1024.0/1024.0));
}
set_bar_style(ui->flash_used_bar,ram_all_used_size/1.0/ram_all_max_size/1.0);
set_bar_style(ui->flash_used_bar,flash_all_used_size/1.0/flash_all_max_size/1.0);
@ -617,7 +667,10 @@ set_bar_style(ui->ram_used_bar,ram_all_used_size/1.0/ram_all_max_size/1.0);
}
if(ui->ram_scrollArea->verticalScrollBar()!=nullptr)
FlatUI::setScrollBarQss(ui->ram_scrollArea->verticalScrollBar(), 8, 120, 20, "#E5E5E5", "#D0D0D0", "#1ABC9C", "#E74C3C");
if(ui->ram_scrollArea->verticalScrollBar()!=nullptr)
FlatUI::setScrollBarQss(ui->flash_scrollArea->verticalScrollBar(), 8, 120, 20, "#E5E5E5", "#D0D0D0", "#1ABC9C", "#E74C3C");
}

View File

@ -24,6 +24,7 @@ class MainWindow : public FramelessMainWindow
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void winow_on_top(bool is_top);
void setPieSliceStyle(QPieSlice* slice, qreal percentage, qreal maxPercentage);
void set_bar_style(QProgressBar *bar,float per);
void update_cpu_info(void);
@ -64,5 +65,5 @@ private slots:
void on_flash_table_itemSelectionChanged();
void on_gitee_index_clicked();
};
extern MainWindow* main_window;
#endif // MAINWINDOW_H

View File

@ -460,7 +460,7 @@ color: rgb(255, 255, 255);
</string>
</property>
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="bulid_info">
<attribute name="title">
@ -480,34 +480,34 @@ color: rgb(255, 255, 255);
</sizepolicy>
</property>
<property name="title">
<string>mcu_name</string>
<string> 主控名称</string>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="1">
<widget class="QLabel" name="cpu_colck">
<property name="text">
<string>最高主频:</string>
<string>最高主频:未知</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="flash">
<property name="text">
<string>内部flash 大小:</string>
<string>内部flash 大小:未知</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="iram">
<property name="text">
<string>内部ram 大小:</string>
<string>内部ram 大小:未知</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="cpu_core">
<property name="text">
<string>核心:</string>
<string>核心:未知</string>
</property>
</widget>
</item>
@ -549,13 +549,13 @@ color: rgb(255, 255, 255);
<item row="0" column="0">
<widget class="QGroupBox" name="ram_name">
<property name="title">
<string> all_ram</string>
<string>全部ram</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="ram_addr">
<property name="text">
<string>地址0xxxxxx</string>
<string>地址0x00</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -565,21 +565,21 @@ color: rgb(255, 255, 255);
<item>
<widget class="QProgressBar" name="ram_used_bar">
<property name="value">
<number>24</number>
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="ram_used">
<property name="text">
<string>占用:</string>
<string>占用:0</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="ram_remain">
<property name="text">
<string>还剩:</string>
<string>还剩:0</string>
</property>
</widget>
</item>
@ -614,13 +614,13 @@ color: rgb(255, 255, 255);
<item row="0" column="0">
<widget class="QGroupBox" name="flash_name">
<property name="title">
<string>all_flash</string>
<string>全部flash</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="flash_addr">
<property name="text">
<string>地址0xxxxxx</string>
<string>地址0x00</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -630,21 +630,21 @@ color: rgb(255, 255, 255);
<item>
<widget class="QProgressBar" name="flash_used_bar">
<property name="value">
<number>24</number>
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="flash_used">
<property name="text">
<string>占用:</string>
<string>占用:0</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="flash_remain">
<property name="text">
<string>还剩:</string>
<string>还剩:0</string>
</property>
</widget>
</item>
@ -672,7 +672,7 @@ color: rgb(255, 255, 255);
</sizepolicy>
</property>
<property name="title">
<string>project::xxx cup:xxxx</string>
<string>map文件ram占比分析</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
@ -838,6 +838,9 @@ color: rgb(255, 255, 255);
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
@ -850,11 +853,6 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;来反馈BUG或者提供优化代码来帮助维护这个项目&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;或者给予建议或者告诉作者你想要的功能。&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;参与了代码的奉献,实现某些功能或优化了某些代码,&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;会更新到readme的奉献者名单。&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;或者能力赞助该项目开发的,&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;会更新到readme赞助者名单。&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;该软件将永久免费,开源不易,谢谢大家的支持,&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;你的支持是我更新维护项目的动力。&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
@ -918,6 +916,9 @@ p, li { white-space: pre-wrap; }
</item>
<item row="2" column="0" colspan="2">
<widget class="QTextBrowser" name="textBrowser">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;

View File

@ -3,9 +3,11 @@
#include <QFile>
#include <QDomDocument>
#include "find_path.h"
#include <QMessageBox>
#include <Qdebug>
parse_m51_from_keil::parse_m51_from_keil(QString path,uint64_t iram_max_size,uint64_t xram_max_size,
uint64_t irom_max_size)
{
@ -14,7 +16,7 @@ iram_max=iram_max_size;
xram_max=xram_max_size;
irom_max=irom_max_size;
//to_parse_m51_from_keil(path);
}
bool parse_m51_from_keil::to_parse_m51_from_keil(QString path)
@ -29,7 +31,11 @@ qDebug()<<file_path;
return true;
}
else{
qDebug()<<"路径错误";
qDebug()<<"路径错误,请检测输入的工程路径!";
QMessageBox::critical(nullptr, "Error", "路径错误,请检测输入的工程路径!");
return false;
}
}

View File

@ -308,7 +308,10 @@ bool parse_map_from_keil::to_parse_map_from_keil(QString path)
return true;
}else
{
qDebug()<<"路径错误";
qDebug()<<"路径错误,请检测输入的工程路径!";
main_window->winow_on_top(false);
QMessageBox::critical(nullptr, "Error", "路径错误,请检测输入的工程路径!");
return false;
}
}

109
readme.md Normal file
View File

@ -0,0 +1,109 @@
# KDA v1.0 (keil_development_assistant)
keil开发助手项目
[简介](#1)<br>
[功能演示](#2)<br>
[开始使用](#3)<br>
[二次开发环境搭建](#4)<br>
[提供建议&&反馈bug](#5)<br>
<p id="1"></p>
## 简介
这个项目的原型是就是[Keil5_disp_size_bar](https://gitee.com/nikolan/keil5_disp_size_bar)
C语言编写的一个解析map文件输出占用百分比进度条的命令行工具<br>
起初只是为了方便查看代码对芯片的内存ram和存储flash的占用<br>
项目推出不久收到不少网友的喜爱,提出了许多建议,使得项目得以完善。<br>
后来想更进一步开发更多功能,<br>
例如输出ram和flash的地址方便区分<br>
例如查看已使用的ram和flash里每个文件的占比。<br>
到这里C语言和命令行也就不能很好的满足对这些功能的开发了<br>
于是用Qt重新开发了一下于是推出升级版的KDA(keil_development_assistant)<br>
keil开发助手项目就这样诞生了。
<p id="2"></p>
## 功能演示
1.对结构较简单stm32或者各种国产32工程解析。<br>
3.对8051单片机的工程解析。<br>
<p id="3"></p>
## 开始使用
1. 安装KDA
下载代码仓库右侧的发行版<br>
2. 选择安装路径
3. 安装完成
- 普通用法
4. 打开KDA选择工程目录会递归查找子目录选择工程目录后会自动选map目录为工程目录
5. 如果map和工程不在一个命命令再选map所在目录
6. 选择手动更新
- 进阶用法
软件打包时已经设置添加软件安装路径到系统环境变量Path
如果并没有添加成功则需要自己手动添加
在keil after bulid
KDA
<p id="4"></p>
## 二次开发环境搭建
开发环境:
- 系统:window10 x64位
- 框架:Qt5.12.9
- IDE:Qt Creator 4.12.2 (Community)
- 编译链:mingw64
Qt项目库依赖:
```
QT += core gui xml charts
```
克隆仓库代码:
``` shell
git clone xxx
```
使用Qt Creator打开项目即可开始二次开发
<p id="5"></p>
## 提供建议&&反馈bug
可以在代码仓库提Issues
或者发送到邮箱2503865771@qq.com
<p id="6"></p>
## 参与奉献&&赞助