Closed Darwinnn closed 1 year ago
It is possibly a known issue, please try flashing with -e
argument, something like
./stc8prog -p /dev/ttyUSB0 -e -f foo.hex
I don't have a macbook at hand so if the above change doesn't work, I may need other people's help.
That actually worked!
./stc8prog -p /dev/cu.usbserial-1440 -e -f ../projects/blink/test.hex
Loading hex file: Loaded 134 bytes between: 0000 to 0085
Opening port /dev/cu.usbserial-1440: done
Waiting for MCU, please cycle power: detected
MCU type: STC8G1K08A-8PIN
Protocol: STC8G/8H
F/W version: 7.3.12U
IRC frequency(Hz): 11061600
Switching to 115200 baud, chip: set, host: set, ping: succ
Erasing chip: succ
Writing flash, size 134: 100.00% done
Thank you very much for helping out! Since this now works on macOS I'll be pushing a PR containing little fixes I made for this to compile properly (on macOS).
You are welcome~
Even though macOS isn't supported, I was able to compile the binary using Linux
termios.c
dep.Testing on STC8G1K08A-8PIN was initially promising:
However, upon trying to flash an actual firmware, I stumbled upon this issue where the MCU just won't reply back:
Additionally I tested the
erase
feature, which actually worked. I flashed a simple blinky via STC-ISP and after erasing it stopped executing, so I assume it actually erased the flash contents:I know it was never stated that this was supposed to work on macOS, but maybe it's not something macOS related or the problem is something really simple that we can easily fix. I can assist from my side in case you need any further details or help. Thanks!
EDIT: I've also tried using different baudrates from 300 up to 115200, didn't help.