4 Star 53 Fork 41

立创开发板/立创DAPLINK调试工具

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
Apache-2.0

实物图

项目介绍

本多功能调试器是基于天空星(GD32F407VET6青春版)开发板制作,扩展板与开发板通过双路40P排针连接,支持如下功能:


在线DAPLINK(SWD+JTAG协议,CDC虚拟串口最高2M不丢包);

离线脱机烧录(无需连接电脑就可烧录目标芯片);

可实时检测三路(5V0,3V3,PD)的电压电流输出(方便调试时观察供电电压,电流和功率);

自带串口监视器(支持TTL,RS232,RS485,可以直接连接电脑使用,也可在自带界面上临时使用);

PWM输出(输入周期和脉宽自动计算频率和占空比);

DAC波形输出(支持正弦波,方波,三角波,梯形波,上升斜坡锯齿波,下降斜坡锯齿波及自定义任意波形的输出,频率可调)。

支持梁山派,天空星系列开发板以及其他原版DAPLINK支持芯片的调试与下载,支持泰山派开发板的调试及供电。


该项目使用RT-Thread5.1.0LVGL8.3DAPLINKCherryUSB-0.10.2CherryRBuMCN等开源项目实现,是学习天空星极佳的综合项目,其中涉及USB,UI,文件系统,ADC+DMA+TIMER高速定时采样,SWD协议实现脱机下载,串口+DMA+ringbuffer实现高速串口收发,PWM输出,DAC波形输出等内容。

软硬件全开源,软件、硬件、外壳、面板均可自行修改定制,可以完全自定义。

学完了也不会吃灰,可以直接作为工具陪伴你的嵌入式旅程。

硬件框图

diagram

如何获取固件

自行编译

git clone 本仓库或者点击【克隆/下载】直接下载zip压缩包。

进入目录:LCKFB-DAPLINK-DEBUG-TOOL-master\1_Code并双击打开project.uvprojx

编译完成后,LCKFB-DAPLINK-DEBUG-TOOL-master\1_Code目录下的rtthread.bin即为我们需要的固件。

下载发行版中的附件

单击 立创DAPLINK调试工具固件V1.0.0

dN2B45y6dR

下载LCKFB-DAPLINK-DEBUG-TOOL-V1.0.0.bin

Cg2mpJf2kY

如何烧录

MDK使用外部调试器直接下载

如果有外部调试器比如其他的DAPLINK(比如之前梁山派自带的下载器)或Jlink,将立创梁山派·天空星开发板焊接好下载排针。连入外部下载器,打开MDK(KEIL)工程(1_Code目录下的project.uvprojx),选好你使用的下载器。其他就和下载普通程序一样了。详情请参考**【立创·梁山派-天空星】入门手册**,其中【程序下载】章节中的DAP-LINK下载有详细介绍。

使用GD32官方上位机进行下载

下载好上面的hex固件,打开GD32官方的DFU下载工具。具体操作步骤参考【立创·梁山派-天空星】入门手册,其中【程序下载】章节中的DFU下载有详细介绍,只不过在下载代码测试环节中下载的hex固件变为你上面获取到的固件。

功能介绍

init

在线DAPLINK

N2Jd8ZZeyJ

将本调试器通过数据线和电脑连接,打开KEIL(MDK)选择调试器为CMSIS-DAP Debugger后就当成普通DAPLINK使用就可以了,在KEIL中设置调试协议(Port)(SWD/JTAG),设置最大调试时钟在DAPLINK界面也会同步刷新信息。为了保证调试速度,只实现了winusb版本的DAPLINK,同时也支持了CDC模拟的串口,最高支持2M的波特率,当然,就把他当做普通的串口工具用就可以,不需要专门的上位机,在串口软件中选择正确的端口号,打开后界面也会同步刷新,显示当前的波特率,数据位数,校验位和停止位信息。

同时,为了方便大家在实际使用中对电源的需求,这里也提供了5V,3V3,PD诱骗档位及使能的控制和这三路的电压电流信息,可以通过这5向导航按键来控制对应的输出状态。

离线脱机烧录

img_v3_02bd_0924b2ac-7637-474e-92a9-f5ca9b94321g

本功能主要是在脱离电脑的情况下对目标芯片执行下载功能,适合在批量生产电路板时给工厂使用。当前初版支持STM32F4系列,GD32F4系列和CH32F4A系列,也就是天空星当前有的三个版本的离线脱机烧录,后面会逐步适配更多可供下载的芯片类型。

通过5向导航按键分别选择对应的芯片型号(FLM下载算法文件),选择要下载的固件文件(当前只支持bin文件),然后选中开始烧录按键,单击中间就会开始下载了,下方的进度条如果能正常走完就说明下载成功。进度条右上方的文本是提示信息,对进一个芯片进行下载会经过以下几个步骤:

  1. 检查所选的固件文件路径是否过长。
  2. 判断所选的固件文件是不是以.bin后缀结尾,然后以只读模式打开。
  3. 将FLM文件加载到目标单片机的RAM里面,其实FLM文件就是普通的单片机程序(就是.axf文件改了个后缀),这个程序里面包含了对目标单片机内部FLASH的操作(初始化,擦除扇区,擦除整个FLASH,编程扇区,校验,查空等),我们只需要把这个文件写入到目标单片机的RAM,然后解析各个函数的偏移地址最后按需调用就可以了。
  4. 计算读取固件的大小,擦除对应目标单片机的内部FLASH。
  5. 通过解析FLM文件得到操作目标芯片FLASH的函数偏移地址,通过这个地址去调用已经加载到目标单片机RAM里面的函数实现对目标单片机FLASH的编程。
  6. 进行读回校验,重新打开所选中的固件,按照对应偏移去读取已经写入目标芯片内部FLASH的内容。
  7. 执行复位,让目标单片机从FLASH开始运行。

电压电流输出

img_v3_02bd_8b4e9d4a-875b-4ee8-bab6-5053a72764dg

本功能实现了三路电压电流及功率的显示,总共有四个页面,前三个页面每个页面有三个显示栏,从上往下依次是各对应通道的电压,电流及功率。最后一个页面是对前面三路电源的使能控制,以及对PD诱骗档位的调节控制。

串口监视器

image-20240531160731055

本功能实现了简单的串口查看功能,受限于芯片性能,数据多了后会比较卡,如果串口数据很多还是建议大家使用电脑上的串口助手软件。这个页面的左上角是对串口波特率的配置,右上角是对串口校验位的配置,默认情况下是8位数据位,1位停止位,这两个参数是不支持在该界面下配置的。当前的每个界面功能都是独立运行的,即使在其他界面也可以在电脑上使用CDC串口的功能,这个界面只适合简单查看调试数据,如果真的需要接收大量数据,还是乖乖连接电脑使用吧,不要为难自己。

PWM输出

img_v3_02bd_85f2216f-f1c6-497f-a913-0ffae432150g

fF8njMDr6h

本功能实现了PWM的输出,可以通过虚拟小键盘设置PWM的周期长度和脉宽长度,虚拟小键盘隐藏后在下方会自动计算出频率和占空比

DAC输出

img_v3_02bd_afaae66d-3125-452c-9d6e-bac257d4c02g

本功能实现了正弦波,方波,三角波,梯形波,上升斜坡锯齿波,下降斜坡锯齿波及自定义任意波形的输出,可以设置输出频率,最高200KHz,32点数据。通过虚拟小键盘可以设置频率,输出电压,设置自定义任意波形数据,这些值改变后就会实时更新并通过DAC引脚输出。

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

本多功能调试器是基于天空星(GD32F407VET6/STM32F407V青春版)开发板制作,扩展板与开发板通过双路40P排针连接 expand collapse
Apache-2.0
Cancel

Releases (3)

All

Contributors

All

Activities

Load More
can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lcsc/LCKFB-DAPLINK-DEBUG-TOOL.git
git@gitee.com:lcsc/LCKFB-DAPLINK-DEBUG-TOOL.git
lcsc
LCKFB-DAPLINK-DEBUG-TOOL
立创DAPLINK调试工具
master

Search