{"id":361335,"date":"2024-05-21T01:11:35","date_gmt":"2024-05-21T01:11:35","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=361335"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=361335","title":{"rendered":"<span>\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u0434 Embox \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043b\u0430\u0442\u0443 STM32<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432 Embox \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443. \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 ModBus \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043b\u0430\u0442\u0443 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 STM32 NUCLEO-F2207ZG.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e ModBus \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0432\u0430\u0436\u043d\u044b \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u201c\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u0445\u043e\u0434\u0430 \u043d\u0430 \u0440\u044b\u043d\u043e\u043a\u201d (time-to-market), \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u041f\u041e \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043d\u043e\u0432\u043e\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435, \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0448\u0435\u0432\u043e\u0439, \u043c\u0435\u043d\u0435\u0435 \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0449\u0435\u0439 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/46b\/6c0\/832\/46b6c083274ee8bb1dff60516c808b79.jpg\" width=\"1055\" height=\"589\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/46b\/6c0\/832\/46b6c083274ee8bb1dff60516c808b79.jpg\" data-blurred=\"true\"\/><\/figure>\n<hr\/>\n<h2>\u041f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043b\u0430\u0442\u0443<\/h2>\n<p>\u0418\u0442\u0430\u043a \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 NUCLEO-F207ZG, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 Embox. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u044b \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u043f\u043b\u0430\u0442\u044b \u0441\u0435\u0440\u0438\u0438 F2.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 STM32Cube \u0434\u043b\u044f \u0441\u0435\u0440\u0438\u0438 F2, \u0435\u0433\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u043a\u0430\u043a <a href=\"https:\/\/habr.com\/ru\/companies\/embox\/articles\/328866\/\" rel=\"noopener noreferrer nofollow\">\u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 STM32 \u043f\u043b\u0430\u0442\u044b. \u0412 \u043a\u043e\u0434\u0435 \u043e\u043d\u0430 \u0432\u0438\u0434\u043d\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c <a href=\"https:\/\/github.com\/embox\/embox\/pull\/2914\" rel=\"noopener noreferrer nofollow\">Pull Request<\/a> \u043d\u0430 github.<\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0448\u0430\u0433\u0430\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 STM32Cube<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0430 (\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438)<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 <\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432<\/p>\n<ol>\n<li>\n<p>UART<\/p>\n<\/li>\n<li>\n<p>GPIO<\/p>\n<\/li>\n<li>\n<p>I2C<\/p>\n<\/li>\n<li>\n<p>SPI<\/p>\n<\/li>\n<li>\n<p>FLASH (In-chip)<\/p>\n<\/li>\n<li>\n<p>Ethernet<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0430 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 STM32Cube<\/h3>\n<p>\u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0432 Embox \u0434\u043b\u044f STM32 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 STM32Cube \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 SMT32Cube \u0434\u043b\u044f \u0441\u0435\u0440\u0438\u0438 F2.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0430\u043f\u043a\u0435 third-party\/bsp\/stm32f2cube<\/p>\n<p>\u0422\u0430\u043c \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p><strong>.\/Mybuild<\/strong> &#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0435\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043b\u0430\u0442.<\/p>\n<pre><code>package third_party.bsp.stmf2cube  abstract module stm32f2_conf { }<\/code><\/pre>\n<p><strong>.\/cube\/stm32cube_hal.h<\/strong> &#8212; \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u0445 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442\u044c \u043e\u0442 \u0441\u0435\u0440\u0438\u0438 Cube.<\/p>\n<pre><code class=\"cpp\">#ifndef THIRD_PARTY_BSP_STMF2CUBE_CUBE_STM32CUBE_HAL_H_ #define THIRD_PARTY_BSP_STMF2CUBE_CUBE_STM32CUBE_HAL_H_  #include \"stm32f2xx_hal.h\"  #endif \/* THIRD_PARTY_BSP_STMF2CUBE_CUBE_STM32CUBE_HAL_H_ *\/ <\/code><\/pre>\n<p><strong>.\/cube\/Makefile<\/strong> &#8212; makefile \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u043a\u0442\u043e\u0432.<\/p>\n<pre><code class=\"cmake\">PKG_NAME := stm32cubef2 PKG_VER := v1.9.4  PKG_SOURCES := https:\/\/www.github.com\/STMicroelectronics\/STM32CubeF2\/archive\/$(PKG_VER).zip  PKG_MD5 := 741de186164780de6e15314b79a72f9e  include $(EXTBLD_LIB) <\/code><\/pre>\n<p><strong>.\/cube\/Mybuild<\/strong> \u043e\u043f\u0438\u0441\u0430\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u043b\u044f Embox.<\/p>\n<p>\u043c\u043e\u0434\u0443\u043b\u044c <strong>cpp_flags<\/strong> \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u043e\u0432 \u0438 \u043f\u0443\u0442\u0435\u0439, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0 \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e Cube.<\/p>\n<pre><code class=\"java\">package third_party.bsp.stmf2cube  @BuildArtifactPath(cppflags=\"-DUSE_HAL_DRIVER -DSTM32F2_CUBE\") @BuildArtifactPath(cppflags=\"$(addprefix -I$(EXTERNAL_BUILD_DIR)\/third_party\/bsp\/stmf2cube\/cube\/STM32CubeF2-1.9.4\/, Drivers\/STM32F2xx_HAL_Driver\/Inc Drivers\/CMSIS\/Device\/ST\/STM32F2xx\/Include Drivers\/CMSIS\/Include)\") module cube_cppflags { }<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c <strong>cube<\/strong><\/p>\n<pre><code class=\"java\">@Build(stage=1,script=\"$(EXTERNAL_MAKE) download extract patch\") @BuildDepends(cube_cppflags) @BuildDepends(third_party.bsp.stmf2cube.stm32f2_conf) static module cube {     option number eth_rx_packet_count = 4     option number eth_tx_packet_count = 2      @IncludeExport(path=\"bsp\")     source \"stm32cube_hal.h\"     @AddPrefix(\"^BUILD\/extbld\/^MOD_PATH\/STM32CubeF2-1.9.4\/Drivers\/STM32F2xx_HAL_Driver\/Src\")     source     \"stm32f2xx_hal.c\",     \"stm32f2xx_hal_cortex.c\",     \"stm32f2xx_hal_adc.c\", \u2026      @NoRuntime depends third_party.bsp.stmf2cube.stm32f2_conf     @NoRuntime depends cube_cppflags } <\/code><\/pre>\n<p>\u0412 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code>@Build<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0448\u0430\u0433\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 (\u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u0430 Embox, \u0438 \u0432\u0442\u043e\u0440\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442\u044b, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u043e\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0445). \u0410 \u0442\u0430\u043a\u0436\u0435 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d Makefile \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@BuildDepends<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 <strong>cube_cppflags<\/strong>.<\/p>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@IncludePath<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u0448 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 \u043e\u0442 \u0441\u0435\u0440\u0438\u0438 cube \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 bsp, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0432\u0441\u0435\u043c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435.<\/p>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@AddPrefix<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430 \u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0435 source.<\/p>\n<h3>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u043b\u0430\u0442\u044b<\/h3>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u044b \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0442\u043e\u0432\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b. \u041a\u043e\u0434, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 platform\/stm32\/f2\/nucleo_f207zg.<\/p>\n<p><strong>.\/stm32cube_compat.c<\/strong> &#8212; \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e HAL_GetTick(), \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b STM32Cube.<\/p>\n<pre><code class=\"cpp\">uint32_t HAL_GetTick(void) {     return clock_sys_ticks(); }<\/code><\/pre>\n<p>.\/arch.c &#8212; \u0444\u0430\u0439\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 arch \u0432 Embox &#8212; \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u044b \u0438\u0437 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e Cube, \u043d\u043e \u0432 \u043d\u0435\u0433\u043e \u0432\u043d\u0435\u0441\u0435\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0446\u0438\u0439 Mybuild.<\/p>\n<pre><code class=\"cpp\">\/* Definition of the Ethernet driver buffers size and count *\/    #define ETH_RX_BUF_SIZE               ETH_MAX_PACKET_SIZE \/* buffer size for receive           *\/ #define ETH_TX_BUF_SIZE               ETH_MAX_PACKET_SIZE \/* buffer size for transmit          *\/ #if defined(__EMBOX__) #include &lt;framework\/mod\/options.h> #include &lt;module\/third_party\/bsp\/stmf2cube\/cube.h>  #define ETH_RXBUFNB \\     OPTION_MODULE_GET(third_party__bsp__stmf2cube__cube, NUMBER, eth_rx_packet_count) #define ETH_TXBUFNB \\     OPTION_MODULE_GET(third_party__bsp__stmf2cube__cube, NUMBER, eth_tx_packet_count) #else  #define ETH_RXBUFNB                   5U   \/* 5 Rx buffers of size ETH_RX_BUF_SIZE  *\/ #define ETH_TXBUFNB                   5U   \/* 5 Tx buffers of size ETH_TX_BUF_SIZE  *\/ #endif \/*__EMBOX__*\/ <\/code><\/pre>\n<p><strong>.\/arch.c<\/strong> &#8212; \u0444\u0430\u0439\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 arch \u0432 Embox.<\/p>\n<pre><code class=\"cpp\">void arch_init(void) {     ipl_t ipl = ipl_save();      SystemInit();     HAL_Init();      SystemClock_Config();      ipl_restore(ipl); }  void arch_idle(void) {  }  void arch_shutdown(arch_shutdown_mode_t mode) {     switch (mode) {     case ARCH_SHUTDOWN_MODE_HALT:     case ARCH_SHUTDOWN_MODE_REBOOT:     case ARCH_SHUTDOWN_MODE_ABORT:     default:     HAL_NVIC_SystemReset();     break;     }      \/* NOTREACHED *\/     while(1) {      } } <\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043a\u043b\u043e\u043a\u043e\u0432 (SystemClock_Config) \u0431\u044b\u043b\u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 Cube.<\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 .\/Mybuild \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043c\u043e\u0434\u0443\u043b\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b.<\/p>\n<pre><code class=\"java\">package platform.stm32.f2.nucleo_f207zg  @Build(stage=1) @BuildArtifactPath(cppflags=\"-DSTM32F207xx -DUSE_STM32F2XX_NUCLEO_144\") static module nucleo_f207zg_conf extends third_party.bsp.stmf2cube.stm32f2_conf {     @IncludeExport(path=\"\")     source \"stm32f2xx_hal_conf.h\" } <\/code><\/pre>\n<p>\u043c\u043e\u0434\u0443\u043b\u044c <strong>nucleo_f207zg_conf<\/strong> \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f stm32f2_conf, \u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0441\u0430\u043c\u043e\u0433\u043e Cube. \u0412 \u043d\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0444\u043b\u0430\u0433\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f STM32Cube, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b stm32f2xx_hal_conf.h.<\/p>\n<pre><code class=\"java\">@BuildDepends(nucleo_f207zg_conf) @BuildDepends(third_party.bsp.stmf2cube.cube) module arch extends embox.arch.arch {     source \"arch.c\"     source \"stm32cube_compat.c\"      @AddPrefix(\"^BUILD\/extbld\/third_party\/bsp\/stmf2cube\/cube\/STM32CubeF2-1.9.4\/\")     source \"Projects\/NUCLEO-F207ZG\/Templates\/Src\/system_stm32f2xx.c\" } <\/code><\/pre>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c arch, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 Embox. \u0412 \u0435\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (arch_init(). arch_idle , arch_shutdown), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 arch.c. \u0422\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u0438\u0437 STM32Cube system_stm32f2xx.c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e SystemInit(). \u0418 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b stm32cube_compat.c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e HAL_GetTick() \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b STM32Cube.<\/p>\n<pre><code class=\"java\">@Build(stage=1) @BuildDepends(nucleo_f207zg_conf) @BuildDepends(third_party.bsp.stmf2cube.cube) @BuildArtifactPath(cppflags=\"-I$(EXTERNAL_BUILD_DIR)\/third_party\/bsp\/stmf2cube\/cube\/STM32CubeF2-1.9.4\/Drivers\/BSP\/STM32F2xx_Nucleo_144\") static module bsp extends third_party.bsp.st_bsp_api { \u2026     @NoRuntime depends third_party.bsp.stmf2cube.cube     @NoRuntime depends nucleo_f207zg_conf     @NoRuntime depends arch } <\/code><\/pre>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 BSP \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b, \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<h3>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u043b\u0430\u0442\u044b, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Embox, \u043f\u0440\u0430\u0432\u0434\u0430, \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0431\u0435\u0437 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0439\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 UART. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e gdb.<\/p>\n<p>\u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 Embox \u043d\u0443\u0436\u043d\u044b \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0442\u0440\u0438 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0430\u043f\u043a\u0435 templates\/arm\/minimal. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u044b.<\/p>\n<p>\u041d\u0430\u0448 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u044b platform\/stm32\/templates\/f2\/nucleo_f207zg.<\/p>\n<p><strong>.\/lds.conf<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u044b \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<pre><code>\/* region (origin, length) *\/ ROM (0x08000000, 1024K) RAM (0x20000000, 128K)  \/* section (region[, lma_region]) *\/ text   (ROM) rodata (ROM) data   (RAM, ROM) bss(RAM)<\/code><\/pre>\n<p><strong>.\/build.conf<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u0444\u043b\u0430\u0433\u043e\u0432 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<pre><code>TARGET = embox  PLATFORM = nucleo_f207zg  ARCH = arm  CROSS_COMPILE = arm-none-eabi-  CFLAGS += -O0 -g CFLAGS += -mthumb -mlittle-endian CFLAGS += -march=armv7-m -mtune=cortex-m3 CFLAGS += -ffreestanding <\/code><\/pre>\n<p><strong>.\/mods.conf<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435).<\/p>\n<pre><code>package genconfig  configuration conf {     include embox.arch.system(core_freq=120000000)     @Runlevel(0) include embox.arch.arm.cortexm3.bundle     include embox.arch.arm.armmlib.locore     include embox.arch.arm.libarch     include embox.arch.arm.vfork     include platform.stm32.f2.nucleo_f207zg.bsp      @Runlevel(1) include embox.driver.interrupt.cortexm_nvic     @Runlevel(1) include embox.driver.clock.cortexm_systick     include embox.kernel.time.jiffies(cs_name=\"cortexm_systick\")  \u2026 }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u0436\u0435 \u0437\u0430\u0434\u0430\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u043e\u0442\u0443, \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 BSP \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0430\u0439\u043c\u0435\u0440 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<h3>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432<\/h3>\n<p>\u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433 device tree (Linux \u0438\u043b\u0438 ZephyrOS). \u0414\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Linux, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u0424\u0430\u0439\u043b\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0443 \u043d\u0430\u0441 \u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 board_config.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b nucleo_f207zg.conf.h \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438.<\/p>\n<pre><code class=\"cpp\">#include &lt;gen_board_conf.h> #include &lt;stm32.h>  struct uart_conf uarts[] = {     [1] = {     .status = DISABLED,     .name = \"USART1\",     .dev = {     .irqs = {     VAL(\"\", 37),     },     .pins = {     PIN(\"TX\", PA, PIN_9, AF7),     PIN(\"RX\", PA, PIN_10, AF7),     },     .clocks = {     VAL(\"TX\",   CLK_GPIOA),     VAL(\"RX\",   CLK_GPIOA),     VAL(\"UART\", CLK_USART1),     }     },     .baudrate = 115200,     }, \u2026 }; \u2026 struct spi_conf spis[] = {     [1] = {     .status = DISABLED,     .name = \"SPI1\",     .dev = {     .pins = {     PIN(\"SCK\",  PA, PIN_5, AF5),     PIN(\"MISO\", PA, PIN_6, AF5),     PIN(\"MOSI\", PA, PIN_7, AF5),     PIN(\"CS\",   PD, PIN_14, NOAF),     },     .clocks = {     VAL(\"SCK\",  CLK_GPIOA),     VAL(\"MISO\", CLK_GPIOA),     VAL(\"MOSI\", CLK_GPIOA),     VAL(\"CS\",   CLK_GPIOD),     VAL(\"SPI\",  CLK_SPI1),     }     },     },  };  struct i2c_conf i2cs[] = {     [1] = {     .status = ENABLED,     .name = \"I2C1\",     .dev = {     .irqs = {     VAL(\"EVENT_IRQ\", 31),     VAL(\"ERROR_IRQ\", 32),     },     .pins = {     PIN(\"SCL\", GPIO_PORT_B, PIN_6, AF4),     PIN(\"SDA\", GPIO_PORT_B, PIN_9, AF4),     },     .clocks = {     VAL(\"SCL\", CLK_GPIOB),     VAL(\"SDA\", CLK_GPIOB),     VAL(\"I2C\", CLK_I2C1),     }     },     }, \u2026  };  EXPORT_CONFIG(UART(uarts), LED(leds), SPI(spis), I2C(i2cs)) <\/code><\/pre>\n<h3>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432<\/h3>\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0432 Embox \u0443\u0436\u0435 \u0431\u044b\u043b\u0438, \u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0434\u043b\u044f \u0441\u0435\u0440\u0438\u0438 F2.<\/p>\n<h4>UART<\/h4>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 .\/src\/drivers\/serial\/stm32cube_usart . \u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 board_config. \u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0435\u0440\u0438\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 \u0444\u0430\u0439\u043b Mybuild.<\/p>\n<pre><code class=\"java\">@BuildDepends(third_party.bsp.st_bsp_api) module stm_usart_f2 extends stm32_usart_ops {      @IncludeExport(path=\"drivers\/serial\", target_name=\"stm_usart.h\")     source \"stm32_usart_conf_f2.h\"      source \"stm_hal_msp.c\"     source \"stm_usart.c\"      depends embox.driver.serial.core      depends third_party.bsp.st_bsp_api } <\/code><\/pre>\n<p>\u041e\u043d \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e BSP \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 stm32_usart_ops. <\/p>\n<p><strong>.\/stm32_usart_conf_f2.h<\/strong><\/p>\n<pre><code class=\"cpp\">#include &lt;bsp\/stm32cube_hal.h>  #define STM32_USART_FLAGS(uart)   uart->SR #define STM32_USART_RXDATA(uart)  uart->DR #define STM32_USART_TXDATA(uart)  uart->DR  #define STM32_USART_CLEAR_ORE(uart) \\     do { \\     } while (0) <\/code><\/pre>\n<h4>GPIO<\/h4>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 .\/src\/drivers\/gpio\/stm32cube. \u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c \u043e\u0442 \u0441\u0435\u0440\u0438\u0438 (\u0435\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u0434\u043b\u044f \u0441\u0435\u0440\u0438\u0438 f1, \u0442\u0430\u043c \u043d\u0435\u0442 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f GPIO).<\/p>\n<h4>I2C<\/h4>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 .\/src\/drivers\/i2c\/adapters\/stm32cube_i2c \u0438 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0438\u0438.<\/p>\n<h4>SPI<\/h4>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 .\/src\/drivers\/spi\/stm32cube_spi \u0438 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0439 \u0441\u0435\u0440\u0438\u0438.<\/p>\n<h4>FLASH (In-chip)<\/h4>\n<p>\u041f\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u043b\u043e\u0447\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u043e\u043a\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 flash-\u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u044b \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u043e\u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u0438 \u0435\u0449\u0451 \u043a\u0430\u043a\u043e\u0439 \u0442\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/habr.com\/ru\/companies\/embox\/articles\/573244\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 .\/src\/drivers\/flash\/stm32cube_flash.<\/p>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438:<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0443 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430 in-chip flash.<\/p>\n<pre><code class=\"cpp\">#include &lt;framework\/mod\/options.h>  #define STM32_FLASH_FLASH_SIZE     OPTION_GET(NUMBER,flash_size) #define STM32_ADDR_FLASH_SECTOR_0  ((uint32_t)0x08000000) \/* First 4 sectors of STM32F4-Discovery flash are 16Kb *\/ #define STM32_FLASH_SECTOR_SIZE    (16 * 1024) \/* We use only first 4 16Kb sectors *\/ #define STM32_FLASH_SECTORS_COUNT  4  #define STM32_FLASH_WORD           (4)  #ifndef __ASSEMBLER__ #include &lt;stm32f2xx_hal.h> #include &lt;string.h>  static inline void stm32_fill_flash_erase_struct(     FLASH_EraseInitTypeDef *erase_struct,     unsigned int block) {     memset(erase_struct, 0, sizeof *erase_struct);     erase_struct->TypeErase = FLASH_TYPEERASE_SECTORS;     erase_struct->Sector= block;     erase_struct->NbSectors = 1; } #endif <\/code><\/pre>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438.<\/p>\n<pre><code class=\"java\">@BuildDepends(third_party.bsp.st_bsp_api) module stm32f2cube {     option number log_level = 1     option number flash_size=0xc000      source \"stm32_flash.c\"     source \"stm32_flash.lds.S\"      @IncludeExport(path=\"drivers\/block_dev\/flash\",target_name=\"stm32flash.h\")     source \"stm32f2flash.h\"      depends third_party.bsp.st_bsp_api     depends core } <\/code><\/pre>\n<h4>Ethernet<\/h4>\n<p>\u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 .\/src\/drivers\/net\/stm32cube.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u044b \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e HAL_MSP_Init \u0432 \u0444\u0439\u043b\u0435 stm32f2cube_eth_msp.c\u00a0 \u043a\u043e\u0440\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PHY.<\/p>\n<pre><code class=\"cpp\">void HAL_ETH_MspInit(ETH_HandleTypeDef *heth) {   GPIO_InitTypeDef GPIO_InitStructure;    \/* Enable GPIOs clocks *\/   __HAL_RCC_GPIOA_CLK_ENABLE();   __HAL_RCC_GPIOB_CLK_ENABLE();   __HAL_RCC_GPIOC_CLK_ENABLE();   __HAL_RCC_GPIOG_CLK_ENABLE();  \/* Ethernet pins configuration ************************************************\/   \/*     RMII_REF_CLK ----------------------> PA1     RMII_MDIO -------------------------> PA2     RMII_MDC --------------------------> PC1     RMII_MII_CRS_DV -------------------> PA7     RMII_MII_RXD0 ---------------------> PC4     RMII_MII_RXD1 ---------------------> PC5     RMII_MII_RXER ---------------------> PG2     RMII_MII_TX_EN --------------------> PG11     RMII_MII_TXD0 ---------------------> PG13     RMII_MII_TXD1 ---------------------> PB13   *\/    \/* Configure PA1, PA2 and PA7 *\/   GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;   GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;   GPIO_InitStructure.Pull = GPIO_NOPULL;   GPIO_InitStructure.Alternate = GPIO_AF11_ETH;   GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7;   HAL_GPIO_Init(GPIOA, &amp;GPIO_InitStructure);    \/* Configure PB13 *\/   GPIO_InitStructure.Pin = GPIO_PIN_13;   HAL_GPIO_Init(GPIOB, &amp;GPIO_InitStructure);    \/* Configure PC1, PC4 and PC5 *\/   GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;   HAL_GPIO_Init(GPIOC, &amp;GPIO_InitStructure);    \/* Configure PG2, PG11, PG13 and PG14 *\/   GPIO_InitStructure.Pin =  GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13;   HAL_GPIO_Init(GPIOG, &amp;GPIO_InitStructure);      \/* Enable ETHERNET clock  *\/   __HAL_RCC_ETH_CLK_ENABLE(); } <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b stm32f2cube_eth.h, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d PHY \u0430\u0434\u0440\u0435\u0441.<\/p>\n<pre><code class=\"cpp\">#include &lt;bsp\/stm32cube_hal.h>  #define PHY_ADDRESS   LAN8742A_PHY_ADDRESS<\/code><\/pre>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u0432 Mybuild.<\/p>\n<pre><code class=\"cpp\">@BuildDepends(third_party.bsp.st_bsp_api) module stm32f2cube_eth {     option number irq = 61      source \"stm32cube_eth.c\"     source \"stm32f2cube_eth_msp.c\"     @IncludeExport(path=\"drivers\/net\", target_name=\"stm32cube_eth.h\")     source \"stm32f2cube_eth.h\"      option number log_level=1 \u2026 } <\/code><\/pre>\n<h4>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0430<\/h4>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043c \u043d\u0430\u0448 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043d\u0430\u0448\u0435\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u0424\u0430\u0439\u043b board.conf.h.<\/p>\n<pre><code class=\"cpp\">#include &lt;nucleo_f207zg.conf.h>  CONFIG {     uarts[1].status = ENABLED;     uarts[2].status = DISABLED;     uarts[3].status = ENABLED;      spis[1].status = ENABLED; } <\/code><\/pre>\n<p>\u0412 \u0444\u0430\u0439\u043b mods.conf \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430\u0448\u0443 \u043f\u0435\u0440\u0435\u0444\u0435\u0440\u0438\u044e.<\/p>\n<pre><code>@Runlevel(1) include embox.driver.serial.stm_usart_f2     @Runlevel(1) include embox.driver.serial.stm_diag(baud_rate=115200, usartx=3)     @Runlevel(1) include embox.driver.diag(impl=\"embox__driver__serial__stm_diag\")     @Runlevel(1) include embox.driver.serial.stm_ttyS0(baud_rate=115200, usartx=3)      include embox.driver.gpio.stm32cube_gpio     @Runlevel(1) include embox.driver.input.button.stm32cube_button(pin_port=2, pin_num=13)      include embox.driver.spi.core     include embox.driver.spi.stm32cube_spi(log_level=0)     include embox.driver.spi.stm32cube_spi1(log_level=0)      include embox.driver.i2c.stm32cube_i2c     include embox.driver.i2c.stm32cube_i2c1      include embox.driver.flash.flash_cache_block     include embox.driver.flash.stm32f2cube     include embox.driver.flash.flash_fs      @Runlevel(2) include embox.driver.net.stm32f2cube_eth <\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<pre><code>    @Runlevel(3) include embox.init.system_start_service(log_level=3, tty_dev=\"ttyS0\")      include embox.cmd.sh.tish(     builtin_commands = \"exit logout service\"     )     include embox.cmd.service(services_count=2)     include embox.cmd.sys.version     include embox.cmd.help      include embox.cmd.fs.dd     include embox.cmd.fs.cat     include embox.cmd.fs.ls     include embox.cmd.fs.rm     include embox.cmd.fs.mount     include embox.cmd.fs.umount     include embox.cmd.fs.stat     include embox.cmd.fs.echo     include embox.cmd.fs.touch     include embox.cmd.fs.mkdir      include embox.cmd.net.ifconfig     include embox.cmd.net.route     include embox.cmd.net.ping     include embox.cmd.net.bootpc     include embox.cmd.net.telnetd     include embox.cmd.net.netmanager      include embox.cmd.testing.ticker     include embox.cmd.testing.block_dev_test     include embox.cmd.testing.input.input_test     include embox.cmd.testing.input.button_test      include embox.cmd.hardware.pin     include embox.cmd.hardware.spi     include embox.cmd.hw.lsblk     include embox.cmd.hw.input      include embox.cmd.i2c_tools.i2cdetect     include embox.cmd.i2c_tools.i2cdump     include embox.cmd.i2c_tools.i2cget     include embox.cmd.i2c_tools.i2cset      include embox.cmd.net.httpd <\/code><\/pre>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u0435\u0449\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0442\u0430\u043a\u0438\u043c\u0438 \u0432\u0435\u0449\u0430\u043c\u0438, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044f\u0434\u0440\u0430 (\u043c\u043d\u043e\u0433\u043e\u0437\u0430\u0434\u0430\u0447\u043d\u043e\u0441\u0442\u044c, \u0432\u0440\u0435\u043c\u044f \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435) \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0448\u0442\u0443\u043a\u0438. \u041d\u043e \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u043c \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>\u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 system_start_service, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0435\u0449\u0451 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442 \u0444\u0430\u0439\u043b system_start.inc\/ \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0442\u0430\u043a\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c.<\/p>\n<pre><code>\"mkdir -v \/conf\", \"mount -t DumbFS \/dev\/stm32flash0 \/conf\", \"conf_setup\", \"netmanager\", \"service httpd \/http_admin\", \"service telnetd\", \"tish\", <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c netmanager, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u0443\u044e \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0444\u0430\u0439\u043b network \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438. \u041f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 rootfs \u0432 \u043d\u0430\u0448\u0435\u043c \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0435 \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0442\u0443\u0434\u0430 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b.<\/p>\n<pre><code>iface eth0 inet static     address 192.168.2.128     netmask 255.255.255.0     gateway 192.168.2.1     hwaddress aa:bb:cc:dd:ee:02  #iface eth0 inet dhcp <\/code><\/pre>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0430<\/h4>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0448 \u0442\u0435\u043c\u043f\u043b\u0435\u0442\u0435\u0439\u0442 (make confload-platform\/stm32\/f2\/nucleo_f207zg &amp;&amp; make), \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0437 \u043d\u0430 \u043f\u043b\u0430\u0442\u0443 \u0438 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/50d\/57c\/54e\/50d57c54eb2ea0e61740f2ced1408a93.png\" width=\"946\" height=\"631\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/50d\/57c\/54e\/50d57c54eb2ea0e61740f2ced1408a93.png\"\/><\/figure>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0442\u0430\u0440\u0442\u0443\u044e\u0442 telnetd \u0438 httpd, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435.<\/p>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0442\u0435\u043b\u043d\u0435\u0442\u043e\u043c<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/60f\/a01\/08f\/60fa0108fef94fa595ffb619f11daa15.png\" width=\"946\" height=\"631\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/60f\/a01\/08f\/60fa0108fef94fa595ffb619f11daa15.png\"\/><\/figure>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2aa\/14e\/369\/2aa14e3691c1c68f48999cc53c475760.png\" width=\"1002\" height=\"690\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2aa\/14e\/369\/2aa14e3691c1c68f48999cc53c475760.png\"\/><\/figure>\n<p>\u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u0440\u0438\u0447\u0451\u043c \u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0443 \u043c\u0435\u043d\u044f \u0437\u0430\u043d\u044f\u043b \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0432\u0443\u0445 \u0434\u043d\u0435\u0439. \u0414\u0430, \u0447\u0430\u0441\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0443 \u043d\u0430\u0441 \u0435\u0449\u0451 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u044d\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \ud83d\ude42<\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u043d\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0435<\/h2>\n<p>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u043f\u0440\u043e\u0435\u043a\u0442 \u0443 \u043d\u0430\u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0438 \u043d\u0430\u0439\u0442\u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430 <a href=\"https:\/\/github.com\/embox\/embox_project_modbus_iocontrol\" rel=\"noopener noreferrer nofollow\">github \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a> .<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u043b\u0430\u0442\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043d\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0435, \u0443\u043a\u0430\u0437\u0430\u0432, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 mods.conf.<\/p>\n<pre><code>include iocontrol.modbus.lib.libleddrv(leds_quantity=2)<\/code><\/pre>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 diff, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0432\u043d\u0451\u0441, \u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c<\/p>\n<pre><code>diff stm32f4_discovery_demo\/mods.conf nucleo_f207zg_demo\/mods.conf 4c4 &lt;     include embox.arch.system(core_freq=144000000) --- >     include embox.arch.system(core_freq=120000000) 6c6 &lt;     include platform.stm32.f4.stm32f4_discovery.bsp --- >     include platform.stm32.f2.nucleo_f207zg.bsp 13,14c13,14 &lt;     @Runlevel(0) include embox.arch.arm.fpu.cortex_m4_fp &lt;     @Runlevel(0) include embox.arch.arm.fpu.fpv5(log_level=3) --- >     \/\/@Runlevel(0) include embox.arch.arm.fpu.cortex_m4_fp >     \/\/@Runlevel(0) include embox.arch.arm.fpu.fpv5(log_level=3) 20,21c20,21 &lt;     @Runlevel(1) include embox.driver.serial.stm_usart_f4 &lt;     @Runlevel(1) include embox.driver.serial.stm_diag(baud_rate=115200, usartx=6) --- >     @Runlevel(1) include embox.driver.serial.stm_usart_f2 >     @Runlevel(1) include embox.driver.serial.stm_diag(baud_rate=115200, usartx=3) 23,24c23 &lt;     @Runlevel(1) include embox.driver.serial.stm_ttyS1(baud_rate=57600, usartx=2) &lt;     @Runlevel(1) include embox.driver.serial.stm_ttyS0(baud_rate=115200, usartx=6) --- >     @Runlevel(1) include embox.driver.serial.stm_ttyS0(baud_rate=115200, usartx=3) 27c26 &lt;     @Runlevel(2) include embox.driver.flash.stm32f4cube --- >     @Runlevel(2) include embox.driver.flash.stm32f2cube 32c31 &lt;     @Runlevel(2) include embox.driver.net.stm32f4cube_eth --- >     @Runlevel(2) include embox.driver.net.stm32f2cube_eth 133c132 &lt;     include iocontrol.modbus.lib.libleddrv(leds_quantity=4) --- >     include iocontrol.modbus.lib.libleddrv(leds_quantity=2) <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0431\u0435\u0440\u0451\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043d\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0435. \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432\u0441\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u043e\u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0430\u044f, \u0447\u0442\u043e\u0431\u044b \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0435 \u043c\u043e\u0433\u043b\u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0443 \u0441\u0435\u0431\u044f.<\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u044b<\/h3>\n<ol>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u0430\u043a \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432 embox<br \/><strong><em>make ext_conf EXT_PROJECT_PATH=&lt;your projects path><\/em><\/strong><\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u044b<strong><em> <br \/>make confload-ext_project\/modbus\/nucleo_f207zg_demo<\/em><\/strong><\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u2018<strong>conf\/rootfs\/network<\/strong>\u2019<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c<br \/><strong><em>make<\/em><\/strong><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0448\u0438\u0432\u0430\u0435\u043c \u043f\u043b\u0430\u0442\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e openocd \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 wiki (<a href=\"https:\/\/github.com\/embox\/embox\/wiki\/NUCLEO-F207ZG\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/embox\/embox\/wiki\/NUCLEO-F207ZG<\/u><\/a><u>)<\/u><\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 modbus-\u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/h3>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u2018.\/modbus\/host_cmds\u2019 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b make<\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u043b\u0430\u0442\u0443, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432 ethernet-\u043a\u0430\u0431\u0435\u043b\u044c.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e modbus-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438.<\/p>\n<p><strong><em>.\/led-client -a 192.168.2.128 set 0<\/em><\/strong> # \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 (0) \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435.<\/p>\n<p><strong><em>.\/led-client -a 192.168.2.128 clr 0<\/em><\/strong> # \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0435\u0433\u043e.<\/p>\n<p>192.168.2.128 &#8212; \u0430\u0434\u0440\u0435\u0441 \u043f\u043b\u0430\u0442\u044b.<\/p>\n<p>\u0421\u0438\u043d\u0438\u0439 (1) \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u044b<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1f8\/42a\/f9a\/1f842af9af28269ef28268f343853d18.png\" width=\"990\" height=\"526\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f8\/42a\/f9a\/1f842af9af28269ef28268f343853d18.png\"\/><\/figure>\n<p>\u0418 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0438\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434. \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u043e flash-\u043f\u0430\u043c\u044f\u0442\u0438, \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b71\/8ca\/140\/b718ca1402aee7926500f5f4495be7db.png\" width=\"990\" height=\"526\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b71\/8ca\/140\/b718ca1402aee7926500f5f4495be7db.png\"\/><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0438\u0434\u0435\u043e<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/6564a19d2fbe8876a63a2dc3\" data-style=\"\" id=\"6564a19d2fbe8876a63a2dc3\" width=\"\"><\/div>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 <a href=\"https:\/\/habr.com\/ru\/companies\/embox\/articles\/538416\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>, \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0434 Embox \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e. \u0410, \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u043d\u0430 \u043d\u0435\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0443\u0434\u0430. \u042d\u0442\u043e \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u043e\u0434 Embox \u043e\u0447\u0435\u043d\u044c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 \u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 time-to-market.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><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\/ru\/articles\/776712\/\"> https:\/\/habr.com\/ru\/articles\/776712\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432 Embox \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443. \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 ModBus \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043b\u0430\u0442\u0443 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 STM32 NUCLEO-F2207ZG.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e ModBus \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u0432\u0430\u0436\u043d\u044b \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u201c\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u0445\u043e\u0434\u0430 \u043d\u0430 \u0440\u044b\u043d\u043e\u043a\u201d (time-to-market), \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u041f\u041e \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043d\u043e\u0432\u043e\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435, \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0448\u0435\u0432\u043e\u0439, \u043c\u0435\u043d\u0435\u0435 \u044d\u043d\u0435\u0440\u0433\u043e\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0449\u0435\u0439 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435.<\/p>\n<figure class=\"full-width\"><\/figure>\n<hr\/>\n<h2>\u041f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043b\u0430\u0442\u0443<\/h2>\n<p>\u0418\u0442\u0430\u043a \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 NUCLEO-F207ZG, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 Embox. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u044b \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u043f\u043b\u0430\u0442\u044b \u0441\u0435\u0440\u0438\u0438 F2.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 STM32Cube \u0434\u043b\u044f \u0441\u0435\u0440\u0438\u0438 F2, \u0435\u0433\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u043a\u0430\u043a <a href=\"https:\/\/habr.com\/ru\/companies\/embox\/articles\/328866\/\" rel=\"noopener noreferrer nofollow\">\u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 STM32 \u043f\u043b\u0430\u0442\u044b. \u0412 \u043a\u043e\u0434\u0435 \u043e\u043d\u0430 \u0432\u0438\u0434\u043d\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c <a href=\"https:\/\/github.com\/embox\/embox\/pull\/2914\" rel=\"noopener noreferrer nofollow\">Pull Request<\/a> \u043d\u0430 github.<\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0448\u0430\u0433\u0430\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 STM32Cube<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0430 (\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438)<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 <\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432<\/p>\n<ol>\n<li>\n<p>UART<\/p>\n<\/li>\n<li>\n<p>GPIO<\/p>\n<\/li>\n<li>\n<p>I2C<\/p>\n<\/li>\n<li>\n<p>SPI<\/p>\n<\/li>\n<li>\n<p>FLASH (In-chip)<\/p>\n<\/li>\n<li>\n<p>Ethernet<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0430 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 STM32Cube<\/h3>\n<p>\u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0432 Embox \u0434\u043b\u044f STM32 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 STM32Cube \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 SMT32Cube \u0434\u043b\u044f \u0441\u0435\u0440\u0438\u0438 F2.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0430\u043f\u043a\u0435 third-party\/bsp\/stm32f2cube<\/p>\n<p>\u0422\u0430\u043c \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p><strong>.\/Mybuild<\/strong> &#8212; \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0435\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043b\u0430\u0442.<\/p>\n<pre><code>package third_party.bsp.stmf2cube  abstract module stm32f2_conf { }<\/code><\/pre>\n<p><strong>.\/cube\/stm32cube_hal.h<\/strong> &#8212; \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u0445 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442\u044c \u043e\u0442 \u0441\u0435\u0440\u0438\u0438 Cube.<\/p>\n<pre><code class=\"cpp\">#ifndef THIRD_PARTY_BSP_STMF2CUBE_CUBE_STM32CUBE_HAL_H_ #define THIRD_PARTY_BSP_STMF2CUBE_CUBE_STM32CUBE_HAL_H_  #include \"stm32f2xx_hal.h\"  #endif \/* THIRD_PARTY_BSP_STMF2CUBE_CUBE_STM32CUBE_HAL_H_ *\/ <\/code><\/pre>\n<p><strong>.\/cube\/Makefile<\/strong> &#8212; makefile \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u043a\u0442\u043e\u0432.<\/p>\n<pre><code class=\"cmake\">PKG_NAME := stm32cubef2 PKG_VER := v1.9.4  PKG_SOURCES := https:\/\/www.github.com\/STMicroelectronics\/STM32CubeF2\/archive\/$(PKG_VER).zip  PKG_MD5 := 741de186164780de6e15314b79a72f9e  include $(EXTBLD_LIB) <\/code><\/pre>\n<p><strong>.\/cube\/Mybuild<\/strong> \u043e\u043f\u0438\u0441\u0430\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u043b\u044f Embox.<\/p>\n<p>\u043c\u043e\u0434\u0443\u043b\u044c <strong>cpp_flags<\/strong> \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u043e\u0432 \u0438 \u043f\u0443\u0442\u0435\u0439, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0 \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e Cube.<\/p>\n<pre><code class=\"java\">package third_party.bsp.stmf2cube  @BuildArtifactPath(cppflags=\"-DUSE_HAL_DRIVER -DSTM32F2_CUBE\") @BuildArtifactPath(cppflags=\"$(addprefix -I$(EXTERNAL_BUILD_DIR)\/third_party\/bsp\/stmf2cube\/cube\/STM32CubeF2-1.9.4\/, Drivers\/STM32F2xx_HAL_Driver\/Inc Drivers\/CMSIS\/Device\/ST\/STM32F2xx\/Include Drivers\/CMSIS\/Include)\") module cube_cppflags { }<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c <strong>cube<\/strong><\/p>\n<pre><code class=\"java\">@Build(stage=1,script=\"$(EXTERNAL_MAKE) download extract patch\") @BuildDepends(cube_cppflags) @BuildDepends(third_party.bsp.stmf2cube.stm32f2_conf) static module cube {     option number eth_rx_packet_count = 4     option number eth_tx_packet_count = 2      @IncludeExport(path=\"bsp\")     source \"stm32cube_hal.h\"     @AddPrefix(\"^BUILD\/extbld\/^MOD_PATH\/STM32CubeF2-1.9.4\/Drivers\/STM32F2xx_HAL_Driver\/Src\")     source     \"stm32f2xx_hal.c\",     \"stm32f2xx_hal_cortex.c\",     \"stm32f2xx_hal_adc.c\", \u2026      @NoRuntime depends third_party.bsp.stmf2cube.stm32f2_conf     @NoRuntime depends cube_cppflags } <\/code><\/pre>\n<p>\u0412 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code>@Build<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0448\u0430\u0433\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 (\u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u0430 Embox, \u0438 \u0432\u0442\u043e\u0440\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442\u044b, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u043e\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0445). \u0410 \u0442\u0430\u043a\u0436\u0435 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d Makefile \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@BuildDepends<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 <strong>cube_cppflags<\/strong>.<\/p>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@IncludePath<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u0448 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 \u043e\u0442 \u0441\u0435\u0440\u0438\u0438 cube \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 bsp, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0432\u0441\u0435\u043c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435.<\/p>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@AddPrefix<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430 \u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0435 source.<\/p>\n<h3>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u043b\u0430\u0442\u044b<\/h3>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u044b \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0442\u043e\u0432\u044b\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b. \u041a\u043e\u0434, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 platform\/stm32\/f2\/nucleo_f207zg.<\/p>\n<p><strong>.\/stm32cube_compat.c<\/strong> &#8212; \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e HAL_GetTick(), \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b STM32Cube.<\/p>\n<pre><code class=\"cpp\">uint32_t HAL_GetTick(void) {     return clock_sys_ticks(); }<\/code><\/pre>\n<p>.\/arch.c &#8212; \u0444\u0430\u0439\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 arch \u0432 Embox &#8212; \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u044b \u0438\u0437 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e Cube, \u043d\u043e \u0432 \u043d\u0435\u0433\u043e \u0432\u043d\u0435\u0441\u0435\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0446\u0438\u0439 Mybuild.<\/p>\n<pre><code class=\"cpp\">\/* Definition of the Ethernet driver buffers size and count *\/    #define ETH_RX_BUF_SIZE               ETH_MAX_PACKET_SIZE \/* buffer size for receive           *\/ #define ETH_TX_BUF_SIZE               ETH_MAX_PACKET_SIZE \/* buffer size for transmit          *\/ #if defined(__EMBOX__) #include &lt;framework\/mod\/options.h> #include &lt;module\/third_party\/bsp\/stmf2cube\/cube.h>  #define ETH_RXBUFNB \\     OPTION_MODULE_GET(third_party__bsp__stmf2cube__cube, NUMBER, eth_rx_packet_count) #define ETH_TXBUFNB \\     OPTION_MODULE_GET(third_party__bsp__stmf2cube__cube, NUMBER, eth_tx_packet_count) #else  #define ETH_RXBUFNB                   5U   \/* 5 Rx buffers of size ETH_RX_BUF_SIZE  *\/ #define ETH_TXBUFNB                   5U   \/* 5 Tx buffers of size ETH_TX_BUF_SIZE  *\/ #endif \/*__EMBOX__*\/ <\/code><\/pre>\n<p><strong>.\/arch.c<\/strong> &#8212; \u0444\u0430\u0439\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 arch \u0432 Embox.<\/p>\n<pre><code class=\"cpp\">void arch_init(void) {     ipl_t ipl = ipl_save();      SystemInit();     HAL_Init();      SystemClock_Config();      ipl_restore(ipl); }  void arch_idle(void) {  }  void arch_shutdown(arch_shutdown_mode_t mode) {     switch (mode) {     case ARCH_SHUTDOWN_MODE_HALT:     case ARCH_SHUTDOWN_MODE_REBOOT:     case ARCH_SHUTDOWN_MODE_ABORT:     default:     HAL_NVIC_SystemReset();     break;     }      \/* NOTREACHED *\/     while(1) {      } } <\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043a\u043b\u043e\u043a\u043e\u0432 (SystemClock_Config) \u0431\u044b\u043b\u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 Cube.<\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 .\/Mybuild \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043c\u043e\u0434\u0443\u043b\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b.<\/p>\n<pre><code class=\"java\">package platform.stm32.f2.nucleo_f207zg  @Build(stage=1) @BuildArtifactPath(cppflags=\"-DSTM32F207xx -DUSE_STM32F2XX_NUCLEO_144\") static module nucleo_f207zg_conf extends third_party.bsp.stmf2cube.stm32f2_conf {     @IncludeExport(path=\"\")     source \"stm32f2xx_hal_conf.h\" } <\/code><\/pre>\n<p>\u043c\u043e\u0434\u0443\u043b\u044c <strong>nucleo_f207zg_conf<\/strong> \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f stm32f2_conf, \u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0441\u0430\u043c\u043e\u0433\u043e Cube. \u0412 \u043d\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0444\u043b\u0430\u0433\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f STM32Cube, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b stm32f2xx_hal_conf.h.<\/p>\n<pre><code class=\"java\">@BuildDepends(nucleo_f207zg_conf) @BuildDepends(third_party.bsp.stmf2cube.cube) module arch extends embox.arch.arch {     source \"arch.c\"     source \"stm32cube_compat.c\"      @AddPrefix(\"^BUILD\/extbld\/third_party\/bsp\/stmf2cube\/cube\/STM32CubeF2-1.9.4\/\")     source \"Projects\/NUCLEO-F207ZG\/Templates\/Src\/system_stm32f2xx.c\" } <\/code><\/pre>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c arch, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 Embox. \u0412 \u0435\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (arch_init(). arch_idle , arch_shutdown), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 arch.c. \u0422\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u0438\u0437 STM32Cube system_stm32f2xx.c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e SystemInit(). \u0418 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b stm32cube_compat.c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e HAL_GetTick() \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b STM32Cube.<\/p>\n<pre><code class=\"java\">@Build(stage=1) @BuildDepends(nucleo_f207zg_conf) @BuildDepends(third_party.bsp.stmf2cube.cube) @BuildArtifactPath(cppflags=\"-I$(EXTERNAL_BUILD_DIR)\/third_party\/bsp\/stmf2cube\/cube\/STM32CubeF2-1.9.4\/Drivers\/BSP\/STM32F2xx_Nucleo_144\") static module bsp extends third_party.bsp.st_bsp_api { \u2026     @NoRuntime depends third_party.bsp.stmf2cube.cube     @NoRuntime depends nucleo_f207zg_conf     @NoRuntime depends arch } <\/code><\/pre>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 BSP \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b, \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<h3>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u043b\u0430\u0442\u044b, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Embox, \u043f\u0440\u0430\u0432\u0434\u0430, \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0431\u0435\u0437 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0439\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 UART. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e gdb.<\/p>\n<p>\u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 Embox \u043d\u0443\u0436\u043d\u044b \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0442\u0440\u0438 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0430\u043f\u043a\u0435 templates\/arm\/minimal. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u044b.<\/p>\n<p>\u041d\u0430\u0448 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u044b platform\/stm32\/templates\/f2\/nucleo_f207zg.<\/p>\n<p><strong>.\/lds.conf<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u044b \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<pre><code>\/* region (origin, length) *\/ ROM (0x08000000, 1024K) RAM (0x20000000, 128K)  \/* section (region[, lma_region]) *\/ text   (ROM) rodata (ROM) data   (RAM, ROM) bss(RAM)<\/code><\/pre>\n<p><strong>.\/build.conf<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u0444\u043b\u0430\u0433\u043e\u0432 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<pre><code>TARGET = embox  PLATFORM = nucleo_f207zg  ARCH = arm  CROSS_COMPILE = arm-none-eabi-  CFLAGS += -O0 -g CFLAGS += -mthumb -mlittle-endian CFLAGS += -march=armv7-m -mtune=cortex-m3 CFLAGS += -ffreestanding <\/code><\/pre>\n<p><strong>.\/mods.conf<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435).<\/p>\n<pre><code>package genconfig  configuration conf {     include embox.arch.system(core_freq=120000000)     @Runlevel(0) include embox.arch.arm.cortexm3.bundle     include embox.arch.arm.armmlib.locore     include embox.arch.arm.libarch     include embox.arch.arm.vfork     include platform.stm32.f2.nucleo_f207zg.bsp      @Runlevel(1) include embox.driver.interrupt.cortexm_nvic     @Runlevel(1) include embox.driver.clock.cortexm_systick     include embox.kernel.time.jiffies(cs_name=\"cortexm_systick\")  \u2026 }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u0436\u0435 \u0437\u0430\u0434\u0430\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u043e\u0442\u0443, \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 BSP \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0430\u0439\u043c\u0435\u0440 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<h3>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432<\/h3>\n<p>\u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433 device tree (Linux \u0438\u043b\u0438 ZephyrOS). \u0414\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Linux, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u0424\u0430\u0439\u043b\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0443 \u043d\u0430\u0441 \u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 board_config.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b nucleo_f207zg.conf.h \u0441 <\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-361335","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/361335","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=361335"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/361335\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=361335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=361335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=361335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}