What’s the error message you are receiving? You are putting the board into USB DFU bootloader mode by setting the jumpers BOOT0 = 1 and BOOT1 = 0 and pressing the reset button, right?
I’m using the bootloader 2.0. It uses serial to upload. Sometimes you need to manually press reset button. However, my error is:
No DFU capacle USB device fount
It complains about missing file (upload-reset). I’ve double checked. Is there.
I’m also using flatpak Atom instalation.
$ uname -a
Linux thales-elementary 5.3.0-59-generic #53~18.04.1-Ubuntu SMP Thu Jun 4 14:58:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
At last, I can’t copy anything from terminal. When I manually invoke it, it stay blank.
For any other arduino board, it works fine.
Why not install it directly? Putting it inside a container as flatpak does only restricts its hardware access. Maybe that’s why dfutil fails.
Does it make a difference when you manually execute the dfutil command shown when you run pio run -t upload -v?
Does your lsusb show a USB device with a DFU endpoint?
Some github issue pointed that Flatpak was better. I will just try to direct install.
EDIT:
Ok. I get that working, but I still need some help to get rid off my workarounds. I can’t work with that.
- Avoiding the flatpak partially solved the problem. The upload-reset file was found.
- There comes another problem. If my folder project has some space character, it just can’t find the project. ex: “bluepill platformio” -> “bluepill platformio”. Is there a way to fix it?
- The last one is the terminal. Its blank. I can’t run pio command.
@maxgerhardt thanks for your help.
If you use linux, you stuck with old tool-stm32duino 1.0.1 which still use 32-bit. If you distribution doesn’t have lib32z1 package, you can just replace the 32-bit upload-reset binary directly from the source repository. Here is the bash script that might help
#!/usr/bin/env bash
# Patch faulty old 32 bit upload-reset of PlatformIO registry with source
set -e
TOOL_DIR="$HOME/.platformio/packages/tool-stm32duino"
TARGET="$TOOL_DIR/upload-reset"
FIXED_URL="https://raw.githubusercontent.com/rogerclarkmelbourne/Arduino_STM32/master/tools/linux64/upload-reset"
if [ ! -d "$TOOL_DIR" ]; then
echo "Error: $TOOL_DIR not found. Did you install PlatformIO STM32 support?"
exit 1
fi
echo "Replacing upload-reset with fixed 64-bit version..."
rm -f "$TARGET"
curl -fsSL "$FIXED_URL" -o "$TARGET"
chmod +x "$TARGET"
echo "Done."
