I ran into similar problems on Windows.
The BSFrance STM32 Arduino Core on GitHub is incomplete and has some rough edges (I expect that it will not to be updated any soon).
After copying the core from GitHub repository https://github.com/BSFrance/BSFrance-stm32, you will additionally have to copy the ARM tool chain and Arduino tools for STM32 into the core’s directory structure.
IIRC ARM tool chain version 5.x will not work and I think I used version 7.x instead which can be downloaded here: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
The STM32 Arduino tools can be downloaded here: https://github.com/stm32duino/Arduino_Tools
In Windows I placed the BSFrance core in Documents\Arduino\hardware\BSFrance-stm32
.
I renamed subdirectory stm32 to STM32 to prevent library incompatibility warnings during compilation (related to incorrect casing in library.properties files of certain libraries included with the core).
On Windows the ARM toolchain goes into:
Documents\Arduino\hardware\BSFrance-stm32\STM32\tools\win\gcc
and the tools go into: Documents\Arduino\hardware\BSFrance-stm32\STM32\tools
(Latter with a separate subdirectory per OS. Note: for Linux there are two: linux and linux64.)
You will probably have to tweak one or more paths in platform.txt for dfu-util and possibly for the gcc toolchain.
I don’t exactly remember. Have not touched it in months.
For more information on custom(izing) Arduino cores see: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
I have no experience with Arduino on Linux so I’m not sure if there are any OS specific overrides for Linux. The Arduino documentation is not clear about that.
But you can use the versions without OS override (which are the default values) and may add:
tools.dfu-util.path={runtime.hardware.path}/STM32/tools/linux64/dfu-util
All you need will be in your home folder (I guess) in ~/Arduino/hardware (similar to Documents\Arduino\Hardware on Windows). You will need to install it there yourself.
My guess is that on Linux the BSFrance STM32 Arduino core should be put in directory: ~/Arduino/hardware/BSFrance-stm32
.
In file ~/Arduino/hardware/BSFrance-stm32/STM32/platform.txt
variable {runtime.hardware.path}
will point to above directory so you can use it to specify full paths within the core’s directory tree.
The other platform.txt files you mentioned are from other installed STM32 Arduino cores (Roger Clark’s STM32 F1 and F3 Arduino cores, see www.stm32duino.com and Cores).
The world of (names of, supported functionality, compatibility of and references to different) Arduino cores for STM32 is not transparant and confusing. Much different than Arduino for AVR, SAM(D) and ESP32.