{"id":287953,"date":"2018-08-16T14:19:59","date_gmt":"2018-08-16T10:19:59","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=287953"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=287953","title":{"rendered":"\u041a\u0430\u043a \u0441\u0436\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0434\u043b\u044f STM8 \u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 8 \u0431\u0430\u0439\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 FLASH"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/418483\/\" class=\"post__text post__text-html js-mediator-article\">\u0421\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/417493\/\"> \u201d \u041a\u0430\u043a \u0441\u0436\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0434\u043b\u044f STM8 \u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 18 \u0431\u0430\u0439\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 FLASH\u201d <\/a>\u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 <a href=\"http:\/\/nflic.ru\/STM8\/STM8uLoader\/000.html\"> STM8uLoader <\/a>. \u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a STM8uLoader \u0432\u0435\u0440\u0441\u0438\u0438 <a href=\"https:\/\/sourceforge.net\/projects\/ovsp\"> $36 <\/a> \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043f\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 RAM \u0431\u0435\u0437 \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u0445\u043e\u0441\u0442-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0420\u0430\u0437\u043c\u0435\u0440 18 \u0431\u0430\u0439\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 FLASH \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 OPTION Bytes \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f \u0434\u043e 53 \u0431\u0430\u0439\u0442\u0430 (\u0437\u0430\u043d\u044f\u043b \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e).<\/p>\n<p>  \u0412 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0430\u0441\u044c \u0432\u0435\u0440\u0441\u0438\u044f <a href=\"https:\/\/github.com\/ovsp\/STM8uLoader\"> $0D <\/a> \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u0436\u0430\u0442\u044c \u043a\u043e\u0434. \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0432\u043e FLASH \u043f\u0430\u043c\u044f\u0442\u0438 8 \u0431\u0430\u0439\u0442 \u0432 EEPROM \u043f\u0430\u043c\u044f\u0442\u0438 35 \u0431\u0430\u0439\u0442.<br \/>  <a name=\"habracut\"><\/a><br \/>   \u041d\u0430\u043f\u043e\u043c\u043d\u044e \u0430\u0440\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 STM8uLoader. \u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b boot_PC \u0438 \u043a\u043e\u0434\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 boot_uC \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 STM8. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 boot_FLASH, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 FLASH, \u0438 \u043a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 boot_EEPROM (\u0438\u043b\u0438 boot_OPTION), \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 EEPROM (\u0438\u043b\u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 OPTION Bytes).<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f RESET \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a boot_FLASH, \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u043e\u0431\u0440\u0430\u0437 \u043a\u043e\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 boot_EEPROM (\u0438\u043b\u0438 boot_OPTION) \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c RAM \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 UART \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0431\u0430\u0439\u0442 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0441\u0432\u043e\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430 \u043e\u0442 \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0432\u043e FLASH \u043f\u0430\u043c\u044f\u0442\u0438. \u041b\u0438\u0431\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u043a\u043e\u0434 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 EEPROM (\u0438\u043b\u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 OPTION Bytes) \u0432 \u043f\u0430\u043c\u044f\u0442\u044c RAM \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0431\u0430\u0439\u0442\u0430 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e UART \u0434\u0430\u043c\u043f \u0441 \u043a\u043e\u0434\u043e\u043c, \u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 RAM \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u041f\u0440\u0438\u043d\u044f\u0442\u044b\u0439 \u0434\u0430\u043c\u043f \u0441 \u043a\u043e\u0434\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u044e \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: \u0447\u0442\u0435\u043d\u0438\u0435 \/ \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \/ \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435 \/ \u0437\u0430\u043f\u0438\u0441\u044c \u044f\u0447\u0435\u0435\u043a STM8, \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0441 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u044f\u0434\u0440\u0430 STM8, \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0443 \u0434\u043b\u044f \u0441\u043c\u0435\u043d\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0434\u0430\u043c\u043f\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 RAM \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439.<\/p>\n<p>  \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a boot_FLASH rev. $0D \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $8000\u2026$8007 \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u044b RESET \u0438 TRAP (Software interrupt). \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e $8008\u2026$9FFF \u043f\u0430\u043c\u044f\u0442\u0438 FLASH \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u0434 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430:<\/p>\n<pre><code>; \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a boot_FLASH \u0432\u0435\u0440\u0441\u0438\u044f $0D($88)  ; \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 $4087($4187) ; \u0432 \u0441\u0442\u0435\u043a \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430 $00 ; \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0443     segment byte at 8000-8007 'bootF_rev0D' ; $8000 RESET Reset vector     dc.b   $AE, $40  ; [AE 40 88] ldw X,#$4088 ;    dc.b   $AE, $41  ; [AE 41 88] ldw X,#$4188 cycle: ; \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0432 \u0446\u0438\u043a\u043b ; \u043a\u043e\u043c\u0430\u043d\u0434\u0430 push A \u0437\u0430\u0442\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ldw X,#$4088($4188)     push   A         ; [88]     decw   X         ; [5A] ; $8004 TRAP Software interrupt     ld     A, (X)    ; [F6]     jrne   cycle     ; [26 FB]      ret              ; [81] ; $8008 TLI IRQ0 External top level interrupt <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0434 \u0434\u0432\u0443\u0445 \u043a\u043e\u043c\u0430\u043d\u0434: \u043a\u043e\u043c\u0430\u043d\u0434\u044b ldw X,#$4088 (ldw X,#$4188) \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b push A. \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0432 \u0446\u0438\u043a\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u0430 ldw X,#$4088 (ldw X,#$4188) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 push A \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u0422\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u043e \u043e\u0434\u0438\u043d \u0431\u0430\u0439\u0442, \u043d\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0441\u0443\u0436\u0435\u043d\u0438\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u043e\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430. \u041c\u043b\u0430\u0434\u0448\u0438\u0439 \u0431\u0430\u0439\u0442 $88 \u0430\u0434\u0440\u0435\u0441\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 OPTION Bytes. \u0414\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 STM8S103F3 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0434\u0440\u0435\u0441\u0430 $4088 \u0438 $4188 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 EEPROM \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0414\u043b\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 STM8S003F3 \u0441 EEPROM \u043f\u0430\u043c\u044f\u0442\u044c\u044e 128 \u0431\u0430\u0439\u0442 ($4000\u2026$407F) \u0438 \u044d\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b. \u0414\u043b\u044f \u043d\u0438\u0445 \u0432\u0441\u0435 \u0436\u0435 \u0435\u0441\u0442\u044c \u043b\u0430\u0437\u0435\u0439\u043a\u0430. <\/p>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b push A \u0438 decw X: <\/p>\n<pre><code>; \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a boot_FLASH \u0432\u0435\u0440\u0441\u0438\u044f $0D($5A)  ; \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 $405A($415A, $425A) ; \u0432 \u0441\u0442\u0435\u043a \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430 $00 ; \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0443     segment byte at 8000-8007 'bootF_rev0D' ; $8000 RESET Reset vector     dc.b   $AE, $40  ; [AE 40 5A] ldw X,#$405A \u0434\u043b\u044f STM8S003F3 ;    dc.b   $AE, $41  ; [AE 41 5A] ldw X,#$415A ;    dc.b   $AE, $41  ; [AE 42 5A] ldw X,#$425A cycle: ; \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0432 \u0446\u0438\u043a\u043b ; \u043a\u043e\u043c\u0430\u043d\u0434\u0430 decw X \u0437\u0430\u0442\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ldw X,#$405A($415A, $425A)     decw   X         ; [5A]     push   A         ; [88] ; $8004 TRAP Software interrupt     ld     A, (X)    ; [F6]     jrne   cycle     ; [26 FB]      ret              ; [81] ; $8008 TLI IRQ0 External top level interrupt <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0432 \u0446\u0438\u043a\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u0430 ldw X,#$405A($415A, $425A) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 decw X \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c RESET \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0441\u0442\u0435\u043a\u0430 SP \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u043e\u0439 $03FF. \u0421\u0442\u0435\u043a \u0440\u0430\u0441\u0442\u0435\u0442 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u0414\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043a\u0430 \u0441 \u0445\u0432\u043e\u0441\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u043a\u043e\u0434\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u0441 \u0445\u0432\u043e\u0441\u0442\u0430, \u043e\u0442\u0441\u044e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 decw X. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043e\u0431\u0440\u0430\u0437 \u043a\u043e\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 EEPROM.<br \/>   \u0414\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043e\u0442 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u0446\u0438\u043a\u043b\u0430. \u0423\u0441\u043b\u043e\u0432\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0437 \u043a\u043e\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0431\u0430\u0439\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0430 \u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0431\u0430\u0439\u0442) \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0447\u0438\u0442\u0430\u0435\u043c \u0431\u0430\u0439\u0442 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e \u043f\u0440\u043e\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u0441\u0442\u0435\u043a. \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0431\u0430\u0439\u0442 \u2013 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430.<\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 ret \u0437\u0434\u0435\u0441\u044c \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u0434\u0432\u0443\u0445 \u0431\u0430\u0439\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 \u0441\u0442\u0435\u043a. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430:<\/p>\n<pre><code>; \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a boot_EEPROM \u0432\u0435\u0440\u0441\u0438\u044f $0D($88)     segment byte at 4067-4089 'bootE_rev0D_88' ;    segment byte at 417B-4189 'bootE_rev0D_88' ; $4067 terminator \u043d\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 RAM \tdc.b   $00        ; [00] ; $4068 ($03E0) {RAM END - 31} ; {$0400 - (bootE_go_adr - bootE_start) }     dc.w   $03E2      ; [03 E2]   $4067 - $3C85 = $03E2 ; \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 UART 96001N8 ; \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 BREAK \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0438 $0D bootE_start:           ; $406A ($03E2) {RAM END - 29}        \tld    A, #%00001101 ; [A6 0D] \tld    UART1_BRR1, A ; [C7 52 32] \tld    UART1_CR2, A  ; [C7 52 35] \tld    UART1_DR, A   ; [C7 52 31] ; \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0434\u0430\u043c\u043f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 243 \u0431\u0430\u0439\u0442\u0430 ; \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435n \u0435\u0433\u043e \u0432 \u0441\u0442\u0435\u043a\t ; $4075 ($03ED) {RAM END - 18}    bootE_rx_byte:     incw  X           ; [5C]     jreq  bootE_exit  ; [27 0C]     btjf  UART1_SR, #5, bootE_rx_byte ; [72 0B 52 30 F8] \tpush  UART1_DR    ; [3B 52 31] ;\tclrw  X           ; [5F] \tinc   A           ; [4C] \tjrne  bootE_rx_byte ; [26 F2] ; \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u043c\u0443 \u0434\u0430\u043c\u043f\u0443 ; \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $02F1 (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 \u0432 \u0434\u0430\u043c\u043f\u0435 $FE $02)     ret              ; [81] ; $4084 ($03FC) {RAM END - 3} bootE_exit: \tjp   [bootE_go_adr] ; [72 CC 40 88] RAM END ; \u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 ; $4088 \u043d\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 RAM bootE_go_adr:     dc.w   main_flash ; [80 08] <\/code><\/pre>\n<p>  \u0412 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043e\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0442\u0435\u043a. \u041f\u0435\u0440\u0432\u044b\u043c \u0438\u0434\u0435\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0431\u0430\u0439\u0442, \u0432 \u043f\u0430\u043c\u044f\u0442\u044c RAM \u043d\u0435 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u0421\u043b\u0435\u0434\u043e\u043c \u0438\u0434\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0443, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 RAM. \u042d\u0442\u0430 \u043f\u0430\u0440\u0430 \u0432 \u0441\u0442\u0435\u043a \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442, \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u0442\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0437\u0430 \u043d\u0435\u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u043e\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0434\u0430\u043c\u043f\u0430 \u0438\u0437 \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0412\u0435\u0441\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043a, \u043a\u0440\u043e\u043c\u0435 \u043f\u0430\u0440\u044b \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435<br \/>   \u0421\u043b\u0435\u0434\u043e\u043c \u0438\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f UART. \u0417\u0434\u0435\u0441\u044c \u0432\u043e \u0432\u0441\u0435 \u0442\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0447\u0438\u0441\u043b\u043e $0D. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c UART (16000000\/8\/9600\/16=13). \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438\/\u043f\u0440\u0438\u0435\u043c\u0430, \u0437\u0434\u0435\u0441\u044c \u043f\u0430\u0440\u043e\u0432\u043e\u0437\u043e\u043c \u0437\u0430\u0446\u0435\u043f\u0438\u043b\u0430\u0441\u044c \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f BREAK. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 $00 (\u0441\u043e\u0431\u044b\u0442\u0438\u0435 BREAK) \u0438 $0D (\u043d\u043e\u043c\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430) \u2013 \u044d\u0442\u043e \u0441\u0438\u0433\u043d\u0430\u043b, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043c\u043f \u0441 \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p>  \u0420\u0435\u0433\u0438\u0441\u0442\u0440 A \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c $0D \u0434\u0430\u043b\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0431\u0430\u0439\u0442\u043e\u0432 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043e\u043d \u0438\u0445 \u0441 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043e \u043d\u0443\u043b\u044f, \u0447\u0442\u043e \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e 243 \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u043c \u0431\u0430\u0439\u0442\u0430\u043c. \u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u0442\u0430\u043a\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043c\u043f\u044b \u0441 \u043a\u043e\u0434\u043e\u043c. <\/p>\n<p>  \u0418\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 X \u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0435 \u0434\u043e\u0441\u0447\u0438\u0442\u0430\u043b \u0434\u043e $4068. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0441 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e \u043d\u0443\u043b\u044f (\u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0435\u0449\u0435 49048) \u043e\u0442\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u0440\u0435\u043c\u044f, \u043e\u0442\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0443. \u0417\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u0441\u043f\u0435\u0442\u044c \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0434\u0430\u043c\u043f \u0441 \u043a\u043e\u0434\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 243 \u0431\u0430\u0439\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u0441\u0442\u0435\u043a \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u0418\u043d\u0430\u0447\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u043f\u044f\u0442\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u0441\u0431\u0440\u043e\u0441\u0430 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u043c\u0443 \u0434\u0430\u043c\u043f\u0443 \u043a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043a\u0435 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0435\u0448\u0438\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0430\u043c\u043f \u0441 \u043a\u043e\u0434\u043e\u043c. \u041b\u044e\u0431\u043e\u0439 \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0439 \u0434\u0430\u043c\u043f \u0441 \u043a\u043e\u0434\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043a\u0435 \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $02ED&#8230;$03DF \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $02F0. \u041a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043a\u0435 \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $03E0&#8230;$03FF, \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $03E0, \u0430 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0430\u043c\u043f \u0441 \u043a\u043e\u0434\u043e\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $03E8.<br \/>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043a\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $03FB. <br \/>  \u042f\u0447\u0435\u0439\u043a\u0430 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c $03FF \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0434\u0430\u043c\u043f\u043e\u043c.<\/p>\n<p>  \u0426\u0435\u043b\u0438\u043a\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432 STM8 \u0432\u0435\u0440\u0441\u0438\u0438 $0D \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0432 EEPROM \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $4039&#8230;$405C ($4139&#8230;$415C, $4239&#8230;$425C).<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0430\u0439\u043b bootF_rev0D_5A.asm:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>stm8\/  TITLE \u201cbootF_rev0D_5A.asm\u201d     MOTOROLA     WORDS     .NOLIST ;    #include \"STM8S003F.inc\"     #include \"STM8S103F.inc\"     .LIST  ; \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a boot_EEPROM \u0432\u0435\u0440\u0441\u0438\u044f $0D($5A)     segment byte at 4039-405C 'bootE_rev0D_405A' ; STM8S003F ;    segment byte at 4139-415C 'bootE_rev0D_415A' ;    segment byte at 4239-425C 'bootE_rev0D_425A' ; $403A9 ($03DD) {RAM END - 34} terminator \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 RAM   ????? \tdc.b   $00        ; [00] ; $403A ($03DE) {RAM END - 33} ; {$0400 - (bootE_go_adr - bootE_start - 1) }     dc.w   $03E0      ; [03 E0] ; \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 UART 96001N8 ; \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 BREAK \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0438 $0D bootE_start:           ; $403C ($03E0) {RAM END - 31}        \tld    A, #%00001101 ; [A6 0D] \tld    UART1_BRR1, A ; [C7 52 32] \tld    UART1_CR2, A  ; [C7 52 35] ; $4044 ($03E8) {RAM END - 23}  \tld    UART1_DR, A   ; [C7 52 31] ; \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0430\u043c\u043f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 243 \u0431\u0430\u0439\u0442\u0430 ; \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435n \u0435\u0433\u043e \u0432 \u0441\u0442\u0435\u043a\t ; $40487 ($03EB) {RAM END - 20}    bootE_rx_byte:     incw  X           ; [5C]     jreq  bootE_exit  ; [27 0C]     btjf  UART1_SR, #5, bootE_rx_byte ; [72 0B 52 30 F8] \tpush  UART1_DR    ; [3B 52 31] \tclrw  X           ; [5F] \tinc   A           ; [4C] \tjrne  bootE_rx_byte ; [26 F2] ; \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u043c\u0443 \u0434\u0430\u043c\u043f\u0443 ; \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $02EF (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 \u0432 \u0434\u0430\u043c\u043f\u0435 $EF $02) ; $4056 ($03FA) {RAM END - 5}     ret              ; [81] ; $4057 ($03FB) {RAM END - 4} bootE_exit: \tjp   [bootE_go_adr] ; [72 CC 40 5B] {RAM END - 1} ; ($03FF) RAM END  \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0434\u0430\u043c\u043f\u043e\u043c ; \u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 ; $405B \u043d\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 RAM bootE_go_adr:     dc.w   main_flash ; [80 08]  ; \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a boot_FLASH \u0432\u0435\u0440\u0441\u0438\u044f $0D($5A)  ; \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 $405A($415A,$425A) ; \u0432 \u0441\u0442\u0435\u043a \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430 $00 ; \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0443     segment byte at 8000-8007 'bootF_rev0D' ; $8000 RESET Reset vector     dc.b   $AE, $40  ; [AE 40 5A] ldw X,#$405A ; STM8S003F ;    dc.b   $AE, $41  ; [AE 41 5A] ldw X,#$415A ;    dc.b   $AE, $42  ; [AE 42 5A] ldw X,#$425A cycle: ; \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0432 \u0446\u0438\u043a\u043b ; \u043a\u043e\u043c\u0430\u043d\u0434\u0430 dec X \u0437\u0430\u0442\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ldw X,#$405A($415A,$425A)     decw   X         ; [5A]     push   A         ; [88] ; $8004 TRAP Software interrupt     ld     A, (X)    ; [F6]     jrne   cycle     ; [26 FB]     ret              ; [81]\t\t ; $8008 TLI IRQ0 External top level interrupt  ; \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430      segment byte at 8008 'main_flash' main_flash:     jra    *          ; [20 FE]  ;    end ; bootF_rev0D_5A.asm <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0426\u0435\u043b\u0438\u043a\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432 STM8 \u0432\u0435\u0440\u0441\u0438\u0438 $0D \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0432 EEPROM \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $4065&#8230;$4088 ($4165&#8230;$4188).<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0430\u0439\u043b bootF_rev0D_88.asm:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>stm8\/ TITLE \u201cbootF_rev0D_88.asm\u201d       MOTOROLA       WORDS       .NOLIST ;    #include \"STM8S003F.inc\"       #include \"STM8S103F.inc\"       .LIST  ; \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a boot_EEPROM \u0432\u0435\u0440\u0441\u0438\u044f $0D($88)     segment byte at 4065-4088 'bootE_rev0D_88' ;    segment byte at 4165-4188 'bootE_rev0D_88' ; $4065 terminator \u043d\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 RAM \tdc.b   $00        ; [00] ; $4066 ($03DE) {RAM END - 33} ; {$0400 - (bootE_go_adr - bootE_start) }     dc.w   $03E0      ; [03 E0] ; \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 UART 9600 1N8 ; \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 BREAK \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0438 $0D bootE_start:           ; $4068 ($03E0) {RAM END - 31}        \tld    A, #%00001101 ; [A6 0D] \tld    UART1_BRR1, A ; [C7 52 32] \tld    UART1_CR2, A  ; [C7 52 35] ; $4070 ($03E8) {RAM END - 23}  \tld    UART1_DR, A   ; [C7 52 31] ; \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0430\u043c\u043f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 243 \u0431\u0430\u0439\u0442\u0430 ; \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435n \u0435\u0433\u043e \u0432 \u0441\u0442\u0435\u043a\t ; $4073 ($03EB) {RAM END - 20}    bootE_rx_byte:     incw  X           ; [5C]     jreq  bootE_exit  ; [27 0C]     btjf  UART1_SR, #5, bootE_rx_byte ; [72 0B 52 30 F8] \tpush  UART1_DR    ; [3B 52 31] \tclrw  X           ; [5F] \tinc   A           ; [4C] \tjrne  bootE_rx_byte ; [26 F2] ; \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u043c\u0443 \u0434\u0430\u043c\u043f\u0443 ; \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $02EF (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 \u0432 \u0434\u0430\u043c\u043f\u0435 $EF $02) ; $4082 ($03FA) {RAM END - 5}     ret              ; [81] ; $4083 ($03FB) {RAM END - 4} bootE_exit: \tjp   [bootE_go_adr] ; [72 CC 40 87] {RAM END - 1} ; ($03FF) RAM END  \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0434\u0430\u043c\u043f\u043e\u043c ; \u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 ; $4087 ($4088 \u043d\u0435) \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 RAM bootE_go_adr:     dc.w   main_flash ; [80 08]  \t ; \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0449\u0438\u043a boot_FLASH \u0432\u0435\u0440\u0441\u0438\u044f $0D($88)  ; \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 $4087($4187) ; \u0432 \u0441\u0442\u0435\u043a \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430 $00 ; \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0443     segment byte at 8000-8007 'bootF_rev0D' ; $8000 RESET Reset vector     dc.b   $AE, $40  ; [AE 40] ldw X,#$4088 ;    dc.b   $AE, $41  ; [AE 41] ldw X,#$4188 cycle: ; \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0432 \u0446\u0438\u043a\u043b ; \u043a\u043e\u043c\u0430\u043d\u0434\u0430 push A \u0437\u0430\u0442\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ldw X,#$4088($4188)     push   A         ; [88]     decw   X         ; [5A] ; $8004 TRAP Software interrupt     ld     A, (X)    ; [F6]     jrne   cycle     ; [26 FB]      ret              ; [81] ; $8008 TLI IRQ0 External top level interrupt  ; \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430      segment byte at 8008 'main_flash' main_flash:     jra    *          ; [20 FE]      end ; bootF_rev0D_88.asm <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u0430\u0431\u0440\u043e\u0441\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u043e FLASH \u043f\u0430\u043c\u044f\u0442\u0438 STM8.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0430\u0439\u043b main_rev0D.asm:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>stm8\/  TITLE \u201cmain_rev0D.asm\u201d     MOTOROLA     WORDS     .NOLIST     #include \"STM8S103F.inc\"     .LIST  ; \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430      segment byte at 8008-9FFF 'main_flash' main_flash:  main_cycle: ; \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\t \tbset \tPB_DDR,#5 \t\t;  \tbset \tPB_CR1,#5 \t\t;  \tcallr    flash_delay ; \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\t \tbres \tPB_DDR,#5 \t\t;  \tbres \tPB_CR1,#5 \t\t;  \tcallr    flash_delay     jra    main_cycle \t flash_delay:     ldw     X, #35000 flash_delay_cycle:     decw    X     jrne    flash_delay_cycle     ret      end ; main_rev0D.asm <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u043e\u0448\u044c\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0432 STM8. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043b\u0430\u0442\u0443 \u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043d\u0438\u043a\u0443 USB-TTL(UART). \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <a href=\"http:\/\/nflic.ru\/STM8\/habr_loader\/boot_PC_rev0D.zip\">runSTM8uLoader.bat<\/a>. \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 \u0441\u0431\u0440\u043e\u0441\u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435. \u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/bbf\/559\/522\/bbf5595225bd2c2a99542e76c1b299c9.png\"><\/p>\n<p>  \u041a\u043e\u0434 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u043e\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u043c \u0432\u043e FLASH \u043f\u0430\u043c\u044f\u0442\u044c, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f. \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043c\u043e\u0440\u0433\u0430\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432 \u0434\u0430\u043c\u043f\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0443 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 RAM:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0430\u0439\u043b Read_128000v0D.asm:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>stm8\/ TITLE \"Read_128000v0D.asm\"       MOTOROLA       WORDS       .NOLIST       #include \"STM8S103F3P.inc\"       .LIST ; \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043c\u043f\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c 243 \u0431\u0430\u0439\u0442\u0430 ; \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u043c\u043f \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $02EE...$03DF ; (\u0437\u0430\u0442\u0438\u0440\u0430\u0435\u0442 \u0430\u0434\u0435\u0441\u0430 $03DF:$03E0 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0443) ; \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $02F0 ; \u0432\u044b\u0437\u0432\u0430\u0432\u0448\u0438\u0439 \u0434\u0430\u043c\u043f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $03E1...$03FE ; \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $03E1 (\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0430 9600, \u043d\u0430\u0434\u043e A&lt;=$0D SP&lt;=$03E0 X&lt;=$0000) ; \u0438\u043b\u0438 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $03E9 (\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442, \u043d\u0430\u0434\u043e A&lt;=$0D SP&lt;=$03E8 X&lt;=$0000) ; \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0437\u0434\u0435\u0441\u044c $03FB       segment byte at 0000-00F2 'ram0'       dc.w   $02F0 start: ; \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c UART1 \u043d\u0430 \u043f\u0440\u0438\u0435\u043c\/\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 9600, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (8 \u0431\u0438\u0442, \u043d\u0435\u0442 \u0431\u0438\u0442\u0430 \u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438, 1 \u0441\u0442\u043e\u043f\u043e\u0432\u044b\u0439 \u0431\u0438\u0442)    mov    UART1_BRR2, #0            ; [35 00 52 33]  \u0434\u043b\u044f Fmaster=16\/8=2\u041c\u0413\u0446 \u0438 128000    mov    UART1_BRR1, #1           ; [35 0D 52 32]  \u0434\u043b\u044f Fmaster=16\/8=2\u041c\u0413\u0446 \u0438 128000    mov    UART1_CR2, #%00001100     ; [35 0C 52 35]    UART1_CR2.TEN &lt;- 1  UART1_CR2.REN &lt;- 1  \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443\/\u043f\u0440\u0438\u0435\u043c     main_cycle:  wait_byte_adrH_cmnd:     btjf   UART1_SR, #5, wait_byte_adrH_cmnd     ld     A, UART1_DR     cp     A, #$EF \tJRUGT  wait_byte_cmd_test              ; Relative jump if Unsigned Greater Than     ld     XH, A\t\t\t\t; \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0430\u0439\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 XH \tld     UART1_DR, A        \t\t\t   ; \u044d\u0445\u043e \u0441\u0442\u0430\u0440\u0448\u0435\u0433\u043e \u0431\u0430\u0439\u0442\u0430 \u0430\u0434\u0440\u0435\u0441\u0430 tx_echo_adrH: \tbtjf   UART1_SR, #7, tx_echo_adrH\t; skip if UART1_SR.TXE = 0\t\tTXE: Transmit data register empty \t wait_byte_adrL:     btjf  UART1_SR, #5, wait_byte_adrL \t     ld     A, UART1_DR     ld     XL, A\t\t\t\t; \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0431\u0430\u0439\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 XL \t wait_byte_cntr:     btjf  UART1_SR, #5, wait_byte_cntr \t     ld     A, #$00     ld     YH, A\t\t\t\t;     ld     A, UART1_DR     ld     YL, A\t\t\t\t; \u0441\u0447\u0435\u0442\u0447\u0438\u043a    ; \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\t     bset \tPB_DDR,#5 \t\t;     bset \tPB_CR1,#5 \t\t;  ;  read_block_cycle: \tld\t\tA, (X)     ld     UART1_DR, A wait_tx: \tbtjf\tUART1_SR, #7, wait_tx\t; skip if UART1_SR.TXE = 0\t\tTXE: Transmit data register empty \tincw\tX \tdecw\tY \tjrne\tread_block_cycle \t ; \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\t     bres \tPB_DDR,#5 \t\t;     bres \tPB_CR1,#5 \t\t;       jra     main_cycle \t ; \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0430\u0439\u0442 $F0 \u0438 \u0431\u043e\u043b\u0435\u0435 wait_byte_cmd_test:      cp     A, #$F5\t\t\t\t\t\t; \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \t jreq    echo_F5cmd wait_tx_err: \t mov    UART1_DR, #$F1        ; \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \tbtjf\tUART1_SR, #7, wait_tx_err\t; skip if UART1_SR.TXE = 0\t\tTXE: Transmit data register empty \t jra    main_cycle \t  echo_F5cmd: \tld     UART1_DR, A \t\t\t\t\t; \u044d\u0445\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 wait_tx_echo_F5cmd: \tbtjf\tUART1_SR, #7, wait_tx_echo_F5cmd\t; skip if UART1_SR.TXE = 0\t\tTXE: Transmit data register empty \t ; GoAdr wait_byte_adrH_toM;      btjf   UART1_SR, #5, wait_byte_adrH_toM     mov    $03E7, UART1_DR wait_byte_adrL_toM;      btjf   UART1_SR, #5, wait_byte_adrL_toM     mov    $03E8, UART1_DR ; SP wait_byte_adrH_toSP;      btjf   UART1_SR, #5, wait_byte_adrH_toSP     ld     A, UART1_DR     ld     XH, A wait_byte_adrL_toSP;      btjf   UART1_SR, #5, wait_byte_adrL_toSP     ld     A, UART1_DR     ld     XL, A \tldw    SP, X ; Y wait_byte_adrH_toY;  ;    btjf   UART1_SR, #5, wait_byte_adrH_toY ;    ld     A, UART1_DR ;    ld     YH, A wait_byte_adrL_toY;  ;    btjf   UART1_SR, #5, wait_byte_adrL_toY ;    ld     A, UART1_DR ;    ld     YL, A ; X wait_byte_adrH_toX;      btjf   UART1_SR, #5, wait_byte_adrH_toX     ld     A, UART1_DR     ld     XH, A wait_byte_adrL_toX;      btjf   UART1_SR, #5, wait_byte_adrL_toX     ld     A, UART1_DR     ld     XL, A ; A wait_byte_cntr_toA;      btjf   UART1_SR, #5, wait_byte_cntr_toA     ld     A, UART1_DR  \tjp     [$03E7.w] \t \tSKIP   59, $00 ; \u044f\u0447\u0435\u0439\u043a\u0438 \u0434\u043b\u044f \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \tdc.b   $00 \tdc.b   $00 \t \tend ; Read_128000v0D.asm <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0430\u0439\u043b WriteBlocks_FLASH_128000v0D.asm:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>stm8\/  TITLE \"WriteBlocks_FLASH_128000v0D.asm\"     MOTOROLA     WORDS \t.NOLIST \t#include \"STM8S103F3P.inc\"     .LIST ; \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043c\u043f\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c 243 \u0431\u0430\u0439\u0442\u0430 ; \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u043c\u043f \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $02EE...$03DF ; (\u0437\u0430\u0442\u0438\u0440\u0430\u0435\u0442 \u0430\u0434\u0435\u0441\u0430 $03DF:$03E0 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0443) ; \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $02F0 ; \u0432\u044b\u0437\u0432\u0430\u0432\u0448\u0438\u0439 \u0434\u0430\u043c\u043f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $03E1...$03FE ; \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $03E1 (\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0430 9600, \u043d\u0430\u0434\u043e A&lt;=$0D SP&lt;=$03E0 X&lt;=$0000) ; \u0438\u043b\u0438 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $03E9 (\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442, \u043d\u0430\u0434\u043e A&lt;=$0D SP&lt;=$03E8 X&lt;=$0000) ; \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0437\u0434\u0435\u0441\u044c $03FB       segment byte at 0000-00F2 'ram0'       dc.w   $02F0 start: ; \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c UART1 \u043d\u0430 \u043f\u0440\u0438\u0435\u043c\/\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 9600, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (8 \u0431\u0438\u0442, \u043d\u0435\u0442 \u0431\u0438\u0442\u0430 \u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438, 1 \u0441\u0442\u043e\u043f\u043e\u0432\u044b\u0439 \u0431\u0438\u0442)   mov    UART1_BRR2, #0            ; [35 00 52 33]  \u0434\u043b\u044f Fmaster=16\/8=2\u041c\u0413\u0446 \u0438 128000    mov    UART1_BRR1, #1           ; [35 0D 52 32]  \u0434\u043b\u044f Fmaster=16\/8=2\u041c\u0413\u0446 \u0438 128000    mov    UART1_CR2, #%00001100     ; [35 0C 52 35]    UART1_CR2.TEN &lt;- 1  UART1_CR2.REN &lt;- 1  \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443\/\u043f\u0440\u0438\u0435\u043c     main_cycle: \t wait_byte_adrH_cmnd:     btjf   UART1_SR, #5, wait_byte_adrH_cmnd     ld     A, UART1_DR     cp     A, #$F0 \tJRUGE  wait_byte_cmd_test              ; Relative jump if Unsigned Greater or Equal     ld     XH, A\t\t\t\t; \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0430\u0439\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 XH \tld     UART1_DR, A        \t\t\t   ; \u044d\u0445\u043e \u0441\u0442\u0430\u0440\u0448\u0435\u0433\u043e \u0431\u0430\u0439\u0442\u0430 \u0430\u0434\u0440\u0435\u0441\u0430 tx_echo_adrH: \tbtjf   UART1_SR, #7, tx_echo_adrH\t; skip if UART1_SR.TXE = 0\t\tTXE: Transmit data register empty \t wait_byte_adrL:     btjf  UART1_SR, #5, wait_byte_adrL \t     ld     A, UART1_DR     ld     XL, A\t\t\t\t; \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0431\u0430\u0439\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 XL    wait_byte_cntr:     btjf   UART1_SR, #5, wait_byte_cntr\t; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u043b\u043e\u043a\u043e\u0432     mov     $03FF, UART1_DR  \t write_block_cycle: \tldw\t\tY, #64\t\t\t; \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430 \t ; unlock FLASH memory  (writing the correct MASS keys)     mov       FLASH_PUKR, #$56           ; Write $56 then $AE in FLASH_PUKR($5062)     mov       FLASH_PUKR, #$AE           ; If wrong keys have been entered, another key programming sequence can be issued without resetting the device. ; FLASH Block programming mode    \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0431\u043b\u043e\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0434\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c     mov     FLASH_CR2,  #$01          mov     FLASH_NCR2, #$FE     ;  ; FLASH Word programming mode    \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u043b\u043e\u0432\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0434\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c ;    mov     FLASH_CR2,  #$40      ;    mov     FLASH_NCR2, #$BF ; else FLASH byte programming    ; \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\t     bset \tPB_DDR,#5 \t\t;     bset \tPB_CR1,#5 \t\t;  ; \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0443\u0444\u0435\u0440 ; \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430 wait_rx_byte:     btjf    UART1_SR, #5, wait_rx_byte     ld      A, UART1_DR \tld\t\t(X), A \tincw\tX \tdecw\tY \tjrne\twait_rx_byte  \t mov    UART1_DR, #$FA\t\t\t\t; OK wait_tx_OK_FA: \tbtjf   UART1_SR, #7, wait_tx_OK_FA\t; skip if UART1_SR.TXE = 0\t\tTXE: Transmit data register empty ; \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\t     bres \tPB_DDR,#5 \t\t;     bres \tPB_CR1,#5 \t\t;  \t \tdec    $03FF \tjrne\twrite_block_cycle      jra     main_cycle \t ; \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0430\u0439\u0442 $F0 \u0438 \u0431\u043e\u043b\u0435\u0435 wait_byte_cmd_test:      cp     A, #$F5\t\t\t\t\t\t; \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a boot_OPTION \t jreq    echo_F5cmd wait_tx_err: \t mov    UART1_DR, #$F1        ; \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 wait_tx_err_F1:  \tbtjf\tUART1_SR, #7, wait_tx_err_F1\t; skip if UART1_SR.TXE = 0\t\tTXE: Transmit data register empty \t jra    main_cycle \t  echo_F5cmd: \tld     UART1_DR, A \t\t\t\t\t; \u044d\u0445\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a boot_OPTION wait_tx_echo_F5cmd: \tbtjf\tUART1_SR, #7, wait_tx_echo_F5cmd\t; skip if UART1_SR.TXE = 0\t\tTXE: Transmit data register empty \t \t ; GoAdr wait_byte_adrH_toM;      btjf   UART1_SR, #5, wait_byte_adrH_toM     mov    $03E7, UART1_DR wait_byte_adrL_toM;      btjf   UART1_SR, #5, wait_byte_adrL_toM     mov    $03E8, UART1_DR ; SP wait_byte_adrH_toSP;      btjf   UART1_SR, #5, wait_byte_adrH_toSP     ld     A, UART1_DR     ld     XH, A wait_byte_adrL_toSP;      btjf   UART1_SR, #5, wait_byte_adrL_toSP     ld     A, UART1_DR     ld     XL, A \tldw    SP, X ; Y wait_byte_adrH_toY;  ;    btjf   UART1_SR, #5, wait_byte_adrH_toY ;    ld     A, UART1_DR ;    ld     YH, A wait_byte_adrL_toY;  ;    btjf   UART1_SR, #5, wait_byte_adrL_toY ;    ld     A, UART1_DR ;    ld     YL, A ; X wait_byte_adrH_toX;      btjf   UART1_SR, #5, wait_byte_adrH_toX     ld     A, UART1_DR     ld     XH, A wait_byte_adrL_toX;      btjf   UART1_SR, #5, wait_byte_adrL_toX     ld     A, UART1_DR     ld     XL, A ; A wait_byte_cntr_toA;      btjf   UART1_SR, #5, wait_byte_cntr_toA     ld     A, UART1_DR  \tjp     [$03E7.w] \t \tSKIP   28, $00 ; \u044f\u0447\u0435\u0439\u043a\u0438 \u0434\u043b\u044f \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \tdc.b   $00 \tdc.b   $00 \t \tend ; WriteBlocks_FLASH_128000v0D.asm <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0430\u0439\u043b Reset_128000v0D.asm:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>stm8\/  TITLE \"Reset_128000v0D.asm\"     MOTOROLA     WORDS \t.NOLIST \t#include \"STM8S103F3P.inc\"     .LIST ; \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043c\u043f\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c 243 \u0431\u0430\u0439\u0442\u0430 ; \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u043c\u043f \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $02EE...$03DF ; (\u0437\u0430\u0442\u0438\u0440\u0430\u0435\u0442 \u0430\u0434\u0435\u0441\u0430 $03DF:$03E0 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0443) ; \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $02F0 ; \u0432\u044b\u0437\u0432\u0430\u0432\u0448\u0438\u0439 \u0434\u0430\u043c\u043f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u0434\u0440\u0435\u0441\u0430\u0445 $03E1...$03FE ; \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $03E1 (\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0430 9600, \u043d\u0430\u0434\u043e A&lt;=$0D SP&lt;=$03E0 X&lt;=$0000) ; \u0438\u043b\u0438 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 $03E9 (\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442, \u043d\u0430\u0434\u043e A&lt;=$0D SP&lt;=$03E8 X&lt;=$0000) ; \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0437\u0434\u0435\u0441\u044c $03FB       segment byte at 0000-00F2 'ram0'       dc.w   $02F0 start: ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440 RESET     ldw    X, #$03FF \tldw    SP, X \tclrw   X \tclrw   Y \tclr    A \tjp     $8000 \t \tSKIP   230, $00  \tend ; Reset_128000v0D.asm <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0445\u043e\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u044d\u0442\u0438 \u0436\u0435 \u0434\u0430\u043c\u043f\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0432\u0438\u0434\u0435:<\/p>\n<pre><code>   public readonly static byte[] Read_128000v0D = { 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE7, 0x03, 0xCC, 0x72,  0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0x97, 0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52, 0x0B,  0x72, 0x95, 0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0x94, 0x97, 0x31, 0x52, 0xC6, 0xFB,  0x30, 0x52, 0x0B, 0x72, 0x95, 0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0xE8, 0x03, 0x31,  0x52, 0x55, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0xE7, 0x03, 0x31, 0x52, 0x55, 0xFB, 0x30, 0x52, 0x0B,  0x72, 0xFB, 0x30, 0x52, 0x0F, 0x72, 0x31, 0x52, 0xC7, 0xA5, 0x20, 0xF7, 0x30, 0x52, 0x0F, 0x72,  0x31, 0x52, 0xF1, 0x35, 0x0B, 0x27, 0xF5, 0xA1, 0xB4, 0x20, 0x08, 0x50, 0x1B, 0x72, 0x07, 0x50,  0x1B, 0x72, 0xF2, 0x26, 0x5A, 0x90, 0x5C, 0xFB, 0x30, 0x52, 0x0F, 0x72, 0x31, 0x52, 0xC7, 0xF6,  0x08, 0x50, 0x1A, 0x72, 0x07, 0x50, 0x1A, 0x72, 0x97, 0x90, 0x31, 0x52, 0xC6, 0x95, 0x90, 0x00,  0xA6, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0x97, 0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0xFB,  0x30, 0x52, 0x0F, 0x72, 0x31, 0x52, 0xC7, 0x95, 0x40, 0x22, 0xEF, 0xA1, 0x31, 0x52, 0xC6, 0xFB,  0x30, 0x52, 0x0B, 0x72, 0x35, 0x52, 0x0C, 0x35, 0x32, 0x52, 0x01, 0x35, 0x33, 0x52, 0x00, 0x35,  0xF0, 0x02 }; <\/code><\/pre>\n<p>  <\/p>\n<pre><code>   public readonly static byte[] WriteBlocks_FLASH_128000v0D = { 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE7, 0x03, 0xCC,  0x72, 0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0x97, 0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52,  0x0B, 0x72, 0x95, 0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0x94, 0x97, 0x31, 0x52, 0xC6,  0xFB, 0x30, 0x52, 0x0B, 0x72, 0x95, 0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0xE8, 0x03,  0x31, 0x52, 0x55, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0xE7, 0x03, 0x31, 0x52, 0x55, 0xFB, 0x30, 0x52,  0x0B, 0x72, 0xFB, 0x30, 0x52, 0x0F, 0x72, 0x31, 0x52, 0xC7, 0x86, 0x20, 0xFB, 0x30, 0x52, 0x0F,  0x72, 0x31, 0x52, 0xF1, 0x35, 0x0B, 0x27, 0xF5, 0xA1, 0x95, 0x20, 0xBF, 0x26, 0xFF, 0x03, 0x5A,  0x72, 0x08, 0x50, 0x1B, 0x72, 0x07, 0x50, 0x1B, 0x72, 0xFB, 0x30, 0x52, 0x0F, 0x72, 0x31, 0x52,  0xFA, 0x35, 0xF2, 0x26, 0x5A, 0x90, 0x5C, 0xF7, 0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52, 0x0B, 0x72,  0x08, 0x50, 0x1A, 0x72, 0x07, 0x50, 0x1A, 0x72, 0x5C, 0x50, 0xFE, 0x35, 0x5B, 0x50, 0x01, 0x35,  0x62, 0x50, 0xAE, 0x35, 0x62, 0x50, 0x56, 0x35, 0x40, 0x00, 0xAE, 0x90, 0xFF, 0x03, 0x31, 0x52,  0x55, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0x97, 0x31, 0x52, 0xC6, 0xFB, 0x30, 0x52, 0x0B, 0x72, 0xFB,  0x30, 0x52, 0x0F, 0x72, 0x31, 0x52, 0xC7, 0x95, 0x5F, 0x24, 0xF0, 0xA1, 0x31, 0x52, 0xC6, 0xFB,  0x30, 0x52, 0x0B, 0x72, 0x35, 0x52, 0x0C, 0x35, 0x32, 0x52, 0x01, 0x35, 0x33, 0x52, 0x00, 0x35,  0xF0, 0x02 }; <\/code><\/pre>\n<p>  <\/p>\n<pre><code>   public readonly static byte[] Reset_128000v0D = { 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xCC, 0x4F, 0x5F, 0x90, 0x5F, 0x94, 0xFF, 0x03, 0xAE,  0xF0, 0x02 };   <\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: <a href=\"https:\/\/habr.com\/post\/417493\/\"> \u201d \u041a\u0430\u043a \u0441\u0436\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0434\u043b\u044f STM8 \u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 18 \u0431\u0430\u0439\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 FLASH\u201d <\/a>.<br \/>  \u0421\u0430\u0439\u0442 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c <a href=\"http:\/\/nflic.ru\/STM8\/STM8uLoader\/000.html\"> http:\/\/nflic.ru\/STM8\/STM8uLoader\/000.html <\/a>. <br \/>  \u041f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 <a href=\"https:\/\/sourceforge.net\/projects\/ovsp\"> https:\/\/sourceforge.net\/projects\/ovsp <\/a>.<br \/>  \u041f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 <a href=\"https:\/\/github.com\/ovsp\/STM8uLoader\"> https:\/\/github.com\/ovsp\/STM8uLoader <\/a>.<\/p>\n<p>  \u041f\u0440\u043e\u0448\u0443 \u043e\u0442 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u0438 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c\u0443 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430.<\/p><\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/418483\/\"> https:\/\/habr.com\/post\/418483\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/418483\/\" class=\"post__text post__text-html js-mediator-article\">\u0421\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/417493\/\"> \u201d \u041a\u0430\u043a \u0441\u0436\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0434\u043b\u044f STM8 \u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 18 \u0431\u0430\u0439\u0442 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 FLASH\u201d <\/a>\u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 <a href=\"http:\/\/nflic.ru\/STM8\/STM8uLoader\/000.html\"> STM8uLoader <\/a>. \u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a STM8uLoader \u0432\u0435\u0440\u0441\u0438\u0438 <a href=\"https:\/\/sourceforge.net\/projects\/ovsp\"> $36 <\/a> \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043f\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 RAM \u0431\u0435\u0437 \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u0445\u043e\u0441\u0442-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0420\u0430\u0437\u043c\u0435\u0440 18 \u0431\u0430\u0439\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 FLASH \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 OPTION Bytes \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f \u0434\u043e 53 \u0431\u0430\u0439\u0442\u0430 (\u0437\u0430\u043d\u044f\u043b \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e).<\/p>\n<p>  \u0412 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0430\u0441\u044c \u0432\u0435\u0440\u0441\u0438\u044f <a href=\"https:\/\/github.com\/ovsp\/STM8uLoader\"> $0D <\/a> \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u0436\u0430\u0442\u044c \u043a\u043e\u0434. \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0432\u043e FLASH \u043f\u0430\u043c\u044f\u0442\u0438 8 \u0431\u0430\u0439\u0442 \u0432 EEPROM \u043f\u0430\u043c\u044f\u0442\u0438 35 \u0431\u0430\u0439\u0442.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-287953","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=287953"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287953\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}