jblb
Hi all,
I try to use Open PLC on a STM32 blue pill board but I cant upload in the board. here the end of  log from upload window
 
Uploading program to Arduino board at /dev/ttyACM0...
Error during Upload: Property 'upload.tool.serial' is undefined
 
any ideas of what can cause this ?
thiagoralves
Can you program your board using the Arduino IDE? I found  this video on YouTube that could be helpful:  https://youtu.be/65eoh9bn4Og?si=Ftb_vpfyPgJvuezt
 
I know it is in Italian but at least I think you can follow what he is doing on the screen and check if you can get the same results 
Reply 1 0
jblb
Hi,
yes i can program my board using Arduino IDE, but  i use st-link and cant see a way to program my board using on board usb connector.
I'll take a look to the video.
Reply 0 0
jblb
thk for the video, now just need to understand that was modified in the file
Reply 0 0
jblb
Hi ,
after viewing and viewing the video a cant understand what is done on the file hals.json ...
and even if its seem that everything his identical i cant upload via stlink, even worst if I "compile only" a blink program and try to load binary to my stm32 via STM32CubeProgrammer i did not get any blink on the board.
Reply 0 0
thiagoralves
Have you located the blink_led variable in any of the outputs (i.e. %QX0.0) to be able to see it blinking?
Reply 0 0
richw
can openPLC even use STlink to upload to the stm32 chip without showing up in the upload menu? 
Reply 0 0
jblb
Have you located the blink_led variable in any of the outputs (i.e. %QX0.0) to be able to see it blinking?
Got it, was counted from %QX0.1 and not from %QX0.0 😟
Reply 0 0
jblb
can openPLC even use STlink to upload to the stm32 chip without showing up in the upload menu? 
from the video above it's possible
Reply 0 0
thiagoralves
I thought those blue/black pill boards could be programmed through the USB cable. It is kinda pointless if you need to have an external programmer to program the boards. OpenPLC is configured to program these boards using the serial interface. If there is a better option, please let me know. I can replicate any configuration from the Arduino menus on OpenPLC. Just let me know what works best on this board and I’ll update the hals.json file 
Reply 0 0
thiagoralves
I just found this old article ( https://circuitdigest.com/microcontroller-projects/programming-stm32f103c8-board-using-usb-port ) on the blue pill taking about a bootloader that allows the board to be programmed through the USB port. It seems that the bootloader was still in development and didn’t work quite well yet. Have you guys heard about this? In any case, the bootloader must be flashed first using an FTDI or ST Link. Is there a newer version of this bootloader that works reliably?
Reply 0 0
richw
I think adding the stlink option to the upload window would be very helpful as all stm32 boards are designed different. some don't have jumpers to enter the serial boot loader mode or reset buttons making it difficult to program the board. in some cases having to remove components or solder jumper wires to program the board.
Reply 0 0
thiagoralves
Oh that really sucks! If they had a standard design for those STM32 boards with usb bootloader already burned in, this would be a killer Arduino nano replacement. Anyway, could you let me know what the configuration looks like on your Arduino IDE to use the ST Link?
Reply 0 0
richw
I'm not sure about the configuration, but after you install the STM32 CUBE programmer the options appear in the upload menuNew Image.png
Reply 0 0
jblb
the standard design STM32 boards is now too use ST-link and in fact I can find a working bootloader for use on board usb...
Reply 0 0
Reply