Coder Social home page Coder Social logo

cmsis-dap_for_stlink-v3mini's Introduction

High-Speed CMSIS-DAP for STLINK-V3MINI ARM Debugger

Keywords: USB2.0 High-Speed CMSIS-DAP STLINK-V3 STM32F723IEK6 SWO VCP CDC DAPLink ST-LINK ARM-Debugger

ST company created a great mini-size ARM debugger STLINK-V3MINI for STM32 MCU, cost you ~US$10 only. Re-Use the high-performance PCBA hardware, you can do more interesting projects or hobbies.

Important Notice:

This repo is an old project for CMSIS-DAP!!! If you are a new comer here, please visit my Yet_Another_Bootloader (YAB) repo first on
https://github.com/RadioOperator/Yet_Another_Bootloader.
Please try to install the YAB first. YAB (STLINKv3_YAB project) could co-exist with STLINK-V3 Factory Bootloader, and install one or two of pre-built CMSIS-DAP code to test the DAP function, no need to destroy the factory bootloader.

Beacuse the factory bootloader still in the device, it's very easy to recover STLINK-V3 functions using STSW-LINK007 update tools. (please DONOT use the new verion STSW-LINK007 v2.36.26 or later, the new version will locked the STM32F723 IC's SWD port).

alt text

A new very good/low-cost Starter Kit ...... what we got:

  • MCU: STM32F723IEK6, Arm® Cortex®-M7 32b MCU+FPU, 462DMIPS.
  • Core speed: 216MHz
  • ROM: 512KB
  • RAM: 256+16+4KB, new features.
  • USB 2.0 High-Speed internal PHY.
  • GPIO, up to 30s connected out in STLINK-V3MINI PCBA.
  • UART, SPI, I2C, CAN, ADC, more...
  • some GPIO with ESD protection.
  • On-board LEDs.

My code:

  • /STLINKv3DAPv1_HID+VCP ------- native HID+VCP mode, CMSIS-DAP v1, VCP(CDC) added.
  • /STLINKv3DAPv2_WinUSB --------- native WinUSB mode, CMSIS-DAP v2, SWO_STREAM mode enabled.
  • /STLINKv3DAPv2_WinUSB+VCP --- WinUSB+VCP, SWO_STREAM mode cannot enable.
  • /STLINKv3DAP_v1+v2 -------------- v1+v2, no VCP, SWO_STREAM mode cannot enable.

All support SWD and JTAG mode. SWO_STREAM mode is important or not? please tell me.

v1+v2, HID and WinUSB mode coexisted, suggest disable one in Device Manager force to another.

The STDC14 connector pin definations:

  • Pin-1, NC.
  • Pin-2, NC.
  • *Pin-3, 3.3V out, re-wire to STLINK 3.3V LDO output, limited less than 50mA.
  • Pin-4, JTMS / SWDIO.
  • Pin-5, GND.
  • Pin-6, JTCK / SWCLK (same as Pin-9) .
  • Pin-7, GND.
  • Pin-8, JTDO / SWO.
  • Pin-9, JTCK / SWCLK (same as Pin-6) .
  • Pin-10, JTDI.
  • *Pin-11, NC (GND Detect on STLINK, to target GND for ST-LINK).
  • *Pin-12, nRESET (T-NRST on STLINK), to JTAG/SWD nRESET pin, or board /RESET.
  • Pin-13, VCP Tx.
  • Pin-14, VCP Rx.

*---Not same as STLINK-V3MINI original.

Compile Environment:

  • Keil: v5.28a.
  • STM32F7xx_DFP 2.12.0.
  • Keil: ARM CMSIS 5.6.0.
  • Keil: MDK-Middleware 7.10.0.
  • Keil: ARM Compiler 6 (AC6 + MicroLIB, Optimization[-Ofast]).

Include Path:

  • C:\Keil\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\Include - maybe not same as yours.
  • C:\Keil\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\Driver\Include - maybe not same as yours.
  • .\CMSIS-DAP
  • .\RTE\USB
  • .\USER

Some issues:

  1. not well-tested, need your report.
  2. Stack uasge check and optimize, not performed.
  3. ......

Further improvements:

  1. General USB-DFU bootloader, support drag&drop easy update any user App.

2020-07-24 update: MSC Bootloader function is Done!
visit: https://github.com/RadioOperator/Yet_Another_Bootloader

  1. Try using other USB library to see what happened.
  2. Develop SPI/I2C/CAN bus, Logic analyzer/emulator functions, we have a large flash room.
  3. ......

New Release Notes:

  • 2019-12-22, improved SWD clock, max 18MHz (Keil - 10MHz). USB VID changed to ST VID=0x0483 for all. The USB PID as following:
    • STLINKv3DAPv1_HID+VCP -------- PID 0x572C
    • STLINKv3DAPv2_WinUSB+VCP --- PID 0x572D
    • STLINKv3DAPv2_WinUSB ---------- PID 0x572E
    • STLINKv3DAP_v1+v2 -------------- PID 0x572F
    • My STM32F103C8T6 project ------ PID 0x572A (STM32F103C8T6_CMSIS-DAP_SWO)

Declarations:

The project is for experiments only. Use any parts and info on your own risks.

cmsis-dap_for_stlink-v3mini's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmsis-dap_for_stlink-v3mini's Issues

CMSIS-DAP_for_STLINK-V3MINI compiled with IROM1 @ 0x08020000

Awesome project!

I'm building a utility which implements the ST USB DFU protocol and encryption, it can already flash YAB without issues. But when I flash YAB (@0x08020000) + slv3app1.bin (@0x08040000) it does not jump to the app and remains in YAB mode. I've also tried flashing slv3app1.bin directly to 0x08020000 over USB and it does work likely because the target IROM settings.

I cannot compile the project myself without a license though to resolve the issue. Would you be able to compile the The CMSIS apps to run at 0x08020000 and push them here?

Dumping the original firmware/bootloader

Hey @RadioOperator ,

In the past there were attempts to gather the STLink V2's firmware via downloading a dumper code through the official bootloader:
https://lujji.github.io/blog/reverse-engineering-stlink-firmware/
https://lujji.github.io/blog/reverse-engineering-stlink-firmware-part2/

It might be useful to check whether it is possible with the V3 because using the factory bootloader for downloading custom code would be a great possibility I think. I do not have device at hand at the moment, but I will look after the possibilities later. I just opened this issue to give you a heads up.

Use micropython bootloader

RadioOperator,

I found your documentation about the stlink v4 mini very interesting. But instead of writing my own bootloader I used the micropython bootloader. This way one can advance swiftly. I provide a link, in case you could use the source in your project. Could you give me your opinion?

https://github.com/koendv/micropython

Something simple? Udefined symbol RCC_GetUSARTClockFreq

Howdy!

Thanks for this great posting, much to learn here...

As a first step I caught just one error on compile with Keil 5.25.2.0:

.\Listings\STM32F723_YAB.axf: Error: L6218E: Undefined symbol LL_RCC_GetUSARTClockFreq (referred from usart_stm32f7xx.o)

Am I missing an include, or something simple? (compiler is set at c99)

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.