stlink | Open source STM32 MCU programming toolset
kandi X-RAY | stlink Summary
kandi X-RAY | stlink Summary
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
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stlink
stlink Key Features
stlink Examples and Code Snippets
Community Discussions
Trending Discussions on stlink
QUESTION
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:22CN4 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
QUESTION
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:16The "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.
QUESTION
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:47Turned 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.
QUESTION
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:45I 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
QUESTION
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:25If 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.
QUESTION
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:12libusb is missing or not found on your computer. It is used to communicate with the Microbit board to upload/debug.
QUESTION
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?
- https://docs.platformio.org/en/latest/boards/ststm32/bluepill_f103c8.html
- https://docs.platformio.org/en/latest/boards/ststm32/genericSTM32F103C8.html
- https://docs.platformio.org/en/latest/frameworks/arduino.html
platformio.ini:
...ANSWER
Answered 2020-Nov-03 at 13:49I 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
:
QUESTION
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:23And 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!
QUESTION
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:57You 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.
QUESTION
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:28as 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.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install stlink
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
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page