Dobrica Pavlinušić's random unstructured stuff
B3603: Revision 15
newest fork: https://github.com/swegener/b3603 https://hackaday.io/project/4362-power-supply-b3603-alternative-firmware
Specification
Input voltage: 6V ~ 40V backup existing flashpi@rpi2 ~/stm8flash $ sudo ./stm8flash -c stlinkv2 -p stm8s003f3 -s eeprom -r b3606/eeprom.bin action = 1Determine EEPROM area Reading 128 bytes at 0x4000... OK Bytes received: 128 pi@rpi2 ~/stm8flash $ sudo ./stm8flash -c stlinkv2 -p stm8s003f3 -s flash -r b3606/flash.bin action = 1Determine FLASH area Reading 8192 bytes at 0x8000... OK Bytes received: 8192 pi@rpi2 ~/stm8flash $ sudo ./stm8flash -c stlinkv2 -p stm8s003f3 -s ram -r b3606/ram.bin action = 1Determine RAM area Reading 1024 bytes at 0x0... OK Bytes received: 1024 unprotect stm8 using stm8flashhttps://github.com/vdudouyt/stm8flash/issues/38#issuecomment-195123081 $ echo "00" | xxd -r -p >ROP_CLEAR.bin $ stm8flash -c stlinkv2 -p stm8s103f3 -s opt -w ROP_CLEAR.bin compilepi@rpi2 ~ $ git clone https://github.com/swegener/b3603 Cloning into 'b3603'... remote: Counting objects: 1109, done. remote: Total 1109 (delta 0), reused 0 (delta 0), pack-reus Receiving objects: 100% (1109/1109), 11.04 MiB | 2.90 MiB/s Resolving deltas: 100% (770/770), done. Checking connectivity... done. pi@rpi2 ~/b3603/stm8 $ sudo apt-get install sdcc pi@rpi2 ~/b3603/stm8 $ make Code fits the flash, it is 7930 dpavlin@nuc:/nuc/b3603/stm8$ uname -a Linux nuc 4.4.0-1-amd64 #1 SMP Debian 4.4.6-1 (2016-03-17) x86_64 GNU/Linux dpavlin@nuc:/nuc/b3603/stm8$ sdcc -v SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/TININative/ds400/hc08/s08/stm8 3.5.0 #9253 (Mar 21 2016) (Linux) published under GNU General Public License (GPL) dpavlin@nuc:/nuc/b3603/stm8$ scp b3603.ihx rpi2:stm8flash/ flashpi@rpi2 ~/stm8flash $ sudo ./stm8flash -c stlinkv2 -p stm8s003f3 -w ./b3603.ihx action = 2Determine FLASH area Writing Intel hex file 8160 bytes at 0x8000... Tries exceeded # unprotect flash pi@rpi2 ~/stm8flash $ echo "00" | xxd -r -p >ROP_CLEAR.bin pi@rpi2 ~/stm8flash $ sudo ./stm8flash -c stlinkv2 -p stm8s003f3 -s opt -w ROP_CLEAR.bin action = 2Determine OPT area Writing binary file 1 bytes at 0x4800... OK Bytes written: 1 # |