After trying on Windows XP to download a sketch on my STM32F103C8T6 module and only arrived in FTDI mode, but not in μUSB mode, I tried my luck in Ubuntu 12.04 LTS.
I loaded the Arduino IDE 1.8.5 and the STM32 related files: the compilation works well, but, Oh deception no way to upload a sketch in my module, either by FTDI or μUSB.
In FTDI mode (BOOT0 in 1 and Reset), when I connect my module, the port I use is /dev/ttyUSB0 and if Itry to load a sketch I get the following message:
Failed to read ACK byte
Unexpected reply from device on command 0x01
stm32flash Arduino_STM32_0.9
http://github.com/rogerclarkmelbourne/arduino_stm32
Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1
Une erreur est survenue lors du transfert du croquis
- Windows
Copy the Arduino_STM32 folder to My Documents/Arduino/hardware (Note: if the hardware folder doesn’t exist you will need to create it).If using Maple or Maple mini, you need to install drivers for the Serial and DFU (upload devices). Please open a cmd window (run as administrator), navigate to the folder: /drivers/win/ and run: install_drivers.bat. Note: This doesn’t actually install drivers. Windows comes pre-installed with a compatible Serial USB driver and a DFU (upload) driver. However the built in drivers need to be associated with the USB ID of the Maple serial and DFU devices. The batch file and wdi-simple.exe do the clever stuff to convince Windows 7 or newer, that it should use its drivers with the Maple serial and DFU devices.
Re-start the Arduino IDE, and select the appropriate board from the “Tools” -> “Board menu”, and select the appropriate Com port for your Maple mini or serial upload device. Note: If you do not see a Maple Serial com device, this is probably because the Maple mini has not been loaded with the blink sketch. So upload a the Maple mini blink sketch from examples\Digital\Blink and the Maple serial device should now be available on the Port menu.
In Linux, you must give yourself access to the Dial out group and run a script to set permissions:
- Linux
Copy the Arduino_STM32 folder to the hardware folder in your Arduino sketches folder. If the hardware folder does not exist, please create one.
Run the udev rules installation script in tools/linux/install.sh.
Note. If you are uploading via USB to Serial or STLink etc, you may need to set the relevant permissions for your specific upload device in order to be able to use it from within the Arduino IDE. You may also need to change the udev rules for the device in question.
I recently tested the Windows install on q Win10 Pro and all worked. My daily dev box is Linux 18.3 Mint.
Installation is covered in the WiKis:
https://github.com/rogerclarkmelbourne/ … stallation
And
http://wiki.stm32duino.com/index.php?title=Installation
Ray
With Windows XP, running the install_drivers.bat and other .bat and .exe did not work. The reason being : these files are not valid win32 …. It is the reason why I used this application. I think that this application really install the bootloader in the module STM32 ?
So, having installed the bootloader in my module, I go to Ubuntu, use the µUSB plug and try to load a sketch … and arrive to what I said in the beginning of this thread.
I also have tried with th FTDI interface with the result precedently mentionned.
As it is said in the link you give me, I launch install.sh. Here is the result :
chp@ubuntu:~$ '/home/chp/Arduino/hardware/Arduino_STM32/tools/linux/install.sh'
[sudo] password for chp:
Copying Maple-specific udev rules...
cp: impossible d'évaluer «45-maple.rules»: Aucun fichier ou dossier de ce type
cp: impossible d'évaluer «49-stlinkv1.rules»: Aucun fichier ou dossier de ce type
cp: impossible d'évaluer «49-stlinkv2.rules»: Aucun fichier ou dossier de ce type
cp: impossible d'évaluer «49-stlinkv2-1.rules»: Aucun fichier ou dossier de ce type
Reloading udev rules
Adding current user to dialout group
L'utilisateur « chp » appartient déjà au groupe « dialout ».
chp@ubuntu:~$
After trying on Windows XP to download a sketch on my STM32F103C8T6 module and only arrived in FTDI mode
I reread every post, and you do not specify what board you are using. Is it one of these?
I run 64 bit Linux Mint 18.3 for dev. I have one old PC with a recent install of Win10 32-bit and fully patched. For XP, I have not seen that in many years, so all I can state is that W10 32-bit works as stated when the WiKi install is performed as stated.
For Linux, I am aware that the 32-bit drivers must be installed in Linux 64-bit. Otherwise, the utils must be recompiled to 64-bit. Ref here.
What disto of Linux?
Ray
As I am able to read/write english, I am absolutely unable to understand an english video, sorry.
The board I use is this one.
My Linux disto is 12.04 LTS 32 bits.
Sincerely.
Pierre

- BluePill_Upload.png (82.61 KiB) Viewed 1753 times
I have tried with a 1.5 k resistor, but apparently, this has no effect. I am going to try again.
Sincerely.
Pierre
[ChPr – Tue Mar 20, 2018 2:32 pm] –
The FTDI I use is a 5 V one. So it is connected to the +5V pin of the board and, as I mentionned in my first post, the upload of a sketch to my board via FTDI worked fine with Windows XP. So I think there are no hardware problem. The connexion stays the same when I going to Ubuntu.I have tried with a 1.5 k resistor, but apparently, this has no effect. I am going to try again.
Sincerely.
Pierre
Pierre, I agree that it the unit working on XP does signify good board and connection.
impossible d’évaluer does seem like a failure with the UDEV rules.
https://playground.arduino.cc/Linux/All
I have tried (may be not always in the right way) a lot of solutions you proposed me, but none of them gave a result.
I just come to use an other FTDI module and … IT WORKS
It is very surprising because the FTDI module I used worked fine with Windows XP and Pro Mini boards and also with Ubuntu for Pro Mini boards, but not with my STM32F103C8T6 ones (I bought to same boards).
What can be the reason fo this misfonctionment ?
Sincerely.
Pierre
I’ve spent many, many years in IT in a corporate environment. Solutions to uncommon problems is always difficult and is always based upon either documentation check-lists (do this, do this, do this…) or experience (seen it before, so I’m going to short-cut the checklist.)
I do not have a solution for you and you do not have test equipment to assist in a more detail Q/A session. Usually, a serial loop-back is done from the PC through the OS drivers to the H/W module and then the signal is returned to echo on the terminal window. This checks the cable, the USB-serial module and the terminal configuration. If that works, a sketch is written to do the same loop-back from Tx to Rx on the STM32duino. Or, I personally prefer to utilize a known-good ASCII TTL serial signal: https://www.hackster.io/rayburne/the-qb … tor-ae7015
If you have found a satisfactory way to continue your STM32 project, then use that path for now. Maybe the solution will be revealed later on as you explore the hardware and OS configuration.
Ray
[ChPr – Sun Mar 18, 2018 7:47 pm] –
With Windows XP, running the install_drivers.bat and other .bat and .exe did not work. The reason being : these files are not valid win32 ….
I have successfully managed to install the serial drivers on XP machine with the good old trick:
– goto device manager
– select with right-click on the unresolved USb device “Update driver” (or similar)
– select manual selection option
– select the folder where the drivers are (check the box to include subfolders in search).
It is better to first select
drivers/win/win_xp_legacy/maple-dfu/
and then
drivers/win/win_xp_legacy/maple-serial/
Reversed order may also work, but you need to install both.
The PC will then choose the right files to install the drivers.
[mrburnette – Tue Mar 20, 2018 4:07 pm] – … If you have found a satisfactory way to continue your STM32 project, then use that path for now. Maybe the solution will be revealed later on as you explore the hardware and OS configuration. …
Right now, this solution gives me satisfaction. But I hope that my next experiments lead me to know the reason of that fact.
Sincerely.
Pierre
