Ubuntu下Jlink驱动安装使用

Ubuntu下Jlink驱动安装使用

    • 1. Jlink驱动下载安装
    • 2. Jlink驱动配置

想自己开发Nuttx系统,很重要的一步就是将自己的代码下载到相应的硬件上,对于STM家族处理器而言,我们很多时候会使用Jlink或者Stlink,但是用于JLINK可以直接给硬件供电,使用起来更加方便,因此这里将Jlink驱动的安装。

1. Jlink驱动下载安装

Jlink驱动下载可以去官网下载好linux版再安装。
参考博客:https://blog.csdn.net/justloong/article/details/73467875

2. Jlink驱动配置

在安装好驱动之后,我们要检测自己的硬件是否真的能通过Jlink与电脑连接,这一步参考博客:https://blog.csdn.net/lc_cc/article/details/66982821

这里会出现一些问题,就是在选择单片机芯片类型的时候,可能会出现无法识别的问题,如下所示

J-Link>connect
Please specify device / core. <Default>: Unspecified
Type '?' for selection dialog
Device>STM32F4
The selected device "STM32F4" is unknown to this version of the J-Link software.

这里具体原因我不清除,但是有一个简单的办法,因为在JLink文件夹下面有一些更细致分类,对于我手上的单片机:STM32F407ZGT6,我可以运行JlinkSTM32Exe这个文件,然后选择对应单片机,在进入JlinkExe这个文件里面连接之后就会出现默认的单片机类型。具体结果如下:

breeze@breeze-Inspiron-5559:/opt/SEGGER/JLink_V648$ ./JLinkSTM32Exe
SEGGER J-Link Unlock tool for STM32 devices
Compiled Jul 26 2019 17:51:20
(c) 2009-2015 SEGGER Microcontroller GmbH, www.segger.com
              Solutions for real time microcontroller applications

This program is designed to reset the option bytes of a STM32 device to their factory settings. If read protection of the device is enabled, reset the option bytes will cause a mass erase.

Options:
  [0] Exit
  [1] STM32F0xxxx
  [2] STM32F1xxxx
  [3] STM32F2xxxx
  [4] STM32F3xxxx
  [5] STM32F4xxxx
  [6] STM32F72xxx, STM32F73xxx
  [7] STM32F74xxx, STM32F75xxx
  [8] STM32F76xxx, STM32F77xxx
  [9] STM32H7xxxx
  [10] STM32L0xxxx
  [11] STM32L1xxxx
  [12] STM32L4x6xx
Please select the correct device family: 5
Connecting to J-Link via USB...O.K.
Using SWD as target interface.
Target interface speed: 1000 kHz.
VTarget = 3.329V
Reset target...O.K.
Reset option bytes (may take app. 20 seconds)...O.K.
Press any key to exit.

breeze@breeze-Inspiron-5559:/opt/SEGGER/JLink_V648$ ./JLinkExe
SEGGER J-Link Commander V6.48 (Compiled Jul 26 2019 17:51:05)
DLL version V6.48, compiled Jul 26 2019 17:50:52

Connecting to J-Link via USB...O.K.
Firmware: J-Link V9 compiled May 17 2019 09:50:41
Hardware version: V9.60
S/N: 69660282
License(s): RDI, GDB, FlashDL, FlashBP, JFlash
VTref=3.333V


Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: CORTEX-M4
Type '?' for selection dialog
Device>
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF>1
TIF>J
Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
JTAGConf>
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "CORTEX-M4" selected.


Connecting to target via JTAG
Could not measure total IR len. TDO is constant high.
TotalIRLen = 9, IRPrint = 0x0011
JTAG chain detection found 2 devices:
 #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP
 #1 Id: 0x06413041, IRLen: 05, STM32 Boundary Scan
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: 00000000, PID: 00000000 ???
Cortex-M4 identified.
J-Link>exit

你可能感兴趣的:(nuttx,STM32,JLink)