十三、e2studio VS STM32CubeIDE之“单独下载“程序

server/2024/12/27 9:24:47/

目录

一、概述

二、参考资料

三、各家IDE的"在线调试"和"单独下载"按钮

e2studio%E5%A2%9E%E5%8A%A0%22%E5%8D%95%E7%8B%AC%E4%B8%8B%E8%BD%BD%22%E6%8C%89%E9%92%AE-toc" style="margin-left:0px;">四、e2studio增加"单独下载"按钮

4.1 新建外部工具

4.2 增加.jlink脚本

4.3 增加外部工具---"单独下载"按钮

4.3.1 增加前进后退按钮

4.4 增加"单独下载"按钮快捷键

4.5 测试"单独下载"按钮效果

五、总结


一、概述

  • 开发中需要频繁的下载程序,"在线调试"比"单独下载"时间长很多,单独下载可以提高工作效率

  • keil、iar、stm32cubeide、rt-thread studio都自带"在线调试"和"单独下载"两个按钮

  • 如何让e2studio增加单独下载按钮--->外部工具调用jlink

二、参考资料

  • 参考rt-thread studio"单独下载"功能请实现e2studio增加"单独下载"按钮

  • https://blog.csdn.net/qq_29246181/article/details/119427857

三、各家IDE的"在线调试"和"单独下载"按钮

图片

图片

图片

图片

图片

e2studio%E5%A2%9E%E5%8A%A0%22%E5%8D%95%E7%8B%AC%E4%B8%8B%E8%BD%BD%22%E6%8C%89%E9%92%AE">四、e2studio增加"单独下载"按钮

4.1 新建外部工具

图片


位置:

C:\Program Files (x86)\SEGGER\JLink_V782\JLink.exe

工作目录:

${project_loc}

自变量:

-device R7FA6M4AF -ExitOnError -CommanderScript download_init.jlink

4.2 增加.jlink脚本

图片


download_init.jlink 放在工程根目录下

si 1
exec device=R7FA6M4AF
speed 4000
r
h
loadfile "E:\RS_workspace\ra6m4_backtrace\Debug\ra6m4_backtrace.hex" 
setpc 
r
g
q
Go

4.3 增加外部工具---"单独下载"按钮

图片

图片

4.3.1 增加前进后退按钮

图片

4.4 增加"单独下载"按钮快捷键

图片

4.5 测试"单独下载"按钮效果

  • 必须提示segger下载窗口
     

    图片

  • 控制台日志
     

    图片

SEGGER J-Link Commander V7.82 (Compiled Oct 13 2022 13:34:15)
DLL version V7.82, compiled Oct 13 2022 13:32:51J-Link Commander will now exit on ErrorJ-Link Command File read successfully.
Processing script file...
J-Link>si 1
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-S124 compiled Jul  3 2024 17:03:07
Hardware version: V1.00
J-Link uptime (since boot): 0d 01h 38m 26s
S/N: 831467091
USB speed mode: Full speed (12 MBit/s)
VTref=3.300V
Selecting SWD as current target interface.
J-Link>exec device=R7FA6M4AF
Device "R7FA6M4AF" selected.
J-Link>speed 4000
Selecting 4000 kHz as target interface speed
J-Link>r
Target connection not established yet but required for command.
Device "R7FA6M4AF" selected.Connecting to target via SWD
ConfigTargetSettings() start
Configuring FlashDLNoRMWThreshold=0x200 in order to make sure that option bytes programming is done via read-modify-write
ConfigTargetSettings() end
InitTarget() start
Determining TrustZone configuration...Secure Debug: Enabled (SSD)
Determining currently configured transfer type by reading the AHB-AP CSW register.--> Correct transfer type configured. Done.
InitTarget() end
Found SW-DP with ID 0x6BA02477
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x84770001)
AP[1]: APB-AP (IDR: 0x54770002)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FE000
CPUID register: 0x410FD214. Implementer code: 0x41 (ARM)
Feature set: Mainline
Found Cortex-M33 r0p4, Little endian.
FPUnit: 8 code (BP) slots and 0 literal slots
Security extension: implemented
Secure debug: enabled
CoreSight components:
ROMTbl[0] @ E00FE000
[0][0]: E0044000 CID B105900D PID 005BB906 DEVARCH 00000000 DEVTYPE 14 CTI (?)
[0][1]: E0047000 CID B105900D PID 003BB908 DEVARCH 00000000 DEVTYPE 12 CSTF
[0][2]: E0048000 CID B105900D PID 001BB961 DEVARCH 00000000 DEVTYPE 21 ETB
[0][3]: E0049000 CID B105F00D PID 001BB101 TSG
[0][4]: E0040000 CID B105900D PID 000BBD21 DEVARCH 00000000 DEVTYPE 11 TPIU
[0][5]: E00FF000 CID B105100D PID 000BB4C9 ROM Table
ROMTbl[1] @ E00FF000
[1][0]: E000E000 CID B105900D PID 000BBD21 DEVARCH 47702A04 DEVTYPE 00 Cortex-M33
[1][1]: E0001000 CID B105900D PID 000BBD21 DEVARCH 47701A02 DEVTYPE 00 DWT
[1][2]: E0002000 CID B105900D PID 000BBD21 DEVARCH 47701A03 DEVTYPE 00 FPB
[1][3]: E0000000 CID B105900D PID 000BBD21 DEVARCH 47701A01 DEVTYPE 43 ITM
[1][5]: E0041000 CID B105900D PID 002BBD21 DEVARCH 47724A13 DEVTYPE 13 ETM
[1][6]: E0042000 CID B105900D PID 000BBD21 DEVARCH 47701A14 DEVTYPE 14 CSS600-CTI
Cortex-M33 identified.
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: ARMv8M core with Security Extension enabled detected.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
J-Link>h
PC = 000023D0, CycleCnt = 00000000
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 20002B84, R9 = 0000001C, R10= 0440C080, R11= 00100315
R12= 0000000A
SP(R13)= 20002750, MSP= 20002750, PSP= 00000000, R14(LR) = FFFFFFFF
XPSR = F9000000: APSR = NZCVQ, EPSR = 01000000, IPSR = 000 (NoException)
CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
MSPLIM = 00000000
PSPLIM = 00000000Security extension regs:
MSP_S = 20002750, MSP_NS = 00000000
MSPLIM_S = 00000000, MSPLIM_NS = 00000000
PSP_S = 00000000, PSP_NS = 4F440408
PSPLIM_S = 00000000, PSPLIM_NS = 00000000
CONTROL_S  = 00, FAULTMASK_S  = 00, BASEPRI_S  = 00, PRIMASK_S  = 00
CONTROL_NS = 00, FAULTMASK_NS = 00, BASEPRI_NS = 00, PRIMASK_NS = 00FPS0 = 00000000, FPS1 = 00000000, FPS2 = 00000000, FPS3 = 00000000
FPS4 = 00000000, FPS5 = 00000000, FPS6 = 00000000, FPS7 = 00000000
FPS8 = 00000000, FPS9 = 00000000, FPS10= 00000000, FPS11= 00000000
FPS12= 00000000, FPS13= 00000000, FPS14= 00000000, FPS15= 00000000
FPS16= 00000000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000
FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000
FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000
FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= 00000000
FPSCR= 00000000
J-Link>loadfile "E:\RS_workspace\ra6m4_backtrace\Debug\ra6m4_backtrace.hex" 
'loadfile': Performing implicit reset & halt of MCU.
Reset: ARMv8M core with Security Extension enabled detected.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Downloading file [E:\RS_workspace\ra6m4_backtrace\Debug\ra6m4_backtrace.hex]...
J-Link: Flash download: Bank 0 @ 0x0100A100: Skipped. Contents already match
J-Link: Flash download: Bank 1 @ 0x00000000: Skipped. Contents already match
O.K.
J-Link>setpc 
Syntax: SetPC <addr>Script processing completed.

五、总结

  • 通过e2studio(eclipse)外部工具调用jlink.exe,通过jlink指令下载

  • e2studio默认未显示相关工具,需显示工具栏和设置快捷键

    图片


http://www.ppmy.cn/server/153583.html

相关文章

如何使用命令行设置Java当前环境是最新版本的JDK

一、环境变量的优先级 在Windows中&#xff0c;环境变量的设置顺序是有优先级的。 如果 PATH 环境变量已经在系统级别或用户级别被设置&#xff0c;并且包含了其他Java版本的路径。 那么即使你在当前会话中添加了新的路径&#xff0c;它也可能不会成为第一个被识别的路径。 …

centos-stream9系统安装docker

如果之前安装过docker需要删除之前的。 for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo yum -y remove $pkg; done 安装yum-utils工具&#xff1a; dnf -y install yum-utils dnf-plugins-core 设置存储库&…

【IMU:视觉惯性SLAM系统】

视觉惯性SLAM系统简介 相机&#xff08;单目/双目/RGBD)与IMU结合起来就是视觉惯性&#xff0c;通常以单目/双目IMU为主。 IMU里面有个小芯片可以测量角速度与加速度&#xff0c;可分为6轴(6个自由度)和9轴&#xff08;9个自由度&#xff09;IMU&#xff0c;具体的关于IMU的介…

Ubuntu vi(vim)编辑器配置一键补全main函数

1.打开对应的配置文件 vi ~/.vim/snippets/c.snippets 2.按G将光标定位到文件末尾 3.按i进入插入模式 以tab键开头插入下的内容&#xff0c;空行也要加 tab键 4.:wq保存退出 5.再打开任意一个新的 .c文件后&#xff0c;插入模式输入 main 然后按tal键就能补全了

区块链期末复习3.2:比特币脚本

目录 一、输入输出脚本的执行 二、简单脚本实例及压栈过程 1.P2PK&#xff08;pay to public key hash&#xff09; 2、P2PH&#xff08;pay to public key hash&#xff09; 3.多重签名 4.比特币脚本的应用&#xff1a; 三、其他常见指令 1.OP_EQUAL与OP&#xff3f;EQ…

重温设计模式--迭代器模式

文章目录 迭代器模式&#xff08;Iterator Pattern&#xff09;概述迭代器模式的结构迭代器模式UML图C 代码示例应用场景 迭代器模式&#xff08;Iterator Pattern&#xff09;概述 定义&#xff1a; 迭代器模式是一种行为型设计模式&#xff0c;它提供了一种方法来顺序访问一个…

7种server的服务器处理结构模型

两种高效的事件处理模式 服务器程序通常需要处理三类事件&#xff1a;I/O 事件、信号及定时事件。有两种高效的事件处理模式&#xff1a;Reactor和 Proactor&#xff0c;同步 I/O 模型通常用于实现Reactor 模式&#xff0c;异步 I/O 模型通常用于实现 Proactor 模式。 无论是 …

Python爬虫:速卖通aliexpress商品详情获取指南

在数字化时代&#xff0c;数据已成为企业竞争的关键资源。对于电商行业而言&#xff0c;获取竞争对手的商品信息是洞察市场动态、优化自身产品策略的重要手段。速卖通&#xff08;AliExpress&#xff09;作为全球知名的跨境电商平台&#xff0c;其商品信息的获取自然成为了许多…