{"id":299112,"date":"2020-02-22T21:00:15","date_gmt":"2020-02-22T21:00:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299112"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299112","title":{"rendered":"\u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 ARM Cortex-M \u043f\u043e UART \u0427\u0430\u0441\u0442\u044c 2"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/489540\/\">\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/488672\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 DebugMon \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0441 \u043d\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435. <\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 \u043f\u043e UART.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/h4>\n<p>  <a href=\"https:\/\/www.sourceware.org\/gdb\/onlinedocs\/gdb\/Remote-Protocol.html\">\u0422\u0443\u0442<\/a> \u0438 <a href=\"https:\/\/ftp.gnu.org\/old-gnu\/Manuals\/gdb\/html_node\/gdb_129.html\">\u0442\u0443\u0442<\/a> \u0435\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 GDB \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0425\u043e\u0442\u044c \u043e\u043d\u043e \u0438 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0435\u0433\u043e \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c:<\/p>\n<ul>\n<li>\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445. \u0410\u0434\u0440\u0435\u0441\u0430, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 hex-\u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 2 \u0440\u0430\u0437\u0430 <\/li>\n<li> \u041f\u0430\u0440\u0441\u0438\u0442\u044c \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0437\u0430\u0439\u043c\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b<\/li>\n<li>\u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0446 \u043f\u0430\u043a\u0435\u0442\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u043f\u043e \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0443 (\u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u044f\u0442 \u0442\u0430\u0439\u043c\u0435\u0440), \u043b\u0438\u0431\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c, \u0447\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0438 UART <\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043b\u0435\u0433\u043a\u043e\u0433\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438:<\/p>\n<ul>\n<li>0\u0445\u0410\u0410 0xFF \u2014 Start of frame <\/li>\n<li>0xAA 0x00 \u2014 End of frame <\/li>\n<li>0xAA 0xA5 \u2014 Interrupt <\/li>\n<li>0xAA 0xAA \u2014 \u0417\u0430\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 0xAA <\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044d\u0442\u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0438 \u043f\u0440\u0438\u0435\u043c\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0441 4\u043c\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438:<\/p>\n<ul>\n<li> \u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 ESC \u0441\u0438\u043c\u0432\u043e\u043b\u0430<\/li>\n<li> \u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 Start of frame<\/li>\n<li> \u041f\u0440\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li> \u041f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u0431\u044b\u043b \u043f\u0440\u0438\u043d\u044f\u0442 Esc \u0441\u0438\u043c\u0432\u043e\u043b<\/li>\n<\/ul>\n<p>  \u0410 \u0432\u043e\u0442 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0436\u0435 7:<\/p>\n<ul>\n<li> \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430 Start of frame<\/li>\n<li> \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430 Start of frame<\/li>\n<li> \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li> \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 End of frame<\/li>\n<li> \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 Esc \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0437\u0430\u043c\u0435\u043d\u044b<\/li>\n<li> \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430 Interrupt<\/li>\n<li> \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0430\u0439\u0442\u0430 Interrupt<\/li>\n<\/ul>\n<p>  \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u044f:<\/p>\n<pre><code class=\"cpp\">typedef struct  {       \/\/ disable receive data   unsigned tx:1;   \/\/ program stopped   unsigned StopProgramm:1;   union {     enum rx_state_e      {       rxWaitS = 0, \/\/ wait Esc symbol       rxWaitC = 1, \/\/ wait Start of frame       rxReceive = 2, \/\/ receiving       rxEsc = 3, \/\/ Esc received     } rx_state;     enum tx_state_e      {       txSendS = 0, \/\/ send first byte of Start of frame       txSendC = 1, \/\/ send second byte       txSendN = 2, \/\/ send byte of data       txEsc = 3,   \/\/ send escaped byte of data       txEnd = 4,   \/\/ send End of frame       txSendS2 = 5,\/\/ send first byte of Interrupt       txBrk = 6,   \/\/ send second byte     } tx_state;   };   uint8_t pos; \/\/ receive\/send position   uint8_t buf[128]; \/\/ offset = 3   uint8_t txCnt; \/\/ size of send data } dbg_t; #define dbgG ((dbg_t*)DBG_ADDR) \/\/ \u0430\u0434\u0440\u0435\u0441 \u0437\u0430\u0434\u0430\u043d \u0436\u0435\u0441\u0442\u043a\u043e, \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043b\u0438\u043d\u043a\u0435\u0440\u0430 \u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043e\u0437\u0443 \u0443\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439<\/code><\/pre>\n<p>  \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0438\u0435\u043c\u043d\u043e\u0433\u043e \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u0432 \u043e\u0431\u044a\u0435\u0434\u0435\u043d\u0435\u043d\u044b \u0432 \u043e\u0434\u043d\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0442\u0438\u0441\u044c \u043f\u043e\u043b\u0443\u0434\u0443\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a UART<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void USART6_IRQHandler(void) {   if (((USART6-&gt;ISR &amp; USART_ISR_RXNE) != 0U)       &amp;&amp; ((USART6-&gt;CR1 &amp; USART_CR1_RXNEIE) != 0U))   {     rxCb(USART6-&gt;RDR);     return;   }    if (((USART6-&gt;ISR &amp; USART_ISR_TXE) != 0U)       &amp;&amp; ((USART6-&gt;CR1 &amp; USART_CR1_TXEIE) != 0U))   {     txCb();     return;   } }  void rxCb(uint8_t byte) {   dbg_t* dbg = dbgG; \/\/ debug vars pointer      if (dbg-&gt;tx) \/\/ use half duplex mode     return;      switch(dbg-&gt;rx_state)   {   default:   case rxWaitS:     if (byte==0xAA)       dbg-&gt;rx_state = rxWaitC;     break;   case rxWaitC:     if (byte == 0xFF)       dbg-&gt;rx_state = rxReceive;     else       dbg-&gt;rx_state = rxWaitS;     dbg-&gt;pos = 0;     break;   case rxReceive:     if (byte == 0xAA)       dbg-&gt;rx_state = rxEsc;     else       dbg-&gt;buf[dbg-&gt;pos++] = byte;     break;   case rxEsc:     if (byte == 0xAA)     {       dbg-&gt;buf[dbg-&gt;pos++] = byte;       dbg-&gt;rx_state  = rxReceive;     }     else if (byte == 0x00)     {       parseAnswer();     }     else       dbg-&gt;rx_state = rxWaitS;   } }  void txCb() {   dbg_t* dbg = dbgG;   switch (dbg-&gt;tx_state)   {   case txSendS:     USART6-&gt;TDR = 0xAA;     dbg-&gt;tx_state = txSendC;     break;   case txSendC:     USART6-&gt;TDR = 0xFF;     dbg-&gt;tx_state = txSendN;     break;   case txSendN:     if (dbg-&gt;txCnt&gt;=dbg-&gt;pos)     {       USART6-&gt;TDR = 0xAA;       dbg-&gt;tx_state = txEnd;       break;     }     if (dbg-&gt;buf[dbg-&gt;txCnt]==0xAA)     {       USART6-&gt;TDR = 0xAA;       dbg-&gt;tx_state = txEsc;       break;     }     USART6-&gt;TDR = dbg-&gt;buf[dbg-&gt;txCnt++];     break;   case txEsc:     USART6-&gt;TDR = 0xAA;     dbg-&gt;txCnt++;     dbg-&gt;tx_state = txSendN;     break;   case txEnd:     USART6-&gt;TDR = 0x00;     dbg-&gt;rx_state = rxWaitS;     dbg-&gt;tx = 0;     CLEAR_BIT(USART6-&gt;CR1, USART_CR1_TXEIE);     break;   case txSendS2:     USART6-&gt;TDR = 0xAA;     dbg-&gt;tx_state = txBrk;     break;   case txBrk:     USART6-&gt;TDR = 0xA5;     dbg-&gt;rx_state = rxWaitS;     dbg-&gt;tx = 0;     CLEAR_BIT(USART6-&gt;CR1, USART_CR1_TXEIE);     break;   } }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0432\u0448\u0435\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u0438\u0431\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u043f\u0440\u0438\u0435\u043c\u0430, \u043b\u0438\u0431\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0430\u043a\u0435\u0442\u0430, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u043e\u0434\u043d\u0438\u043c \u0431\u0430\u0439\u0442\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">void parseAnswer() {   dbg_t* dbg = dbgG;   dbg-&gt;pos = 1;   dbg-&gt;buf[0] = 0x33;   dbg-&gt;txCnt = 0;   dbg-&gt;tx = 1;   dbg-&gt;tx_state = txSendS;   SET_BIT(USART6-&gt;CR1, USART_CR1_TXEIE); }<\/code><\/pre>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u043c, \u0437\u0430\u0448\u0438\u0432\u0430\u0435\u043c, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u0438\u0434\u0435\u043d \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0435, \u043e\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043e\u0431\u043c\u0435\u043d<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yt\/nh\/ax\/ytnhaxq7durfoqkvawblnjldrns.png\">  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438\u0437 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 GDB \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<ul>\n<li> \u0447\u0442\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438<\/li>\n<li> \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0430\u043c\u044f\u0442\u0438<\/li>\n<li> \u043e\u0441\u0442\u0430\u043d\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/li>\n<li> \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/li>\n<li> \u0447\u0442\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u044f\u0434\u0440\u0430<\/li>\n<li> \u0437\u0430\u043f\u0438\u0441\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u044f\u0434\u0440\u0430<\/li>\n<li> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0442\u043e\u0447\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430<\/li>\n<li> \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430<\/li>\n<\/ul>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c \u0431\u0430\u0439\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u043e\u0434\u044b \u043a\u043e\u043c\u0430\u043d\u0434 \u0438\u043c\u0435\u044e\u0442 \u043d\u043e\u043c\u0435\u0440\u0430 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li> 2 \u2014 \u0447\u0442\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438<\/li>\n<li> 3 \u2014 \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0430\u043c\u044f\u0442\u0438<\/li>\n<li> 4 \u2014 \u043e\u0441\u0442\u0430\u043d\u043e\u0432<\/li>\n<li> 5 \u2014 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435<\/li>\n<li> 6 \u2014 \u0447\u0442\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430<\/li>\n<li> 7 \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 breakpoint\u0430<\/li>\n<li> 8 \u2014 \u043e\u0447\u0438\u0441\u0442\u043a\u0430 breakpoint\u0430<\/li>\n<li> 9 \u2014 \u0448\u0430\u0433 (\u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c)<\/li>\n<li> 10 \u2014 \u0437\u0430\u043f\u0438\u0441\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 (\u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e)<\/li>\n<\/ul>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u041e\u0442\u0432\u0435\u0442 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0442.\u043a. \u043c\u044b \u0438 \u0442\u0430\u043a \u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f BusFault \u043f\u0440\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438, <a href=\"https:\/\/habr.com\/ru\/post\/437256\/\">\u043d\u0443\u0436\u043d\u043e \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 M3 \u0438 \u0432\u044b\u0448\u0435, \u043b\u0438\u0431\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a HardFault \u0434\u043b\u044f M0.<\/a><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 memcpy<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">int memcpySafe(uint8_t* to,uint8_t* from, int len) {     \/* Cortex-M3, Cortex-M4, Cortex-M4F, Cortex-M7 are supported *\/     static const uint32_t BFARVALID_MASK = (0x80 &lt;&lt; SCB_CFSR_BUSFAULTSR_Pos);     int cnt = 0;      \/* Clear BFARVALID flag by writing 1 to it *\/     SCB-&gt;CFSR |= BFARVALID_MASK;      \/* Ignore BusFault by enabling BFHFNMIGN and disabling interrupts *\/     uint32_t mask = __get_FAULTMASK();     __disable_fault_irq();     SCB-&gt;CCR |= SCB_CCR_BFHFNMIGN_Msk;      while ((cnt&lt;len))     {       *(to++) = *(from++);       cnt++;     }      \/* Reenable BusFault by clearing  BFHFNMIGN *\/     SCB-&gt;CCR &amp;= ~SCB_CCR_BFHFNMIGN_Msk;     __set_FAULTMASK(mask);      return cnt; }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 breakpoint\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0438\u0441\u043a \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 FP_COMP.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0449\u0438\u0439 breakpoint\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\t   dbg-&gt;pos = 0; \/\/ \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043a\u043e\u043b-\u0432\u043e \u0431\u0430\u0439\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 0     addr = ((*(uint32_t*)(&amp;dbg-&gt;buf[1])))|1; \/\/ \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 FP_COMP     for (tmp = 0;tmp&lt;8;tmp++) \/\/ \u0438\u0449\u0435\u043c \u043d\u0435 \u0431\u044b\u043b \u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d breakpoint \u0443\u0436\u0435       if (FP-&gt;FP_COMP[tmp] == addr)         break;          if (tmp!=8) \/\/ \u0435\u0441\u043b\u0438 \u0431\u044b\u043b, \u0432\u044b\u0445\u043e\u0434\u0438\u043c       break;          for (tmp=0;tmp&lt;NUMOFBKPTS;tmp++) \/\/ \u0438\u0449\u0435\u043c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440       if (FP-&gt;FP_COMP[tmp]==0) \/\/ \u043d\u0430\u0448\u043b\u0438?       {         FP-&gt;FP_COMP[tmp] = addr; \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c         break; \/\/ \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c       }     break;<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0438\u0441\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430. \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 breakpoint \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 PC. \u041f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f UART, \u044f\u0434\u0440\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 DebugMon_Handler.<\/p>\n<p>  \u0421\u0430\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a DebugMon \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<ul>\n<li>1. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u043b\u0430\u0433 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/li>\n<li>2. \u041e\u0447\u0438\u0449\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430.<\/li>\n<li>3. \u041e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 uart (\u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u0443\u0441\u043f\u0435\u043b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f)<\/li>\n<li>4. \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 Interrupt<\/li>\n<li>5. \u0412 \u0446\u0438\u043a\u043b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u0432 \u043f\u0440\u0438\u0435\u043c\u0430 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0444\u043b\u0430\u0433 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 DebugMon<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void DebugMon_Handler(void) {   dbgG-&gt;StopProgramm = 1; \/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0444\u043b\u0430\u0433 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438      for (int i=0;i&lt;NUMOFBKPTS;i++) \/\/ \u043e\u0447\u0438\u0449\u0430\u0435\u043c breakpoint\u044b     FP-&gt;FP_COMP[i] = 0;      while (USART6-&gt;CR1 &amp; USART_CR1_TXEIE) \/\/ \u0436\u0434\u0435\u043c \u043f\u043e\u043a\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442     if ((USART6-&gt;ISR &amp; USART_ISR_TXE) != 0U)       txCb();       dbgG-&gt;tx_state = txSendS2; \/\/ \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 Interrupt \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438   dbgG-&gt;tx = 1;   SET_BIT(USART6-&gt;CR1, USART_CR1_TXEIE);    while (dbgG-&gt;StopProgramm) \/\/ \u043f\u043e\u043a\u0430 \u0444\u043b\u0430\u0433 \u043d\u0435 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f   {   \t\/\/ \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b UART\u0430 \u0432 \u0446\u0438\u043a\u043b\u0435     if (((USART6-&gt;ISR &amp; USART_ISR_RXNE) != 0U)         &amp;&amp; ((USART6-&gt;CR1 &amp; USART_CR1_RXNEIE) != 0U))       rxCb(USART6-&gt;RDR);      if (((USART6-&gt;ISR &amp; USART_ISR_TXE) != 0U)         &amp;&amp; ((USART6-&gt;CR1 &amp; USART_CR1_TXEIE) != 0U))       txCb();    } }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0427\u0438\u0442\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u044f\u0434\u0440\u0430 \u0438\u0437 \u0421\u0418\u0448\u043d\u043e\u0433\u043e \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043d\u0430 ASM. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u043d\u0438 DebugMon_Handler, \u043d\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f UART, \u043d\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u0442\u0435\u043a. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u044f\u0434\u0440\u0430.<\/p>\n<h4>GDB server<\/h4>\n<p>  \u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0437\u0432\u0435\u043d\u0430 \u043c\u0435\u0436\u0434\u0443 IDE \u0438 \u043d\u0430\u0448\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c.<\/p>\n<p>  \u0421 \u043d\u0443\u043b\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u044b\u0439. \u0422\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0443 \u043c\u0435\u043d\u044f \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043d\u0430 .net, \u0432\u0437\u044f\u043b \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 <a href=\"https:\/\/github.com\/atsidaev\/z80gdbserver\">\u044d\u0442\u043e\u0442<\/a> \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043d\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 OpenOCD, \u043d\u043e \u044d\u0442\u043e \u0431\u044b \u0437\u0430\u043d\u044f\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. <\/p>\n<p>  \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0441 \u043a\u0430\u043a\u0438\u043c COM \u043f\u043e\u0440\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0434\u0430\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u043d\u0438\u0435 TCP \u043f\u043e\u0440\u0442 3333 \u0438 \u0436\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f GDB \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b GDB \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b.<\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0448\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043f\u043e UART.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xh\/fr\/gx\/xhfrgxceq7wpwoxewsbawr4nq8k.png\">  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u043c-\u0442\u043e \u0441\u0432\u0435\u0440\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u043c.<br \/>  \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432\u044b\u043b\u043e\u0436\u0438\u043b \u043d\u0430 GitHub \u0434\u043b\u044f \u0432\u0441\u0435\u043e\u0431\u0449\u0435\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f<\/p>\n<p>  <a href=\"https:\/\/github.com\/rus084\/CortexSoftwareDebug\">\u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c<\/a><br \/>  <a href=\"https:\/\/github.com\/rus084\/ARM-gdbserver-UART\">GDB \u0441\u0435\u0440\u0432\u0435\u0440<\/a><\/div>\n<p> \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\/ru\/post\/489540\/\"> https:\/\/habr.com\/ru\/post\/489540\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/489540\/\">\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/488672\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 DebugMon \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0441 \u043d\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435. <\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 \u043f\u043e UART.  <\/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-299112","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299112","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=299112"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299112\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}