STM32F411CE (BlackPill) + STLink V2 + Arduino on Ubuntu

Yes, exactly.

I tried this: STM32duino + STM32F405RG on VESC bldc controller - #15 by levivk but nothing changed. It seems that it reach an inconsistent state in which it can’t access to memory without some other tricks…