Homepage Knowledgebase GitHub

Babel tutorial problem


I am trying to UAVCAN tutorial below.

But I don’t know how can Babel is flashed with source code. source code have an IAR project file, so how do I build it and get the resulting file.

I made *.application.bin file to flash the Orel 20 through UAVCAN GUI Tool before. Like this, Is there any method to flash without using blackmagic probe? To do this I found a method to make binary file from EWARM. But I can’t sure of that. Is it right?

Also can I use window OS to work with this all?

This project can be compiled in IAR v7.5 and later.
Unfortunatel IAR does not support DCP out of the box(but maybe there is a way to use it), so I had to flash babel with ordinar st-link. I had to make an adapter from that tiny DCP connector to ordinar 0.1’’ pitch PLS, which I the connected with my ST-LINK(this is a quection of 10 minutes though).
Anyway, I find it a bit tricky to use DCP in windows environment, so st-link is a good option.

You must also keep in mind that this project is just a demo, so feel free to copy bits of code to your IDE of choise, no need to use IAR only as it is definetly not free. Though, compiled project is under 16K of FLASH memory, so you can use free limited version of IAR to evaluate it. Find it here at the bottom of the page

Best regards, Alex

Thanks Alex :grinning:
I will try it.


I’m trying to make adapter. I want to check pin matching as follow. Is it okay?


Looks good, except that I don’t think there is a UART interface in ST-Link, unless I’m hopelessly behind the times. Haven’t used ST-Link in ages.

I tried to download project file via st-link, but it failed.

Do I have to add debug port activation code in tutorial code?

As far as I know SWD interface is active after reset by default and you can only disable it in your program, so no, there is no need to add any code.
Can you please describe a bit more detailed what were your actions? Did you use IAR?

I use IAR.
I connected st-link and click download and debug button. After that a error popup window appears.
it said “ST-Link, No MCU device found”

Does SWD interface is active after reset by default mean swInit() in tutorial code?

I linked st-link and babel to 3.3V. Is it ok?

Ir seems everything should work.
Just for clarification:
to start debug session you need only 4 connections: GND, 3v3, SWDIO, SWCLK.
Are you sure BABEL is powered by st-link? Some programmers use VDD pin not to supply power, but to READ targer supply voltage to match logic levels.

BABEL is powered by VDD pin of st-link as you said.

Red and yellow light is shining on the BABEL when I try to download. Is it right?

Make sure you are powering BABEL with 3.3V
Also please try to connect to the MCU using STM32 ST-LINK Utility
This way we will figure out if the issue is with IAR or with wiring(or st-link)

I tried to connect to the MCU using STM32 ST-LINK Utility.
And it doesn’t work. Same error appears.

Well, then the only thing you can do here is check the wiring again. By the way, can you share a photo of your setup?

Thank you for checking.

Here’s photo.

BABEL | ST-link
power | VDD 3.3V

Looks nice. Check couple mode things.
Try to connect to MCU but power BABEL from USB instead of st-link
Also your wires may be too long, it is sometimes an issue. Try slowing down SWD interface in STM32 ST-LINK Utility. Go to TARGER->SETTINGS and find it here

It also failed in ST-LINK Utility.

Do you mean power BABEL from USB and connect other SWDIO, SWCLK pins from ST-LINK?
VDD and GND pins are disconnected.

Yes, I meant just this. Power from usb and connecto only 3 pins (gns, swdio, swclk to ST-LINK).
If this also fails - inspect the debugging connector. Maybe it is defective or soldered badly?

I solved problem. Power from usb and connect only 3 pins (gnd, swdio, swclk to ST-LINK) as you said.
And also connect VCC to ST-LINK not VDD. Then it works!

I am happy to hear this! Good luck