Skip to content

Commit 5fc18a9

Browse files
committed
2 parents 2f7c83a + 3028add commit 5fc18a9

File tree

6 files changed

+72
-45
lines changed

6 files changed

+72
-45
lines changed

.github/workflows/linux.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15-
- name: Set up Python 3.11
15+
- name: Set up Python 3.13
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: "3.11"
18+
python-version: "3.13"
1919
# cache: "pip"
2020
- name: Install dependencies
2121
run: |
2222
sudo apt update -y
2323
sudo apt upgrade -y
2424
sudo apt install ccache
2525
sudo apt install clang
26+
sudo apt install libusb-dev
2627
python -m pip install --upgrade pip
2728
pip install pyside6
2829
pip install pyocd

.github/workflows/macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
steps:
1414
- name: Check out repository
1515
uses: actions/checkout@v4
16-
- name: Set up Python 3.11
16+
- name: Set up Python 3.13
1717
uses: actions/setup-python@v5
1818
with:
19-
python-version: "3.11"
19+
python-version: "3.13"
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip

.github/workflows/windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: windows-latest
1313
steps:
1414
- uses: actions/checkout@v4
15-
- name: Set up Python 3.11
15+
- name: Set up Python 3.13
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: "3.11"
18+
python-version: "3.13"
1919
# cache: 'pip'
2020
- name: Set up MSVC
2121
uses: ilammy/msvc-dev-cmd@v1

MCUProg.py

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
# The output directory and other options
1414
# nuitka-project: --output-dir=build
15-
# nuitka-project: --disable-console
1615
# nuitka-project: --include-data-dir=./icons=./icons
1716
# nuitka-project: --include-data-dir=./resources=./resources
1817
# nuitka-project-if: {OS} in ("Windows"):
18+
# nuitka-project: --windows-console-mode=disable
1919
# nuitka-project: --windows-icon-from-ico=./icons/tool_icon.ico
2020
# nuitka-project-if: {OS} in ("Linux", "FreeBSD"):
2121
# nuitka-project: --linux-icon=./icons/tool_icon.ico
@@ -48,7 +48,7 @@
4848

4949
from pyocd.target.pack.cmsis_pack import CmsisPack
5050

51-
version = "0.0.9"
51+
version = "0.1.0"
5252
author = "打盹的消防车"
5353

5454
try:
@@ -521,36 +521,12 @@ def __init__(self, parent = None) :
521521
self.gridLayout_info.addWidget(self.logs_label, 5, 0, 1, 1)
522522
self.gridLayout_info.addWidget(self.logs, 5, 1, 1, 7)
523523

524-
# 信号与槽
525-
self.pack_selection_button.clicked.connect(self.click_choose_pack)
526-
self.usb_comboBox.pop_up.connect(self.usb_selection)
527-
self.usb_connect_button.clicked.connect(self.usb_connect_button_click)
528-
self.targets_comboBox.pop_up.connect(self.target_selection)
529-
self.file_selection_button.clicked.connect(self.file_selection_button_click)
530-
self.flash_button.clicked.connect(self.flash_button_click)
531-
532524
self.setCentralWidget(self.centralwidget)
533-
534525
self.retranslateUi()
535526

536527
QMetaObject.connectSlotsByName(self)
537528

538-
self.worker = Worker()
539-
self.worker_thread = QThread()
540-
self.worker.moveToThread(self.worker_thread)
541-
self.programmer.connect(self.worker.programmer)
542-
self.mem_read.connect(self.worker.mem_read)
543-
544-
self.worker.programmer_finish.connect(self.programmer_finished)
545-
self.worker.mem_read_finish.connect(self.mem_read_finished)
546-
547-
self.worker.mem_text_show.connect(lambda text: self.mem_textBrowser.insertPlainText(text))
548-
549-
self.worker_thread.start()
550-
551-
self.usb_selection()
552-
self.target_selection()
553-
self.mem_show()
529+
self.init_extra()
554530

555531
def retranslateUi(self):
556532
self.pack_label.setText(QCoreApplication.translate("MCUProg", u"pack文件", None))
@@ -574,7 +550,30 @@ def retranslateUi(self):
574550
self.chip_rom_label.setText(QCoreApplication.translate("MCUProg", u"ROM:", None))
575551
self.chip_other_label.setText(QCoreApplication.translate("MCUProg", u"OTHER:", None))
576552
self.logs_label.setText(QCoreApplication.translate("MCUProg", u"日志:", None))
577-
553+
554+
def init_extra(self):
555+
self.worker = Worker()
556+
self.worker_thread = QThread()
557+
self.worker.moveToThread(self.worker_thread)
558+
self.programmer.connect(self.worker.programmer)
559+
self.mem_read.connect(self.worker.mem_read)
560+
self.worker.programmer_finish.connect(self.programmer_finished)
561+
self.worker.mem_read_finish.connect(self.mem_read_finished)
562+
self.worker.mem_text_show.connect(lambda text: self.mem_textBrowser.insertPlainText(text))
563+
self.worker_thread.start()
564+
565+
# 信号与槽
566+
self.pack_selection_button.clicked.connect(self.click_choose_pack)
567+
self.usb_comboBox.pop_up.connect(self.usb_selection)
568+
self.usb_connect_button.clicked.connect(self.usb_connect_button_click)
569+
self.targets_comboBox.pop_up.connect(self.target_selection)
570+
self.file_selection_button.clicked.connect(self.file_selection_button_click)
571+
self.flash_button.clicked.connect(self.flash_button_click)
572+
573+
self.usb_selection()
574+
self.target_selection()
575+
self.mem_show()
576+
578577
def usb_selection(self):
579578
self.usb_probe()
580579

@@ -612,7 +611,7 @@ def usb_connect_button_click(self):
612611
self.Probe = Probe
613612
break
614613
# print(self.usb_comboBox.currentText())
615-
print(Probe,Probe.unique_id)
614+
# print(Probe,Probe.unique_id)
616615
# print(self.targets_comboBox.currentText())
617616
# print(self.frequency[self.speed_comboBox.currentText()])
618617
if self.Probe:
@@ -706,8 +705,9 @@ def mem_read_finished(self):
706705
self.mem_toolButton.setEnabled(True)
707706

708707
def flash_button_click(self):
709-
self.flash_button.setEnabled(False)
710-
self.programmer.emit(self)
708+
if self.file_path != '':
709+
self.flash_button.setEnabled(False)
710+
self.programmer.emit(self)
711711

712712
def usb_probe(self):
713713
self.allProbes = ConnectHelper.get_all_connected_probes(False, None, False)

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
**English** | [中文](./README_zh.md)
22

3-
![github license](https://img.shields.io/github/license/Dozingfiretruck/MCUProg)![linux](https://github.com/Dozingfiretruck/MCUProg/actions/workflows/windows.yml/badge.svg?branch=master)![linux](https://github.com/Dozingfiretruck/MCUProg/actions/workflows/linux.yml/badge.svg?branch=master)
4-
53
# MCUProg
64

5+
![github license](https://img.shields.io/github/license/Dozingfiretruck/MCUProg)[![Latest Release](https://img.shields.io/github/v/release/Dozingfiretruck/MCUProg?label=Release&logo=github)](https://github.com/Dozingfiretruck/nes/releases/latest)![windows](https://github.com/Dozingfiretruck/MCUProg/actions/workflows/windows.yml/badge.svg?branch=master)![linux](https://github.com/Dozingfiretruck/MCUProg/actions/workflows/linux.yml/badge.svg?branch=master)
6+
7+
github: [MCUProg](https://github.com/Dozingfiretruck/MCUProg) (recommend)
8+
9+
gitee: [MCUProg:](https://gitee.com/Dozingfiretruck/MCUProg) (updates may not be timely due to synchronization issues)
10+
711
## Introduction
812

913
MCUProg is a MUC programming host computer software based on pyocd+PySide6 (this software is only used to learn pyocd and PySide6 practice projects, if it can help you, it is a great honor, you can also modify it at will)
@@ -12,8 +16,8 @@ MCUProg is a MUC programming host computer software based on pyocd+PySide6 (this
1216

1317
## Software Architecture
1418

15-
pyocd: 0.36.0
16-
PySide6: 6.7.0
19+
pyocd: 0.37.0
20+
PySide6: 6.9.1
1721

1822
## Support platform
1923

@@ -41,6 +45,8 @@ PySide6: 6.7.0
4145

4246
Linux to install the driver,The driver is in the [udev](./udev/) directory of the repository,Instructions for [pyocd Linux driver installation](./udev/README.md)
4347

48+
and need install libusb : `apt install libusb-dev`
49+
4450
## Precautions
4551

4652
If the programming fails, please check the following points
@@ -51,6 +57,14 @@ If the programming fails, please check the following points
5157
4. Whether there is an interruption to the download, such as unplugging the USB operation
5258
5. In other cases, please try to restart the software, if it cannot be solved, please give feedback in time
5359

60+
## Download link
61+
62+
github: https://github.com/Dozingfiretruck/MCUProg/releases
63+
64+
gitee: https://gitee.com/Dozingfiretruck/MCUProg/releases
65+
66+
67+
5468
## Software Presentation
5569

5670
![MCUProg](./doc/MCUProg.png)

README_zh.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
[**English**](./README.md) | **中文**
22

3-
![github license](https://img.shields.io/github/license/Dozingfiretruck/MCUProg)![linux](https://github.com/Dozingfiretruck/MCUProg/actions/workflows/windows.yml/badge.svg?branch=master)![linux](https://github.com/Dozingfiretruck/MCUProg/actions/workflows/linux.yml/badge.svg?branch=master)
4-
53
# MCUProg
64

5+
![github license](https://img.shields.io/github/license/Dozingfiretruck/MCUProg)[![Latest Release](https://img.shields.io/github/v/release/Dozingfiretruck/MCUProg?label=Release&logo=github)](https://github.com/Dozingfiretruck/nes/releases/latest)![windows](https://github.com/Dozingfiretruck/MCUProg/actions/workflows/windows.yml/badge.svg?branch=master)![linux](https://github.com/Dozingfiretruck/MCUProg/actions/workflows/linux.yml/badge.svg?branch=master)
6+
7+
github: [MCUProg](https://github.com/Dozingfiretruck/MCUProg) (推荐)
8+
9+
gitee: [MCUProg:](https://gitee.com/Dozingfiretruck/MCUProg) (由于同步问题可能导致更新不及时)
10+
711
## 介绍
812

913
MCUProg是一款基于pyocd+PySide6的MUC烧录上位机软件(此软件只是用来学习pyocd和PySide6的练手项目,如果能帮到你那无比荣幸,你也可以任意修改)
@@ -12,8 +16,8 @@ MCUProg是一款基于pyocd+PySide6的MUC烧录上位机软件(此软件只是
1216

1317
## 软件架构
1418

15-
pyocd: 0.36.0
16-
PySide6: 6.7.0
19+
pyocd: 0.37.0
20+
PySide6: 6.9.1
1721

1822
## 支持平台
1923

@@ -35,6 +39,8 @@ PySide6: 6.7.0
3539

3640
linux下要安装驱动, 驱动在仓库[udev](./udev/)目录下,使用说明参考[pyocd linux驱动安装](./udev/README.md)
3741

42+
并需要安装libusb : `apt install libusb-dev`
43+
3844
## 注意事项
3945

4046
如烧录失败请检查一下几点
@@ -45,6 +51,12 @@ linux下要安装驱动, 驱动在仓库[udev](./udev/)目录下,使用说明
4551
4. 是否有中断下载比如拔出usb操作
4652
5. 其他情况请尝试重启软件,如无法解决请及时反馈
4753

54+
## 下载地址
55+
56+
github: https://github.com/Dozingfiretruck/MCUProg/releases
57+
58+
gitee: https://gitee.com/Dozingfiretruck/MCUProg/releases
59+
4860
## 软件展示
4961

5062
![MCUProg](./doc/MCUProg.png)

0 commit comments

Comments
 (0)