В наличии STM32 и клон JLink'а от otladka.com.ua
CODE
SEGGER J-Link GDB Server V4.98 Command Line Version
JLinkARM.dll V4.98 (DLL compiled Mar 20 2015 18:23:08)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: STM32F105VC
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled Apr 21 2015 18:10:40
Hardware: V9.10
S/N: /* i'm paranoid */
Feature(s): GDB, RDI, FlashBP, FlashDL, JFlash
Checking target voltage...
Target voltage: 2.99 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x2000FFF8)
Target interface speed set to 1000 kHz
Select auto target interface speed (2000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (VectorAddr = 0x08)
Semihosting I/O set to TELNET Client
SWO disabled succesfully.
SWO enabled succesfully.
Read 4 bytes @ address 0x00000000 (Data = 0x2000FFF8)
Downloading 56 bytes @ address 0x0801C000 - Verified OK
Downloading 2904 bytes @ address 0x0801C038 - Verified OK
Downloading 4 bytes @ address 0x0801CB90 - Verified OK
Comparing flash [....................] Done.
Erasing flash [..........ERROR: Failed to erase sectors 56 @ address 0x0801C000 (erase error)
..........] Done.
Verifying flash [....................] Done.
JLinkARM.dll V4.98 (DLL compiled Mar 20 2015 18:23:08)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: STM32F105VC
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled Apr 21 2015 18:10:40
Hardware: V9.10
S/N: /* i'm paranoid */
Feature(s): GDB, RDI, FlashBP, FlashDL, JFlash
Checking target voltage...
Target voltage: 2.99 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x2000FFF8)
Target interface speed set to 1000 kHz
Select auto target interface speed (2000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (VectorAddr = 0x08)
Semihosting I/O set to TELNET Client
SWO disabled succesfully.
SWO enabled succesfully.
Read 4 bytes @ address 0x00000000 (Data = 0x2000FFF8)
Downloading 56 bytes @ address 0x0801C000 - Verified OK
Downloading 2904 bytes @ address 0x0801C038 - Verified OK
Downloading 4 bytes @ address 0x0801CB90 - Verified OK
Comparing flash [....................] Done.
Erasing flash [..........ERROR: Failed to erase sectors 56 @ address 0x0801C000 (erase error)
..........] Done.
Verifying flash [....................] Done.
Спотыкается на стирании первой же используемой страницы (почему перед этим запись с верификацией прошла?! там точно ДРУГАЯ прошивка!).
Дальше делает вид, что всё окей, и запускает отладку.
Если отладку остановить, видно, что первая используемая страница пустая, остальные - со старым содержимым.
Со второго раза прошивается корректно.
Собственно, вопросы:
- кто-нибудь сталкивался?
- кто это вообще пишет? gdb или segger ? Поиграть версией сеггеровских утилит?
- может, openocd поможет? они ж нормально работают с SWD и SWO ?
И вопрос чуть не в тему. Как к eclipse'у приделать кнопку "залить прошивку, отладку не запускать" ?