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
I've made significant changes to the STM32 board hal files that probably will make those boards a lot more useful on OpenPLC: https://github.com/thiagoralves/OpenPLC_Editor/commit/fca5899891a6bb5044a58797d19e51d2b8d6a3ae
 
Now you have 3 upload options to choose from: SWD, Serial and HID Bootloader. Let me know if you want me to add a 4th option. Also, I've made the change to include Serial support on the native USB port. This means that you will now be able to use Modbus serial directly from the built in USB port. I don't have any pill board to test this here, but it should work just fine. Please test and let me know your results.
Reply 0 0
jblb
ok
I'll give a test
Reply 0 0
jblb
after update OpenPLC restartand select
Bluepill STM32-F103CB (SWD Programmer) [2.7.1]
 
always got the same error when uploading
Uploading program to Arduino board at None...
Error during Upload: Property 'upload.tool.serial' is undefined
 
if someone else can test, my install is not standard has I use pyenv to manage my virtualenv ( but everything want OK and editor work fine with Arduino nano )
Reply 0 0
thiagoralves
It looks like you're using an older STM32 core. Try updating your core from the Arduino IDE and see if that works.
Reply 0 0
richw
I added the swd stlink to the hals.json file for my custom board and it works perfect. thank you
Reply 0 0
jblb
It looks like you're using an older STM32 core. Try updating your core from the Arduino IDE and see if that works.
That's what I think to, I'll going to uninstall everything and clean associate directories. In fact I install  latest arduino IDE for use with OpenPLC-editor, but newer clean my system since I switch to PlatformIO for my arduino development
which version do you suggest, old 1.x or new 2.x ?
Reply 0 0
thiagoralves
It should matter as both of them can install cores the same way. But it is always better to go with latest 2.x
Reply 0 0
jblb
reinstaled everything in a fresh ubuntu 24.04 system and got the same error...
is were a way to print the upload command on log in the transfer windows  ? 
Reply 0 0
thiagoralves
Can you program the board on the Arduino IDE?
Reply 0 0
jblb
yes i can, this why I am a bit confused 😢
btw test a more complicated program than blink, flash it with external software , test it on a breadboard  and all is fine
 
@richw did you run on windows or linux ?
Reply 0 0
thiagoralves
I just installed the latest version of the editor on a Linux VM and I'm getting the same error as you are. It seems that support for STM32 is broken on Linux. This is an arduino thing, as OpenPLC just make an arduino-cli call to compile and upload. The same code works on macOS and Windows. Do you have access to a Windows or macOS machine?
Reply 0 0
richw
I used windows 10
Reply 0 0
jblb
No Windows nor macOS machine around....
linux only trouble  was also my thought, has Arduino-IDE 2.x is based on arduino-cli has back-end, and upload works on linux i suspect a very little bug like a missing or extra character in call line , this why i ask you about print upload command on log
Reply 0 0
jblb
Got it works !
the arduino-cli renamed arduino-cli-l64 in OpenPLC_Editor/editor/arduino/bin is too old, changed it by the https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz content and renamed it according and voila
 
File download complete
Time elapsed during download operation: 00:00:02.041
RUNNING Program ...
Address: : 0x8000000
Application is running, Please Hold on...
Start operation achieved successfully
New upload port: None (serial)
Done!
 
old one :
 
> ./arduino-cli-l64 version
arduino-cli-l64 alpha Version: 0.19.0 Commit: 56419ecd Date: 2021-09-02T14:47:35Z

A new release of Arduino CLI is available: 0.19.0 → 0.35.3
https://arduino.github.io/arduino-cli/latest/installation/#latest-packages
 


new one:


> ./arduino-cli-l64 version
arduino-cli-l64 Version: 0.35.3 Commit: 95cfd654 Date: 2024-02-19T13:24:24Z
 
 
Reply 0 0
jblb
and modbus serial directly from the built in USB port also work fine
Reply 0 0
Reply