platformio / platform-ststm8

ST STM8: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/ststm8
Apache License 2.0
41 stars 26 forks source link

please update stm8gal uploader #35

Closed gicking closed 3 years ago

gicking commented 3 years ago

uploading code to sduino uno (STM8 Arduino clone) via serial bootloader fails due to an outdated version of stm8gal:

stm8gal (v1.2.0 beta)
  load Intel hex file 'firmware.ihx' ... ok (2.7kB)
  reset STM8 now
  open serial port '/dev/ttyUSB0' with 115.2kBaud ... ok
  synchronize ... ok (ACK)
  set UART mode: 2-wire reply

  determine device ... 

error in 'bsl_memCheck()': ACK1 timeout (expect 1, received 0), exit!

This is a known problem and is solved in version 1.5.0 of stm8gal:

stm8gal (v1.5.0)
  open serial port '/dev/ttyUSB0' ... done
  synchronize ... done (ACK)
  get device info ... done (STM8S; 32kB flash)
  load 'firmware.ihx' ... done
  convert IHX ... done
  write 2.7kB / 2.7kB ... done   
  jump to 0x8000 ... done
done with program

stm8gal is available from https://github.com/gicking/stm8gal

valeros commented 3 years ago

Resolved in https://github.com/platformio/platform-ststm8/commit/4725bcd8908649cffcbe052e03a4ffaacc3d6764. Please retest with the upstream version:

[env:test]
platform = https://github.com/platformio/platform-ststm8.git
framework = ...
board = ...