core51822 with ST-Link V2 in Arduino IDE possible?

Hi all,

I would like to read some data from sensors and send them over BLE to another bluetooth device.

So I bought the "Core51822" and an ST-Link V2 as programmer.

My first problem is, that I can´t select the ST-Link V2 in arduino IDE (as shown in attached screenshot).

In the windows device manager I can see, that the usb-device driver is installed correctly.

Does anyone knows, how to solve this?

Thank You

Simon

As shown in the attached picture, it should be possible to integrate ST Link V2 in Arduino IDE...

The "Upload Method" menu shown in your second screenshot is a custom Tools menu provided by the STM32 core. That menu will only appear when you have one of the STM32 boards selected. In your first screenshot, you have an ESP8266 board selected, which is why you don't see that menu.

pert:
The "Upload Method" menu shown in your second screenshot is a custom Tools menu provided by the STM32 core. That menu will only appear when you have one of the STM32 boards selected. In your first screenshot, you have an ESP8266 board selected, which is why you don't see that menu.

thank you for your help!

okay, I understand. Unfortunaly, there is no entry for stm32 in my board manager. Because of this, I can´t select the correct board.

Do I have to download the Hardware specifications of stm for this? Where can I download this files?

Second question is, is it possible, to handle the board "core51822" after that with my ST Link V2 (just stm8 and stm 32 is printed on the stick)? As I can see, there is a 32 Bit ARM processor in it.

simon1516:
Unfortunaly, there is no entry for stm32 in my board manager. Because of this, I can´t select the correct board.

As with ESP32, the STM32 cores are written by 3rd parties and so they are not listed in Boards Manager by default. Just like with ESP32, you need to add the Boards Manager URL for the STM32 package to File > Preferences > Additional Boards Manager URLs before installing the package via Boards Manager. Use a comma to separate the multiple URLs you have in the "Additional Boards Manager URLs" field.

There are multiple STM32 hardware cores for Arduino so I can't provide you with specific installation instructions. If you visit the repository of the STM32 core you want to install, you will almost certainly find Boards Manager installation instructions in the readme or wiki.

simon1516:
Second question is, is it possible, to handle the board "core51822" after that with my ST Link V2 (just stm8 and stm 32 is printed on the stick)? As I can see, there is a 32 Bit ARM processor in it.

I have no experience with STM32, so I can't answer that. Perhaps someone else here will be able to help you.

simon1516:
Second question is, is it possible, to handle the board "core51822" after that with my ST Link V2 (just stm8 and stm 32 is printed on the stick)? As I can see, there is a 32 Bit ARM processor in it.

My initial reaction is that ST Link V2 is a programmer for ST Microelectronics devices and it probably wouldn't work with the Nordic Semiconductor nRF51822.

After looking for a bit, there does appear to be an Arduino Core for the nRF51xxx family and it suggests that ST Link V2 can be used to flash these devices.

I haven't used this . . .

sorry for my late response!

As with ESP32, the STM32 cores are written by 3rd parties and so they are not listed in Boards Manager by default. Just like with ESP32, you need to add the Boards Manager URL for the STM32 package to File > Preferences > Additional Boards Manager URLs before installing the package via Boards Manager. Use a comma to separate the multiple URLs you have in the "Additional Boards Manager URLs" field.

There are multiple STM32 hardware cores for Arduino so I can't provide you with specific installation instructions. If you visit the repository of the STM32 core you want to install, you will almost certainly find Boards Manager installation instructions in the readme or wiki.

Thank you for this short instruction how to get different board´s in my board manager in Arduino IDE. But I think the STM URL includes not the boards i want to use (I don´t know, why a developer in a tutorial uses this modules for develop with a nrf51822 chip...).

My initial reaction is that ST Link V2 is a programmer for ST Microelectronics devices and it probably wouldn't work with the Nordic Semiconductor nRF51822.

After looking for a bit, there does appear to be an Arduino Core for the nRF51xxx family and it suggests that ST Link V2 can be used to flash these devices.
GitHub - sandeepmistry/arduino-nRF5: Arduino Core for Nordic Semiconductor nRF5 based boards
I haven't used this . .

Thank you for this link! I´ve already installed the board´s and I´ve also selected the ST-Link V2 as programmer. Everything looks good (see screenshot which is attached).

My Problem is now, that it is not possible to flash an example program to the board.

Here I can show you the error description from arduino IDE.

Arduino: 1.8.9 (Windows 10), Board: "Nordic nRF51X22 Development Kit(PCA1000X), PCA10000, None, Crystal Oscillator"
c:/users/simon/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .heap by 4 bytes
c:/users/simon/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .stack_dummy by 4 bytes
c:/users/simon/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .heap by 4 bytes
c:/users/simon/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .stack_dummy by 4 bytes
c:/users/simon/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .heap by 4 bytes
c:/users/simon/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .stack_dummy by 4 bytes
Der Sketch verwendet 1296 Bytes (0%) des Programmspeicherplatzes. Das Maximum sind 262144 Bytes.
Globale Variablen verwenden 140 Bytes des dynamischen Speichers.
Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 0
0
cortex_m reset_config sysresetreq
adapter speed: 1000 kHz
Error: No J-Link device found.
Error: No Valid JTAG Interface Configured.
Error: No Valid JTAG Interface Configured.
Dieser Bericht wäre detaillierter, wenn die Option
"Ausführliche Ausgabe während der Kompilierung"
in Datei -> Voreinstellungen aktiviert wäre.

For your information: I just use the core51822 board (directly connected to ST-Link V2 -> SWDIO and SWCLK and 3V3 and Ground) without the additionally Nordic NRF51x22 development kit. In arduino IDE, I have to choose kit, but i think the only special of it is the usb adapter and the possibility of battery interface...

Here you can see the dev. board and also the expandet kit:
board + kit

Is there anything you can see, which is maybe helpfull for me? Thanks in advance.

Here I can see, that it´s possible to flash the nrf81522 with st link v2 and open ocd

link

but I think these open ocd commands are for linux/ubuntu users. Unfortunaly I don´t understand what they are doing, because I just use windows...

In addition to that, I´m not sure if it´s possible to flash the device with arduino IDE...:frowning:

The error message in post #6 "Error: No J-Link device found" indicates that either it didn't find the programming device (ST Link) or it's trying to use something else. You should be able to look at the Device Manager and see whether or not the ST Link is registered and has a working device driver.

MrMark:
The error message in post #6 "Error: No J-Link device found" indicates that either it didn't find the programming device (ST Link) or it's trying to use something else. You should be able to look at the Device Manager and see whether or not the ST Link is registered and has a working device driver.

Hi MrMark,

the driver for ST Link V2 is installed (see attachement).