Closed roybaer closed 5 years ago
hi roybaer,
sorry for the late reply, but I had to dig deep to find my USB<->UART adapter again. Anyway, now I have a setup with PC <-> STMS-Discovery. The latter has a STM8S105C6, which is the closest I have to your STM8S105K6 board. Unfortunately I cannot reproduce the bug as both versions work :-(
branch master
:
./stm8gal -p /dev/ttyUSB1 -b 19200 -w main.ihx -V 3 -u 2
stm8gal (v1.1.8)
load Intel hex file 'main.ihx' ... ok (441B)
reset STM8 and press <return>
open serial port '/dev/ttyUSB1' with 19.2kBaud ... ok
synchronize ... ok (ACK)
determine device ... ok (STM8S; 128kB flash; BSL v2.1)
Uploading RAM routines ... ok (352B from 0x00a0)
write 441B (0x8000 to 0x81b9) ... ok
read 441B (0x8000 to 0x81b8) ... ok
verify memory ... ok
activate bootloader ... ok
jump to address 0x8000 ... ok
done with program
branch develop
:
./stm8gal -p /dev/ttyUSB1 -b 19200 -w main.ihx -v 3
stm8gal (v1.3.0 beta)
reset STM8 and press <return>
open serial port '/dev/ttyUSB1' with 19.2kBaud ... done
synchronize ... done (ACK)
check UART mode ... done (2-wire reply)
get device info ... done (STM8S; 128kB flash; BSL v2.1)
upload RAM routines ... done (352B in 0x00a0 - 0x01ff)
load 'main.ihx' ... done (1074B)
convert Intel HEX file ... done (441B in 0x8000 - 0x81a0)
write 441B / 441B in 0x8000 to 0x81b8 ... done
read 441B / 441B from 0x8000 to 0x81b8 ... done
verify memory ... done
jump to address 0x8000 ... done
done with program
I will today check all other boards / STM8-variants I have and let you know. Independently, could you provide a source for your sduino_uno board which seems to show the issue with the new version? Actually I was planning to order one anyway, so no harm done there. Nice work! :-)
PS: can you please re-check using the parameters as above: low baudrate, auto-detect mode, high verbosity
Update:
I checked the below boards with branch develop
, auto-detect UART-mode (default), and 230kBaud. Launch as: ./stm8gal -p /dev/ttyUSB1 -b 230400 -w main.ihx
Can you please check again
develop
branch and recompile ./stm8gal -p /dev/ttyUSB1 -b 230400 -w main.ihx
./stm8gal -p /dev/ttyUSB1 -b 19200 -w main.ihx
As said, I don't get any further here right now, sorry!
hi roybaer,
fixed it (hopefully). Can you please check branch develop
again and provide feedback? Thanks in advance!
The bug was a stupid &
vs |
copy & paste error in get_port_attributes()
. This led to RTS and DTR being always active
. My boards don't have DTR connected which is why I didn't see it before. But your sduino UNO is reset by DTR, which led to the observed loss of communication.
Thanks again for pointing this out, and also for the really nice board! Have a great day :-)
I can confirm that this solved the problem.
:-)
I'll merge the changes back to main
branch
I cannot program my STM8S105K6-based boards anymore, which used to work.
Versions prior to 1d91c125705a6a1a41ec84a33b4a8f2c39ae2de8:
1d91c125705a6a1a41ec84a33b4a8f2c39ae2de8 and later:
They are connected via a CH340G USB-to-serial interface on the same board and I'm using Linux.