#stlink — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #stlink, aggregated by home.social.
-
Программирование плат Nucleo отладчиком J-Link
Как известно существуют учебно-тренировочные электронные платы серии Nucleo. Там всегда есть вмонтированный программатор ST-link. Эти платы дешевы и очень удобны для отладки большой прошивки по частям. Однако родной программатор ST-Link долго прогружается и пошаговая отладка часто срывается прямо из-под IDE. Потом нет способа перезагруpить прошивку из-под отладчика ST-link. В связи с этим возникла потребность отлаживать прошивки на плате другим программатором: отладчиком Segger J-link.
https://habr.com/ru/articles/1060054/
#nucleo #jlink #swd #segger #stlink #stm32 #arm #cortexm4 #cortexm #ozone
-
Программирование плат Nucleo отладчиком J-Link
Как известно существуют учебно-тренировочные электронные платы серии Nucleo. Там всегда есть вмонтированный программатор ST-link. Эти платы дешевы и очень удобны для отладки большой прошивки по частям. Однако родной программатор ST-Link долго прогружается и пошаговая отладка часто срывается прямо из-под IDE. Потом нет способа перезагруpить прошивку из-под отладчика ST-link. В связи с этим возникла потребность отлаживать прошивки на плате другим программатором: отладчиком Segger J-link.
https://habr.com/ru/articles/1060054/
#nucleo #jlink #swd #segger #stlink #stm32 #arm #cortexm4 #cortexm #ozone
-
Using and Connecting ST-Link | STM32 Tutorial #93
In this video we will cover ALL the different ways a ST-Link debug probe can be hooked up to a development board.
#STM32 #GettingStarted #Tutorial #STM32CubeIDE #STM32CubeMX #STM32CubeProgrammer #STLink #STM32World #CurrentMakers #JoltConnect
-
Using and Connecting ST-Link | STM32 Tutorial #93
In this video we will cover ALL the different ways a ST-Link debug probe can be hooked up to a development board.
#STM32 #GettingStarted #Tutorial #STM32CubeIDE #STM32CubeMX #STM32CubeProgrammer #STLink #STM32World #CurrentMakers #JoltConnect
-
-
STM32 Overview, Families, Documentation and Development boards and Tools - STM32 Remake #1
We did a remake of our first ever video!
Getting started with STM32 can be a daunting task. There is a lot of different MCU's, development boards and documentation. A rather long introduction to STM32.
#STM32 #GettingStarted #Tutorial #Development #STLink #CurrentMakers #Streamline #STM32World
-
STM32 Overview, Families, Documentation and Development boards and Tools - STM32 Remake #1
We did a remake of our first ever video!
Getting started with STM32 can be a daunting task. There is a lot of different MCU's, development boards and documentation. A rather long introduction to STM32.
#STM32 #GettingStarted #Tutorial #Development #STLink #CurrentMakers #Streamline #STM32World
-
STM32 Overview, Families, Documentation and Development boards and Tools - STM32 Remake #1
We did a remake of our first ever video!
Getting started with STM32 can be a daunting task. There is a lot of different MCU's, development boards and documentation. A rather long introduction to STM32.
#STM32 #GettingStarted #Tutorial #Development #STLink #CurrentMakers #Streamline #STM32World
-
Обзор инструментов отладки встроенного ПО
Обзор инструментов отладки встроенного ПО: программаторы (JLink, STLink, CMSIS-DAP, BlackMagic), GDB-клиенты и серверы, формат ELF/DWARF. Разбирается цепочка взаимодействия между IDE, GDB, OpenOCD и физическим программатором — от общих принципов до конкретных решений.
https://habr.com/ru/articles/1006064/
#BlackMagic_Probe #GDB #OpenOCD #JLink #STLink #CMSISDAP #armnoneeabigdb #ELF #встроенное_ПО
-
Обзор инструментов отладки встроенного ПО
Обзор инструментов отладки встроенного ПО: программаторы (JLink, STLink, CMSIS-DAP, BlackMagic), GDB-клиенты и серверы, формат ELF/DWARF. Разбирается цепочка взаимодействия между IDE, GDB, OpenOCD и физическим программатором — от общих принципов до конкретных решений.
https://habr.com/ru/articles/1006064/
#BlackMagic_Probe #GDB #OpenOCD #JLink #STLink #CMSISDAP #armnoneeabigdb #ELF #встроенное_ПО
-
Пошаговая GDB отладка прошивки STM32 из консоли cmd
Порой бывает так, что вы скачиваете open-source репозиторий, а там нет файлов .project и .сproject для eclipse или файлы .project и .сproject есть, но они по каким-то причинам повреждены и IDE их не может открыть. Тем не менее прошивка собирается командой make all. Ты ее прошиваешь и LED не мигает. Очевидно, что прошивка зависла. Где-то свалилась в HardFault_Handler. В этом случае надо просто взять и запускать пошаговую отладку из консоли . Это классический способ разобраться, где же произошла осечка.
https://habr.com/ru/articles/979122/
#stm32 #gdb #elf #cli #cmd #gdbserver #gdbclient #gcc #stlink #gnu
-
Пошаговая GDB отладка прошивки STM32 из консоли cmd
Порой бывает так, что вы скачиваете open-source репозиторий, а там нет файлов .project и .сproject для eclipse или файлы .project и .сproject есть, но они по каким-то причинам повреждены и IDE их не может открыть. Тем не менее прошивка собирается командой make all. Ты ее прошиваешь и LED не мигает. Очевидно, что прошивка зависла. Где-то свалилась в HardFault_Handler. В этом случае надо просто взять и запускать пошаговую отладку из консоли . Это классический способ разобраться, где же произошла осечка.
https://habr.com/ru/articles/979122/
#stm32 #gdb #elf #cli #cmd #gdbserver #gdbclient #gcc #stlink #gnu
-
Программатор из обломка платы Nucleo
Все платы Nucleo оснащены программатором, который можно пере использовать для программирования внешних устройств. В этом тексте я написал про то как запрограммировать внешнее target устройство.
https://habr.com/ru/articles/975880/
#stm32 #stlink #stlinkv2 #stlink #nucleo #nucleof401re #nucleof411re #atollic_true_studio #True_STUDIO #TrueSTUDIO
-
Программатор из обломка платы Nucleo
Все платы Nucleo оснащены программатором, который можно пере использовать для программирования внешних устройств. В этом тексте я написал про то как запрограммировать внешнее target устройство.
https://habr.com/ru/articles/975880/
#stm32 #stlink #stlinkv2 #stlink #nucleo #nucleof401re #nucleof411re #atollic_true_studio #True_STUDIO #TrueSTUDIO
-
Jolt Connect - the best STM32 Programmer & Debugger
-
Jolt Connect - the best STM32 Programmer & Debugger
-
STM32 - Jolt Connect - the perfect STM32 Programmer & Debugger (ST-Link)
Introducing the Jolt Connect - the best STM32 Programmer & Debugger. The Jolt Connect can operate as a ST-Link or it can be switched to running the Open Source Blackmagic firmware. This video goes through the details.
#STM32 #STM32CubeIDE #STM32CubeMX #STLink #Blackmagic #Programmer #Debugger #STM32World
-
STM32 - Jolt Connect - the perfect STM32 Programmer & Debugger (ST-Link)
Introducing the Jolt Connect - the best STM32 Programmer & Debugger. The Jolt Connect can operate as a ST-Link or it can be switched to running the Open Source Blackmagic firmware. This video goes through the details.
#STM32 #STM32CubeIDE #STM32CubeMX #STLink #Blackmagic #Programmer #Debugger #STM32World
-
STM32 - Jolt Connect - the perfect STM32 Programmer & Debugger (ST-Link)
Introducing the Jolt Connect - the best STM32 Programmer & Debugger. The Jolt Connect can operate as a ST-Link or it can be switched to running the Open Source Blackmagic firmware. This video goes through the details.
#STM32 #STM32CubeIDE #STM32CubeMX #STLink #Blackmagic #Programmer #Debugger #STM32World
-
STM32 Tutorial #67 - DIY STM32 Programmer/Debugger mk. II (ST-Link)
In several of our videos we have used our own STM32 Programmer/Debugger. That one is much much better than any of the Chinese knock-offs having both Serial and SWO. The device is hardware-compatible with ST-Link/V2-1 and can run the Open Source Black Magic firmware
#STM32 #STM32CubeIDE #STM32CubeMX #STLink #PCB #KiCAD #Electronics
-
STM32 Tutorial #67 - DIY STM32 Programmer/Debugger mk. II (ST-Link)
In several of our videos we have used our own STM32 Programmer/Debugger. That one is much much better than any of the Chinese knock-offs having both Serial and SWO. The device is hardware-compatible with ST-Link/V2-1 and can run the Open Source Black Magic firmware
#STM32 #STM32CubeIDE #STM32CubeMX #STLink #PCB #KiCAD #Electronics
-
STM32 Tutorial #67 - DIY STM32 Programmer/Debugger mk. II (ST-Link)
In several of our videos we have used our own STM32 Programmer/Debugger. That one is much much better than any of the Chinese knock-offs having both Serial and SWO. The device is hardware-compatible with ST-Link/V2-1 and can run the Open Source Black Magic firmware
#STM32 #STM32CubeIDE #STM32CubeMX #STLink #PCB #KiCAD #Electronics
-
STM32 Tutorial #67 - DIY STM32 Programmer/Debugger mk. II (ST-Link)
In several of our videos we have used our own STM32 Programmer/Debugger. That one is much much better than any of the Chinese knock-offs having both Serial and SWO. The device is hardware-compatible with ST-Link/V2-1 and can run the Open Source Black Magic firmware
#STM32 #STM32CubeIDE #STM32CubeMX #STLink #PCB #KiCAD #Electronics
-
VCP STlink-v3minie быстро и просто
Про настройку отладку ваших stm микроконтроллеров с помощью программатора-отладчика STLINK-V3MINIE через встроенную функцию VCP. В статье описана настройка инструментов на ОС Windows и ОС Linux, также приведен пример кода для вывода данных себе в терминал на ПК. Читать в продолжение
-
VCP STlink-v3minie быстро и просто
Про настройку отладку ваших stm микроконтроллеров с помощью программатора-отладчика STLINK-V3MINIE через встроенную функцию VCP. В статье описана настройка инструментов на ОС Windows и ОС Linux, также приведен пример кода для вывода данных себе в терминал на ПК. Читать в продолжение
-
Попытка настроить macOS для использования китайского программатора ST-LINK V2 и Blue Pill
В основном я работал на оригинальной отладочной плате Nucleo (stm32f411ret6) и прекрасно себя чувствал на macOs. Не так давно я решил попробовать прошить blue pill через китайский st-link и получил море ошибок в CubeIDE с которыми решил разобраться раз и навсегда. На самом деле все оказалось не так сложно, как я думал по началу. Через костыли, но она работает! Данная статья является дубликатом моего репозитория https://github.com/nikitatm333/ST-LINK_V2_for_macOS , я давно хотел написать свою первую статью на хабре и решил начать с дубликатов своих "шпаргалок". Не будем затягивать, начнем!
-
Попытка настроить macOS для использования китайского программатора ST-LINK V2 и Blue Pill
В основном я работал на оригинальной отладочной плате Nucleo (stm32f411ret6) и прекрасно себя чувствал на macOs. Не так давно я решил попробовать прошить blue pill через китайский st-link и получил море ошибок в CubeIDE с которыми решил разобраться раз и навсегда. На самом деле все оказалось не так сложно, как я думал по началу. Через костыли, но она работает! Данная статья является дубликатом моего репозитория https://github.com/nikitatm333/ST-LINK_V2_for_macOS , я давно хотел написать свою первую статью на хабре и решил начать с дубликатов своих "шпаргалок". Не будем затягивать, начнем!
-
VSCode, SourceCraft Code Assistant и микроконтроллеры
Сегодня разработка прошивок для микроконтроллеров обычно требует заметно больше времени и ресурсов, чем создание собственно схемы и платы. Со времён ковида прошли времена безраздельного владычества STM32, и теперь регулярно приходится осваивать новые железки. При этом для них зачастую приходится ваять программный инструментарий и библиотеки — поскольку предоставленное производителем обычно неудобно. В этой статье я расскажу, как использовать VSCode для разработки прошивок под разные архитектуры и как мне в этом помогает SourceCraft Code Assistant от Яндекса.
https://habr.com/ru/companies/yandex/articles/892502/
#vscode #stm32 #gd32 #verilog #ai #makefile #stlink #openocd #c++ #инструкция
-
VSCode, SourceCraft Code Assistant и микроконтроллеры
Сегодня разработка прошивок для микроконтроллеров обычно требует заметно больше времени и ресурсов, чем создание собственно схемы и платы. Со времён ковида прошли времена безраздельного владычества STM32, и теперь регулярно приходится осваивать новые железки. При этом для них зачастую приходится ваять программный инструментарий и библиотеки — поскольку предоставленное производителем обычно неудобно. В этой статье я расскажу, как использовать VSCode для разработки прошивок под разные архитектуры и как мне в этом помогает SourceCraft Code Assistant от Яндекса.
https://habr.com/ru/companies/yandex/articles/892502/
#vscode #stm32 #gd32 #verilog #ai #makefile #stlink #openocd #c++ #инструкция
-
STM32 Tutorial #45 - HOW to Flash (ST-Link)
After understanding the different STM32 variants, the most confusing to new developers seems to be the issue of how to flash. In this video we will go through all the options. The content of this video has been covered in earlier video but not concentrated like in this video.
#STM32 #Tutorial #GettingStarted #STLink #Flashing #stm32world #Arduino
-
STM32 Tutorial #45 - HOW to Flash (ST-Link)
After understanding the different STM32 variants, the most confusing to new developers seems to be the issue of how to flash. In this video we will go through all the options. The content of this video has been covered in earlier video but not concentrated like in this video.
#STM32 #Tutorial #GettingStarted #STLink #Flashing #stm32world #Arduino
-
Ich habe hier ein #STM #Nucleo Board, bei dem der ST-Link Teil nicht mehr funktioniert (wird auf dem PC nicht mehr richtig erkannt). Kann man den Teil des Boards irgendwie neu flashen und eine neue ST-Link Firmware einspielen? #followerpower #STLink #STM32 #Embedded #development
-
Ich habe hier ein #STM #Nucleo Board, bei dem der ST-Link Teil nicht mehr funktioniert (wird auf dem PC nicht mehr richtig erkannt). Kann man den Teil des Boards irgendwie neu flashen und eine neue ST-Link Firmware einspielen? #followerpower #STLink #STM32 #Embedded #development
-
Ich habe hier ein #STM #Nucleo Board, bei dem der ST-Link Teil nicht mehr funktioniert (wird auf dem PC nicht mehr richtig erkannt). Kann man den Teil des Boards irgendwie neu flashen und eine neue ST-Link Firmware einspielen? #followerpower #STLink #STM32 #Embedded #development
-
Ich habe hier ein #STM #Nucleo Board, bei dem der ST-Link Teil nicht mehr funktioniert (wird auf dem PC nicht mehr richtig erkannt). Kann man den Teil des Boards irgendwie neu flashen und eine neue ST-Link Firmware einspielen? #followerpower #STLink #STM32 #Embedded #development
-
STM32. Процесс компиляции и сборки прошивки
Многие из начинающих разработчиков софта для микроконтроллеров реализуют свои проекты исключительно в средствах разработки, которые предоставляются производителем. Многое скрыто от пользователя и очень хорошо скрыто, из-за чего некоторые воспринимают эти процессы сродни настоящей магии. Я, в свою очередь, как человек в пытливым умом и природной любознательностью, решил попробовать собрать проект без использования IDE и различного рода автоматизаций. Так родилась идея для этой статьи: не используя ничего, кроме текстового редактора и командной строки, собрать проект мигания светодиодом на отладочной плате STM32F0-Discovery. Поскольку я не до конца понимал, как происходит процесс компиляции и сборки проекта, мне пришлось восполнять пробелы в знаниях. Разобравшись с этим вопросом, я подумал — а почему бы не рассказать другим об этом? Всем кому интересно — добро пожаловать под кат! 🙂
https://habr.com/ru/companies/timeweb/articles/793152/
#timeweb_статьи #STM32 #linux #ubuntu #openocd #stlink #stflash #debug #preprocessor #linker #gnuarm #gnugcc #armnoneeabi
-
STM32. Подготавливаем среду разработки в Linux
STM32. Подготавливаем среду разработки в Linux В недавнем времени получилось так, что у меня появилось пару интересных проектов где одна из составных частей — микроконтроллер STM32. И каждый раз при смене ноутбука или ОС на домашнем компе приходится настраивать окружение для разработки каждый раз как в первый раз. Плюсом, последние проекты которые я делал для STM32 — я выполнял в Windows, в демо-версии Keil uVision. Но поскольку я давно и основательно переехал в Linux — появилась необходимость основательно разобраться и изложить процесс настройки окружения для будущих применений. Всем, кому интересно — добро пожаловать под кат.
https://habr.com/ru/companies/timeweb/articles/787328/
#timeweb_статьи #STM32 #Linux #Ubuntu #IDE #VScode #Eclipse #STLink #stutility #flash #debug #gdb #openocd #compile
-
Also any tips on using a #stlink #programmer
-
Unbricking a Seeed Xiao Samd21
I’ve had a few Seeed Xiao Samd boards (previously called Seeeduino Xiao) kicking around so decided to finally have a bit of a play with them and the Arduino environment.
To get up and running requires the Xiao Samd core which can be added to the Arduino board manager using the following URL and then installed in the usual way: https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
This is all detailed in the Seeed wiki here: https://wiki.seeedstudio.com/Seeeduino-XIAO/.
I have found uploading sketches to the Xiao as it comes “out of the box” to be somewhat “hit and miss”. It would appear that getting the timing of the reset of the board right compared to the upload action seems quite critical. Sometimes hitting reset twice to get the board into “bootloader” mode (i.e. it appears as a disk waiting for a UF2 file) and then resetting back again may work. Yet triggering a reset at all is very fiddly, requiring the temporary connecting of two pads on the board itself.
However this is very common on any microcontroller that does not have a separate “USB co-processor” to handle the USB communications. It is the same issue one gets with the ATmega32U4 based devices – essentially the main processor has to handle the USB stack as well as the application code and if something goes wrong, then USB communications is lost too. There is a brilliant description of the issue here in section 6: “Uploading/Bootloader/COM Port/Reset Problem”: https://sigmdel.ca/michel/ha/xiao/seeeduino_xiao_01_en.html#download_problem
Some of this might be related to the fact that the serial port presented in bootloader mode is a different serial port to that presented when running firmware. This is common to other Samd21 devices too, so this might be worth trying: Adafruit Trinket M0 Moving COM Ports in Arduino. If you are having problems, then it might be worth rebooting into bootloader mode, which you know is “listening” to the COM port, but the Arduino environment won’t “know the difference” as it were…
But one thing I have found is that it is also possible to “brick” the Xiao such that it no longer responds to reset, doesn’t illuminate the user LED and doesn’t even appear as a COM port any more at all. Basically the bootloader won’t kick in at all. The only way back from this seems to be to reprogramme the bootloader itself, which requires the use of the SWD pads on the underside of the board.
Prior to fearing the worst however and getting into the magic of SWD there are two things to double check.
Make sure the RESET switch is really working!
If you’re using the Xiao expansion board (which is really handy, giving access to a RESET button and SWD as well as the IO breakouts) just check the Xiao hasn’t come a little loose from the expansion board. The RESET pin connects via “pogo pins” and if the Xiao pulls out even slightly, then it might not connect!
Seriously, this has caught me out several times as when plugged in via USB the tension in the lead can slowly lift the Xiao out of the expansion board! Simply pushing the Xiao back in might get the RESET switch working again.
Merge the bootloader and user COM ports
Try the “moving COM port” trick mentioned above. After doing this, then I’ve found uploading to be a lot more reliable by putting the Xiao into bootloader mode prior to an Arduino upload. In fact this is now my preferred method to upload.
In summary – to get the most of the Xiao, I recommend both getting an expansion board (or wiring up a RESET button yourself) and merging the COM ports as described here: Adafruit Trinket M0 Moving COM Ports in Arduino. Then I’ve found the following sequence pretty reliable:
- Always “double click” the RESET button to put the Xiao into bootloader mode.
- Then upload using the Arduino IDE.
- RESET again to run the code if it hasn’t started automatically.
The Last Resort – “Unbricking” the Xiao
So based on experiences so far I can strongly recommend that if you want to get into using a Xiao with the Arduino you get hold of two things:
- The Xiao expansion board. This gives you a proper reset button and jumper header pin access to the SWD port.
- A cheap STlink V2 debug connector. This gives you a means to programme the board if all else fails and will be required to reload the bootloader if things really break.
Reprogramming the Bootloader with STLink V2
This is one of those things where all the information is “out there” somewhere, but nothing is quite all in the same place for this specific activity. So here is a “notes to self” on how to get from nothing to being able to re-programme the Xiao bootloader using an STlink V2 from a Windows PC.
Prerequesites
- Install OpenOCD for Windows from here: https://gnutoolchains.com/arm-eabi/openocd/
- To expand it requires 7Zip or an equivalent tool that can open 7z files. You can get 7Zip from here: https://www.7-zip.org/
- Install the STLink V2 driver from here: https://www.st.com/en/development-tools/stsw-link009.html
- This is a ZIP or “Windows compress folder” and requires expanding into a convenient directory somewhere.
- To install the STLink V2 driver, there is a stlink_winusb_install.bat file that has to be run as adminstrator. Note all this does is call the right dpinst_*.exe file for your PC.
Configuring OpenOCD For the XIAO SAMD21
The detailed instructions for this were obtained from the Seeed forum here: https://forum.seeedstudio.com/t/how-to-unbrick-a-dead-xiao-using-st-link-and-openocd/255562 using additional information from an Adafruit tutorial here: https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi/wiring-and-test.
As detailed in the forum post, there is a configuration that is already pretty well ready for the XIAO SAMD21. This can be found in the directory:
<OpenOCD Install>/share/openocd/script/target/
Copy the file at91samdXX.cfg to XIAO_at91samdXX.cfg and change the following line this is line 35 in my file):
# set _CPUTAPID 0x4ba00477 <-- OLD set _CPUTAPID 0x0bc11477
Preparing the Bootloader Configuration for the XIAO SAMD21
The key steps are as follows:
- Create a convenient directory somewhere (e.g. c:\XIAO_bootloader as suggested in the forum post).
- Obtain the bootloader binary from the Seeed GitHub here: https://github.com/Seeed-Studio/ArduinoCore-samd/tree/master/bootloaders/XIAOM0.
- It recommends (and I used) the non-update file: bootloader-XIAO_m0-v3.7.0-33-g90ff611-dirty.bin which has to be downloaded “raw” and saved to the convenient directory.
- Create a XIAO_openocd.cfg file in the convenient directory based on the information from the Adafruit article.
- Note that there are two parts to the configuration file and each is listed separately in the article.
- Then make the changes as suggested in the forum post.
My XIAO_openocd.cfg file ended up looking like this:
# File obtained from: https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi/wiring-and-test # Modified according to: https://forum.seeedstudio.com/t/how-to-unbrick-a-dead-xiao-using-st-link-and-openocd/255562 source [find interface/stlink.cfg] transport select hla_swd set CHIPNAME at91samd21g18 source [find target/XIAO_at91samdXX.cfg] # did not yet manage to make a working setup using srst #reset_config srst_only reset_config srst_nogate adapter_nsrst_delay 100 adapter_nsrst_assert_width 100 init targets reset halt # Extra code for burning (from later in the article) init targets reset halt at91samd bootloader 0 #program samd21_sam_ba verify # Bootloader file obtained from: https://github.com/Seeed-Studio/ArduinoCore-samd/tree/master/bootloaders/XIAOM0 program bootloader-XIAO_m0-v3.7.0-33-g90ff611-dirty.bin verify at91samd bootloader 8192 reset shutdown
Connecting to the Xiao and Programming
This is where the expander module is really handy as the SWD pins are broken out to pin headers. Without this they are just pads on the underside of the Xiao.
The following connections are required:
- SWDIO
- SWCLK
- GND
I’ve powered my Xiao via USB whilst programming, so no 3V3 connection was required. The SWD pins can be found on the far right hand side of the expander board (assuming the Xiao is on the far left) and need linking to the STLink as shown below.
Once connected to each other, and assuming the STLink driver is installed, then the Xiao can be powered up (via USB) and then the ST Link connected to USB and powered up.
To programme the bootloader requires the following command to be run from the working directory containing the configuration and bootloader binary:
openocd -f XIAO_openocd.cfg
You will probably have to specify the path to the openocd executable. Here is the complete command running for me.
C:\XIAO_bootloader>C:\OpenOCD-20230202-0.12.0\bin\openocd -f XIAO_openocd.cfg Open On-Chip Debugger 0.12.0 (2023-02-02) [https://github.com/sysprogs/openocd] Licensed under GNU GPL v2 libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD DEPRECATED! use 'adapter srst delay' not 'adapter_nsrst_delay' DEPRECATED! use 'adapter srst pulse_width' not 'adapter_nsrst_assert_width' Info : clock speed 400 kHz Info : STLINK V2J29S7 (API v2) VID:PID 0483:3748 Info : Target voltage: 3.160938 Info : [at91samd21g18.cpu] Cortex-M0+ r0p1 processor detected Info : [at91samd21g18.cpu] target has 4 breakpoints, 2 watchpoints Info : starting gdb server for at91samd21g18.cpu on 3333 Info : Listening on port 3333 for gdb connections [at91samd21g18.cpu] halted due to debug-request, current mode: Thread xPSR: 0xb1000000 pc: 0xfffffffe msp: 0xfffffffc [at91samd21g18.cpu] halted due to debug-request, current mode: Thread xPSR: 0xb1000000 pc: 0xfffffffe msp: 0xfffffffc [at91samd21g18.cpu] halted due to debug-request, current mode: Thread xPSR: 0xb1000000 pc: 0xfffffffe msp: 0xfffffffc ** Programming Started ** Info : SAMD MCU: SAMD21G18A (256KB Flash, 32KB RAM) ** Programming Finished ** ** Verify Started ** ** Verified OK ** shutdown command invoked C:\XIAO_bootloader>
After which the two devices can be powered off and the STLink SWD connection removed and the Xiao should be usable as before.
Other Notes
There is an option within the Arduino IDE to select “J-Link over Openocd” as the programmable for the Xiao and then a “burn bootloader” option, but I don’t have a Segger J-link to try this.
References
- XIAO Getting Started: https://wiki.seeedstudio.com/Seeeduino-XIAO/
- XIAO Expansion Board: https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board
- XIAO Software SWD: https://wiki.seeedstudio.com/Software-SWD/
- XIAO Arduino bootloaders: https://github.com/Seeed-Studio/ArduinoCore-samd/tree/master/bootloaders/XIAOM0
- Uploading/Bootloader/COM Port/Reset Problem: https://sigmdel.ca/michel/ha/xiao/seeeduino_xiao_01_en.html#download_problem
- “How to unbrick a dead XIAO using ST-LINK and OpenOCD” Forum post: https://forum.seeedstudio.com/t/how-to-unbrick-a-dead-xiao-using-st-link-and-openocd/255562
- Adafruit Guide: “Programming Microcontrollers using OpenOCD on a Raspberry Pi”: https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi/wiring-and-test
- Openocd for Windows: https://gnutoolchains.com/arm-eabi/openocd/
- ST Link V2 Drivers for Windows: https://www.st.com/en/development-tools/stsw-link009.html
Kevin
#samd21 #seeedstudio #stlink #xiao -
Mein erstes #STM32 Blinky Projekt mit #STM32CubeIDE geclickt und per #STLink gestartet.
Morgen dann mal den #SBSFU anschauen -
Mein erstes #STM32 Blinky Projekt mit #STM32CubeIDE geclickt und per #STLink gestartet.
Morgen dann mal den #SBSFU anschauen -
-
-
Tracking down a firmware bug in #PineTime @PINE64 ? Or trying to understand an alien chunk of firmware code? #VSCode Debugger with #STLink can help! Lemme show you how I used the debugger for my first contact with #RIOT_OS... https://medium.com/@ly.lee/debug-riot-os-on-pinetime-with-vscode-12f00c69c120?source=friends_link&sk=a836d511355876bf81855db9f1e94124
-
Tracking down a firmware bug in #PineTime @PINE64 ? Or trying to understand an alien chunk of firmware code? #VSCode Debugger with #STLink can help! Lemme show you how I used the debugger for my first contact with #RIOT_OS... https://medium.com/@ly.lee/debug-riot-os-on-pinetime-with-vscode-12f00c69c120?source=friends_link&sk=a836d511355876bf81855db9f1e94124