stlink | Open source STM32 MCU programming toolset

 by   stlink-org C Version: v1.7.0 License: BSD-3-Clause

kandi X-RAY | stlink Summary

kandi X-RAY | stlink Summary

stlink is a C library typically used in Internet of Things (IoT), Arduino applications. stlink has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

stlink is an open source toolset to program and debug STM32 devices and boards manufactured by STMicroelectronics. It supports several so called STLINK programmer boards (and clones thereof) which use a microcontroller chip to translate commands from USB to JTAG/SWD. There are four generations available on the market which are all supported by this toolset:. On the user level there is no difference in handling or operation between these different revisions.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              stlink has a medium active ecosystem.
              It has 3779 star(s) with 1138 fork(s). There are 189 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 26 open issues and 665 have been closed. On average issues are closed in 331 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of stlink is v1.7.0

            kandi-Quality Quality

              stlink has no bugs reported.

            kandi-Security Security

              stlink has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              stlink is licensed under the BSD-3-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              stlink releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stlink
            Get all kandi verified functions for this library.

            stlink Key Features

            No Key Features are available at this moment for stlink.

            stlink Examples and Code Snippets

            No Code Snippets are available at this moment for stlink.

            Community Discussions

            QUESTION

            Cannot connect to target : STlink V3 not connecting to Nucleo Board using SWD
            Asked 2021-May-28 at 13:28

            I am using STLink V3 set to program the F103RB Nucleo board using SWDIO interface. The board works fine when connected to PC using the on-board STlink debugger but when I use external STlink device to program it, it says "Can not connect to target!". I have removed on-board STlink debugger jumpers so that I can use external one. My connection from Stlink V3 to F103RB Nucleo (CN4 Header) are as follows:
            Clock->Clock, GND->GND, SWDIO->SWDIO, NRST->NRST,VCC->NOT CONNECTED (Even if I connect, it doesn't work)

            The datasheet says that "SB12 NRST (target MCU RESET) must be OFF if CN4 pin 5 is used in the external application", is this the problem ? How to resolve that ? or is there any other potential reason for this error.

            I'll really appreciate prompt responses. Thanks

            ...

            ANSWER

            Answered 2021-May-28 at 08:22

            CN4 connector is connected to on-board ST-LINK, which is used when you use on-board ST-LINK to program/debug an external device.

            You need to access pins of the main uC using other connectors.

            Please see this answer: https://electronics.stackexchange.com/questions/566511/how-can-i-program-a-stm32-nucleo-board-without-using-the-on-board-st-link/566515#566515

            Source https://stackoverflow.com/questions/67734462

            QUESTION

            How much flash memory is there in the microcontroller?
            Asked 2021-May-24 at 08:16

            I have an STM32F303CBT6 microcontroller. On the ST site, the volume of the flush is 128 kB.

            In reference manual flash up 256 kB.

            In this case, register "Flash memory size data register" contains the value 128 [kB].

            There is also 128 kb in the stlink utility.

            But in the cleaning window, the page costs 128 pages of 2 kB. This amounts to 256 KB.

            I didn't get it. What is the size of the flash?

            ...

            ANSWER

            Answered 2021-May-24 at 08:16

            The "B" in STM32F303CBT6 stands for "128KB" (see STM32 Part Number Decoding).

            The 256KB version would be STM32F303CCT6.

            I can't tell you what the cleaning window indicates.

            Source https://stackoverflow.com/questions/67648556

            QUESTION

            How to start openOCD on ARM M1 MacBook
            Asked 2021-May-02 at 18:00

            I'm having a hard time getting openocd to start. I attached an STM32F3 Discovery board. When I run openocd -f interface/stlink.cfg -f target/stm32f3x.cfg I get the following error:

            ...

            ANSWER

            Answered 2021-Apr-29 at 20:47

            Turned out that the cable I used was just a power cable which didn't support data transmission.

            With a proper mini USB cable that has all 4 lines it worked right away.

            Source https://stackoverflow.com/questions/67324561

            QUESTION

            ocd assertion fault when connecting gdb
            Asked 2021-Apr-26 at 01:45

            I am debugging board STM32f4 Discovery on Ubuntu 20.04 with openocd and arm-none-eabi-none. Things work well until yesterday. Today, when I connect the gdb to localhost:4444, following assertion happened and ocd quit:

            ...

            ANSWER

            Answered 2021-Apr-26 at 01:45

            I found the issue: I scale up the clock speed without switching to appropriate Flash Latency so the debugger will lose the track of program address as mentioned here, in Clocks and initial settings part: https://vjordan.info/log/fpga/first-steps-with-the-stm32f4.html

            Source https://stackoverflow.com/questions/67041370

            QUESTION

            Why is the pin on a Nucleo 144 not outputting a high enough voltage, despite the output being set to HIGH?
            Asked 2021-Apr-07 at 18:25

            I am trying to control a stepper motor, using a A4988 driver along with a Nucleo 144 board with an STM32F767ZI on it.

            The A4988 driver expects a single rise in voltage to HIGH in order to step the motor.

            Having made some voltage readings using a multimeter, I have found that during and even while the program is paused, there is a steady voltage of around 1.2V being output by the pin.

            I also added some lines to toggle an LED (built onto the board) whenever the output to the A4988 driver is toggled between HIGH and LOW, which works fine.

            Here is the code:

            main.c

            ...

            ANSWER

            Answered 2021-Apr-07 at 18:25

            If you configure the output to be PUSH/PULL, adding a PULLDOWN resistor will divide the output voltage over the resistor. Do not use PU/PD resistors with PP, because it is always driven and doesn't need a PU/PD.

            Source https://stackoverflow.com/questions/66990694

            QUESTION

            Ada on the microbit: scrolling text example not working, no libusb library found
            Asked 2021-Jan-28 at 23:39

            I followed the adacore tutorial on displaying scrolling text (https://blog.adacore.com/ada-for-microbit-part-1-getting-started) but can't get it working on my microbit.

            Maybe my microbit is a more recent version that is not yet supported? The reason I suspect this is that my board id (9904) was not supported the first time I tried to flash to the board. I used the fix described here: Unable to get the Ada scrolling text demo working on the microbit on GNAT 2019 community edition and added the following line in board_ids.py:

            ...

            ANSWER

            Answered 2021-Jan-23 at 14:12

            libusb is missing or not found on your computer. It is used to communicate with the Microbit board to upload/debug.

            Source https://stackoverflow.com/questions/65859253

            QUESTION

            Run STM32F103 from internal oscillator with PlatformIO (Arduino)?
            Asked 2020-Nov-04 at 08:35

            How can the STM32F103C8 be configured to run with internal RC oscillator / HSI & PLL, i.e. without external crystal oscillator (as present on the "blue pill" board) with the Arduino framework in PlatformIO?

            platformio.ini:

            ...

            ANSWER

            Answered 2020-Nov-03 at 13:49

            I dug around a bit in the PlatformIO directory.

            The following paths are for "generic":

            • C:\Users\\.platformio\platforms\ststm32\boards\genericSTM32F103C8.json
            • C:\Users\\.platformio\packages\framework-arduinoststm32\variants\Generic_F103Cx\variant.cpp

            Define your own system clock configuration in e.g. your main.cpp:

            Source https://stackoverflow.com/questions/64646976

            QUESTION

            How should I initialise my stm32 ( f215 )
            Asked 2020-Oct-24 at 10:45

            I am trying to make an extremely minimal stm32f215 firmware to teach myself its boot-up intricacies. As it is now I have this dump which, to my knowledge, should write the stack address to r0 and loop forever:

            ...

            ANSWER

            Answered 2020-Jul-01 at 15:23

            And the culprit has been found! It appears the st-util debugger (from the project mentioned above) causes an error somehow. openocd works like a charm and with that the minimal code above works.

            Anyway, bug reports to write and all that...

            Thank you all so much for verifying my assembler and helping me with dotting all the t's and crossing all the i's!

            Source https://stackoverflow.com/questions/62642314

            QUESTION

            pyocd library cannot find libusb python library
            Asked 2020-Sep-03 at 05:57

            I've successfully installed pyocd and libusb using powershell core and python 3.8 on windows 10, but when I use python -m pyocd list command, it throws this error:

            ...

            ANSWER

            Answered 2020-Sep-03 at 05:57

            You should copy the libusb.dll (libusb dynamic link library) to the path of python instalation. Note: if you've downloaded python from windows store, you should copy libusb.dll in C:/windows/system32 directory.

            Source https://stackoverflow.com/questions/63704476

            QUESTION

            Linux kernel crashes on the stm32h743i
            Asked 2020-Sep-01 at 10:28

            I'm new to embedded linux and I am trying to boot linux on stm32h7 with only internal flash and ram.

            FLASH SIZE = 2MByte

            RAM SIZE = 1MByte

            I have downloaded the mainline linux kernel and I configured the kernel with stm32_def config and then customized it and I removed the unnecessary drivers from it. and I configured it to boot from flash (XIP).

            I have a custom board and it does not have any external ram or flash but it is similar to stm32h743i_discovery board. so, I'm using the stm32h743i_disco device tree.

            my output xipImage size is about 1.4MByte and I wrote a boot loader for it.

            I merged the binaries together like this:

            loader at offset: 0x08000000

            device tree blob (dtb) at offset: 0x08000F00

            xipImage at offset: 0x08008000

            my loader program:

            ...

            ANSWER

            Answered 2020-Sep-01 at 10:28

            as dear @P__J__ mentioned in the first comment, it was a RAM problem! 1MB wasn't enough. And this 1MB was not linear. So, I config the external 8MB onboard dram.

            Source https://stackoverflow.com/questions/63096527

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install stlink

            As of Release v1.6.1 stand-alone Windows binaries are made available (again) on the release page of the project. Please ensure to select the correct version for your system (i686 or x86_64). The archive file can be unzipped to any desired location as it does not contain any hardcoded paths. However we suggest to move the unzipped application folder to C:\Program Files\ on 32-bit systems and to C:\Program Files (x86)\ on 64-bit systems (the toolset is 32-bit). Alternatively one may compile and install from source as described in our compiling manual.
            homebrew or
            MacPorts
            Debian Linux: (Link)
            Ubuntu Linux: (Link)
            Arch Linux: (Link)
            Alpine Linux: (Link)
            Fedora: (Link)
            Gentoo Linux: (Link)
            RedHat/CentOS 8: Users can install from EPEL repository
            FreeBSD: Users can install from freshports
            When there is no executable available for your platform or you need the latest (possible unstable) version you need to compile the toolset yourself. This procedure is explained in the compiling manual.

            Support

            Currently known working MCU targets are listed in devices_boards.md. A list of supported operating can be found in version_support.md.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries