endlessolli
100 W
stancecoke said:kallt_kaffe said:I notice that casainho's firmware doesn't flash data and option at all so couldn't we just skip flashing option bytes?
Hm, in the Kunteng-Project we had to write the option byte once to disable the readout protection bit. If Tonsheng has not set this bit in the factory settings, there is no need to write the option bytes. As people can read out the factory firmware, the bit seems not to be set.
I think qmarco didn't knew this, when he took the Java-configurator from the Kunteng-Project as base for the TSDZ2 Project. The data (=EEPROM) memory should be written each time to prevent inconsistent settings.
So we just have to delete the entries in the src/controller/compile_and_flash.bat
[strike]STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileOption=option_no_prot.ihx -verbose -verif -no_loop
if errorlevel == 1 goto FAIL[/strike]
STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileProg=main.ihx -FileData=data.ihx[strike] -FileOption=option_no_prot.ihx[/strike] -verbose -no_loop -verif -no_warn_protect
if errorlevel == 1 goto FAIL
regards
stancecoke
I can report that adapting the compile_and_flash.bat file as proposed by stancecoke worked for me.
I used it right from the 1st flash of my 2 TDSZ2's, so it seems indeed that no readout protection bit needs to be set and the option byte can be left untouched.
-> Would it make sense to adapt github accordingly?