{"id":357987,"date":"2024-05-21T00:02:20","date_gmt":"2024-05-21T00:02:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=357987"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=357987","title":{"rendered":"<span>\u0413\u043e\u0442\u043e\u0432\u0438\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u041c\u041a \u0434\u043b\u044f \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438<\/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><em>*\u042d\u0442\u043e\u0442 tutorial \u0442\u0430\u043a \u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0438\u043c \u043e\u0447\u0435\u043d\u044c \u0432\u043e\u043b\u044c\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c <\/em><a href=\"https:\/\/ser-mk.github.io\/remcu\/tutorial-preparing-nrf51-sdk\/\" rel=\"noopener noreferrer nofollow\"><em>\u0441\u0442\u0430\u0442\u044c\u0438<\/em><\/a><em> \u0438\u0437 \u0431\u043b\u043e\u0433\u0430.<\/em><\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/768460\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043d\u0446\u0438\u043f, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 (UART, I2C, CAN bus etc) \u0432 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u041f\u041a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u0430 \u0432\u0445\u043e\u0434\u0438\u043b\u0430 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438 \u0432\u0438\u0441\u0435\u043b\u0430 \u043d\u0430 \u043e\u0431\u0448\u0435\u0439 \u0448\u0438\u043d\u0435 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e. \u0412 \u0442\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043e\u0440\u0438\u044f \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a\u043e\u0434\u0430 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 <a href=\"https:\/\/github.com\/remotemcu\/adin-llvm-pass\" rel=\"noopener noreferrer nofollow\"><em>ADIN<\/em><\/a><em> LLVM pass<\/em> \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0447\u0438\u043f <strong>nRF51422<\/strong> \u0438 <strong>nRF5 SDK <\/strong>\u043e\u0442 <a href=\"https:\/\/www.nordicsemi.com\/Products\/Development-software\/nrf5-sdk\" rel=\"noopener noreferrer nofollow\">Nordicsemi<\/a>. C\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0430\u0435\u043c <a href=\"https:\/\/www.nordicsemi.com\/-\/media\/Software-and-other-downloads\/SDKs\/nRF5\/Binaries\/nRF5SDK1230.zip\" rel=\"noopener noreferrer nofollow\">SDK<\/a> \u0434\u043b\u044f nRF51422, \u0440\u0430\u0441\u043f\u0430\u043a\u0443\u0435\u043c, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c:<\/p>\n<pre><code class=\"bash\">tree -d -L 2 nRF5_SDK_12.3.0_d7731ad\/ nRF5_SDK_12.3.0_d7731ad\/ \u251c\u2500\u2500 components \u2502\u00a0\u00a0 \u251c\u2500\u2500 ant \u2502\u00a0\u00a0 \u251c\u2500\u2500 ble \u2502\u00a0\u00a0 \u251c\u2500\u2500 boards \u2502\u00a0\u00a0 \u251c\u2500\u2500 device \u2502\u00a0\u00a0 \u251c\u2500\u2500 drivers_ext \u2502\u00a0\u00a0 \u251c\u2500\u2500 drivers_nrf \u2502\u00a0\u00a0 \u251c\u2500\u2500 libraries \u2502\u00a0\u00a0 \u251c\u2500\u2500 nfc \u2502\u00a0\u00a0 \u251c\u2500\u2500 proprietary_rf \u2502\u00a0\u00a0 \u251c\u2500\u2500 serialization \u2502\u00a0\u00a0 \u251c\u2500\u2500 softdevice \u2502\u00a0\u00a0 \u2514\u2500\u2500 toolchain \u251c\u2500\u2500 documentation \u251c\u2500\u2500 examples \u2502\u00a0\u00a0 \u251c\u2500\u2500 ant \u2502\u00a0\u00a0 \u251c\u2500\u2500 ble_central \u2502\u00a0\u00a0 \u251c\u2500\u2500 ble_central_and_peripheral \u2502\u00a0\u00a0 \u251c\u2500\u2500 ble_peripheral \u2502\u00a0\u00a0 \u251c\u2500\u2500 crypto \u2502\u00a0\u00a0 \u251c\u2500\u2500 dfu \u2502\u00a0\u00a0 \u251c\u2500\u2500 dtm \u2502\u00a0\u00a0 \u251c\u2500\u2500 multiprotocol \u2502\u00a0\u00a0 \u251c\u2500\u2500 nfc \u2502\u00a0\u00a0 \u251c\u2500\u2500 peripheral \u2502\u00a0\u00a0 \u2514\u2500\u2500 proprietary_rf \u251c\u2500\u2500 external \u2502\u00a0\u00a0 \u251c\u2500\u2500 cifra_AES128-EAX \u2502\u00a0\u00a0 \u251c\u2500\u2500 fatfs \u2502\u00a0\u00a0 \u251c\u2500\u2500 freertos \u2502\u00a0\u00a0 \u251c\u2500\u2500 micro-ecc \u2502\u00a0\u00a0 \u251c\u2500\u2500 nano-pb \u2502\u00a0\u00a0 \u251c\u2500\u2500 nfc_adafruit_library \u2502\u00a0\u00a0 \u251c\u2500\u2500 nrf_cc310 \u2502\u00a0\u00a0 \u251c\u2500\u2500 protothreads \u2502\u00a0\u00a0 \u251c\u2500\u2500 rtx \u2502\u00a0\u00a0 \u251c\u2500\u2500 segger_rtt \u2502\u00a0\u00a0 \u2514\u2500\u2500 tiny-AES128 \u2514\u2500\u2500 svd<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u0430 \u0432\u043e\u0442 \u043a\u043e\u0434 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441\u043e <em>BLE<\/em> \u0441\u0442\u0435\u043a\u043e\u043c, \u0440\u0430\u0434\u0438\u043e\u0447\u0430\u0441\u0442\u044c\u044e \u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0443\u0434\u0430\u043b\u0438\u043c, \u0434\u0430\u0431\u044b \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u0438\u0441\u044c. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code>tree  -L 2 nRF5_SDK_12.3.0_d7731ad\/ nRF5_SDK_12.3.0_d7731ad\/ \u251c\u2500\u2500 components \u2502\u00a0\u00a0 \u251c\u2500\u2500 boards \u2502\u00a0\u00a0 \u251c\u2500\u2500 device \u2502\u00a0\u00a0 \u251c\u2500\u2500 drivers_nrf \u2502\u00a0\u00a0 \u251c\u2500\u2500 libraries \u2502\u00a0\u00a0 \u251c\u2500\u2500 sdk_validation.h \u2502\u00a0\u00a0 \u2514\u2500\u2500 toolchain \u251c\u2500\u2500 examples \u2502\u00a0\u00a0 \u2514\u2500\u2500 peripheral \u2514\u2500\u2500 license.txt<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 <a href=\"https:\/\/github.com\/remotemcu\/adin-llvm-pass\" rel=\"noopener noreferrer nofollow\">ADIN<\/a> \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u044f\u0434\u043e\u043c \u043f\u0430\u043f\u043a\u0443 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/tree\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\" rel=\"noopener noreferrer nofollow\">NRF51422<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b. \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u0441 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/CMakeLists.txt\" rel=\"noopener noreferrer nofollow\">CMakeLists.txt.<\/a>  \u0417\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u041c\u041a, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u043e\u0442 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/stm32\/stm32f3\/STM32F3-Discovery_FW_V1.1.0\/CMakeLists.txt\" rel=\"noopener noreferrer nofollow\">STM32<\/a>. \u041f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u0435\u0440\u0432\u044b\u0445 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/CMakeLists.txt\" rel=\"noopener noreferrer nofollow\">CMakeLists.txt<\/a>:<\/p>\n<pre><code class=\"cpp\">set(MCU_TYPE nRF51422)  set(MCU_LIB_NAME SDK)  set(MCU_MAJOR_VERSION_LIB V12.3.0)  set(MCU_MINOR_VERSION_LIB 01)<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u0441\u043c\u0435\u0442\u0438\u043a\u0438, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e \u0447\u0438\u043f\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430:<\/p>\n<pre><code class=\"cmake\">set(MCU_SDK_PATH ${CMAKE_CURRENT_SOURCE_DIR}\/..)<\/code><\/pre>\n<p><code>MCU_SDK_PATH<\/code> &#8212; \u044d\u0442\u043e \u043f\u0443\u0442\u044c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c \u0441\u043a\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 <strong>nRF5 SDK<\/strong>. \u0412\u0430\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0431\u043e\u0440\u043a\u0435<\/p>\n<pre><code class=\"cmake\">include(${REMCU_VM_PATH}\/cmake\/mcu_build_target.cmake)  file(INSTALL \"${CMAKE_CURRENT_SOURCE_DIR}\/defines_${MCU_TYPE}.h\"        DESTINATION ${ALL_INCLUDE_DIR}       )  file(RENAME \"${ALL_INCLUDE_DIR}\/defines_${MCU_TYPE}.h\"             ${ALL_INCLUDE_DIR}\/device_defines.h       )<\/code><\/pre>\n<p>\u0421\u0442\u0440\u043e\u0447\u043a\u0438 \u0432\u044b\u0448\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c. \u0410 \u0432\u043e\u0442 \u044d\u0442\u0443 \u043d\u0438\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a python \u0444\u0430\u0439\u043b\u0430 \u0441 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0444-\u0446\u0438\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442:<\/p>\n<pre><code class=\"cmake\">file(INSTALL \"${CMAKE_CURRENT_SOURCE_DIR}\/${MCU_TYPE}_${MCU_LIB_NAME}.py\"       DESTINATION ${ALL_INCLUDE_DIR}       )<\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437 \u043d\u0430\u043f\u0438\u0448\u0443 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u044d\u043a\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444-\u0446\u0438\u0438\u0439 \u0438\u0437 SDK \u0432 \u043f\u0438\u0442\u043e\u043d \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/docs.python.org\/3\/library\/ctypes.html\" rel=\"noopener noreferrer nofollow\">ctypes<\/a>. \u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/remotemcu\/remcu_examples\/blob\/master\/stm32f4_discovery\/jupyter-notebook\/stm32f4_discovery_python.ipynb\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9e3\/e0b\/343\/9e3e0b3439bb04df80e5f5ba483569ae.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0432 Python \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e ctypes\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0432 Python \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e ctypes\" width=\"631\" height=\"552\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9e3\/e0b\/343\/9e3e0b3439bb04df80e5f5ba483569ae.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0432 Python \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e ctypes<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/conf.cpp\" rel=\"noopener noreferrer nofollow\"><strong>conf.cpp<\/strong><\/a>. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 ADIN \u0444-\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u0432. \u0428\u0430\u0431\u043b\u043e\u043d \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043e\u0442 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/stm32\/stm32f3\/STM32F3-Discovery_FW_V1.1.0\/conf.cpp\" rel=\"noopener noreferrer nofollow\">STM32<\/a>. \u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444-\u0446\u0438\u0438:<\/p>\n<p><code>add_to_mem_interval<\/code> &#8212; \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0434\u043b\u044f RAM, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043e\u043d \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0434\u043b\u044f STM32 \u0438 nRF51. \u0414\u043b\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f<br \/><code>add_to_adin_interval<\/code>  &#8212; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u0438 \u0442\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0441\u0445\u0435\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 nRF51 \u0438\u0437 datasheet \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5e4\/e3f\/5b6\/5e4e3f5b61f622c8fd6032408b45118d.png\" width=\"323\" height=\"613\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5e4\/e3f\/5b6\/5e4e3f5b61f622c8fd6032408b45118d.png\"\/><\/figure>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <code>AHB peripherals<\/code> \u0438 <code>APB peripherals<\/code><strong>,<\/strong> \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044f \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441 RF(ADC, \u0442\u0430\u0439\u043c\u0435\u0440\u044b, GPIO \u0438 \u0434\u0440.) <\/p>\n<pre><code class=\"cpp\">add_to_mem_interval(0x20000000, 0x20000000 + 8*1024); \/\/SRAM  8k add_to_adin_interval(0x40000000,  0x40008000); \/\/APB peripherals add_to_adin_interval(0x50000000,  0x50060000); \/\/AHB peripherals add_to_adin_interval(0xF0000FE0,  0xF0000FE8 + 4); \/\/PAN 26 \"System: Manual setup is required to enable the use of peripherals\"<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0444-\u0446\u0438\u0438 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/components\/toolchain\/system_nrf51.c#L62\" rel=\"noopener noreferrer nofollow\">SystemInit<\/a>. \u0422\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u044d\u0442\u0438\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/components\/toolchain\/system_nrf51.c#L62\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043a\u043e\u0434\u0443<\/a>. \u0424-\u0446\u0438\u044e <code>get_RAM_addr_for_test<\/code> \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"cpp\">uint32_t get_RAM_addr_for_test(){     return 0x20000000; }<\/code><\/pre>\n<p>\u041e\u043d\u0430 \u043e\u0442\u0434\u0430\u0435\u0442 \u0430\u0434\u0440\u0435\u0441, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0442\u0435\u0441\u0442\u044b \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e. \u0410\u0434\u0440\u0435\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 RAM \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430, \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438 \u0447\u0442\u043e \u0431\u044b \u0432 \u044d\u0442\u043e\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444-\u0446\u0438\u044e <code>remcu_debuggerTest<\/code> \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u043e\u043c (\u0442.\u0435. \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 <code>remcu_connect2OpenOCD<\/code> \/ <code>remcu_connect2GDB<\/code>)<\/p>\n<pre><code class=\"cpp\">\/**  * @brief remcu_debuggerTest  * Performs test of debugger and debug server while mcu is connected.  * @return If no error occurs, the function returns NULL  * else the function returns error message (char array)  * Don't free the pointer after use!  * Note:  Invoke the function after establishing a connection with the debugger  * through the successful utilization of either the  * remcu_connect2OpenOCD or remcu_connect2GDB functions.  *\/ REMCULIB_DLL_API const char* remcu_debuggerTest();<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u0434\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>defines_${MCU_TYPE}.h<\/code> \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f <code>defines_nRF51422.h<\/code>. \u0412 \u043d\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0421\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u0447\u0442\u043e \u0431\u044b \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u044d\u0442\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 SDK, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">#ifdef OPTION1 void foo(); #endif<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0431\u044b \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0444-\u0446\u0438\u044e <code>foo<\/code>, \u043d\u0430\u0434\u043e \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u043c\u0430\u043a\u0440\u043e\u0441 <code>OPTION1<br \/><\/code>\u041d\u0430\u0434\u043e \u043d\u0430\u0439\u0442\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f nRF5 SDK \u043f\u043e\u0434 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0447\u0438\u043f. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445. \u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/examples\/peripheral\/adc\/pca10028\/blank\/armgcc\/Makefile\" rel=\"noopener noreferrer nofollow\">Makefile<\/a> \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 <strong>ADC<\/strong>. \u0422\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u044b:<\/p>\n<pre><code class=\"cpp\">CFLAGS += -DNRF51 CFLAGS += -DNRF51422 CFLAGS += -DBOARD_PCA10028 CFLAGS += -DBSP_DEFINES_ONLY<\/code><\/pre>\n<p>\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0438\u0445 \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/defines_nRF51422.h\" rel=\"noopener noreferrer nofollow\">defines_nRF51422.h<\/a><\/p>\n<pre><code class=\"cpp\">#define REMCU_LIB  #define NRF51  #define NRF51422  #define BOARD_PCA10028  #define BSP_DEFINES_ONLY<\/code><\/pre>\n<p>\u0418\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/examples\/peripheral\/adc\/pca10028\/blank\/armgcc\/Makefile\" rel=\"noopener noreferrer nofollow\">Makefile<\/a> \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043f\u0443\u0442\u0435\u0439 \u0434\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<pre><code class=\"haskell\"># Source files common to all targets SRC_FILES += \\   $(SDK_ROOT)\/components\/libraries\/log\/src\/nrf_log_backend_serial.c \\   $(SDK_ROOT)\/components\/libraries\/log\/src\/nrf_log_frontend.c \\   $(SDK_ROOT)\/components\/libraries\/util\/app_error.c \\   $(SDK_ROOT)\/components\/libraries\/util\/app_error_weak.c \\   $(SDK_ROOT)\/components\/libraries\/util\/app_util_platform.c \\   $(SDK_ROOT)\/components\/libraries\/util\/nrf_assert.c \\   $(SDK_ROOT)\/components\/libraries\/util\/sdk_errors.c \\   $(SDK_ROOT)\/components\/boards\/boards.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal\/nrf_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc\/nrf_drv_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/common\/nrf_drv_common.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/uart\/nrf_drv_uart.c \\   $(PROJ_DIR)\/main.c \\   $(SDK_ROOT)\/external\/segger_rtt\/RTT_Syscalls_GCC.c \\   $(SDK_ROOT)\/external\/segger_rtt\/SEGGER_RTT.c \\   $(SDK_ROOT)\/external\/segger_rtt\/SEGGER_RTT_printf.c \\   $(SDK_ROOT)\/components\/toolchain\/gcc\/gcc_startup_nrf51.S \\   $(SDK_ROOT)\/components\/toolchain\/system_nrf51.c \\  # Include folders common to all targets INC_FOLDERS += \\   $(SDK_ROOT)\/components \\   $(SDK_ROOT)\/components\/libraries\/util \\   $(SDK_ROOT)\/components\/toolchain\/gcc \\   $(SDK_ROOT)\/components\/drivers_nrf\/uart \\   ..\/config \\   $(SDK_ROOT)\/components\/drivers_nrf\/common \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc \\   $(PROJ_DIR) \\   $(SDK_ROOT)\/external\/segger_rtt \\   $(SDK_ROOT)\/components\/libraries\/bsp \\   $(SDK_ROOT)\/components\/drivers_nrf\/nrf_soc_nosd \\   $(SDK_ROOT)\/components\/toolchain \\   $(SDK_ROOT)\/components\/device \\   $(SDK_ROOT)\/components\/libraries\/log \\   $(SDK_ROOT)\/components\/boards \\   $(SDK_ROOT)\/components\/drivers_nrf\/delay \\   $(SDK_ROOT)\/components\/toolchain\/cmsis\/include \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal \\   $(SDK_ROOT)\/components\/libraries\/log\/src \\<\/code><\/pre>\n<p>\u0423\u0431\u0435\u0440\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439, \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u043c\u0438 printf \u0438 \u0444\u0430\u0439\u043b\u044b \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430. \u0422\u0430\u043a \u0436\u0435 \u0443\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u0442\u0438 \u0434\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a:<\/p>\n<pre><code class=\"haskell\">SRC_FILES +=  \\   $(SDK_ROOT)\/components\/boards\/boards.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal\/nrf_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc\/nrf_drv_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/common\/nrf_drv_common.c \\   $(SDK_ROOT)\/components\/toolchain\/system_nrf51.c \\  INC_FOLDERS =  \\   $(SDK_ROOT)\/components\/libraries\/util \\   ..\/config \\   $(SDK_ROOT)\/components\/drivers_nrf\/common \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc \\   $(SDK_ROOT)\/components\/drivers_nrf\/nrf_soc_nosd \\   $(SDK_ROOT)\/components\/toolchain \\   $(SDK_ROOT)\/components\/device \\   $(SDK_ROOT)\/components\/libraries\/log \\   $(SDK_ROOT)\/components\/boards \\   $(SDK_ROOT)\/components\/toolchain\/cmsis\/include \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal \\   $(SDK_ROOT)\/components\/libraries\/log\/src \\<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/Makefile\" rel=\"noopener noreferrer nofollow\">Makefile<\/a> \u0434\u043b\u044f ADIN \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0435\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 <strong>nRF5 SDK<\/strong>, \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043e\u0442 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/stm32\/stm32f3\/STM32F3-Discovery_FW_V1.1.0\/Makefile\" rel=\"noopener noreferrer nofollow\">STM32<\/a>:<\/p>\n<pre><code class=\"haskell\">SDK_ROOT := $(MCU_SDK_PATH)  C_SRC +=  \\   $(SDK_ROOT)\/components\/boards\/boards.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal\/nrf_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc\/nrf_drv_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/common\/nrf_drv_common.c \\   $(SDK_ROOT)\/components\/toolchain\/system_nrf51.c \\  INC_PATH =  \\   $(SDK_ROOT)\/components\/libraries\/util \\   $(SDK_ROOT)\/examples\/peripheral\/adc\/pca10028\/blank\/config \\   $(SDK_ROOT)\/components\/drivers_nrf\/common \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc \\   $(SDK_ROOT)\/components\/drivers_nrf\/nrf_soc_nosd \\   $(SDK_ROOT)\/components\/toolchain \\   $(SDK_ROOT)\/components\/device \\   $(SDK_ROOT)\/components\/libraries\/log \\   $(SDK_ROOT)\/components\/boards \\   $(SDK_ROOT)\/components\/toolchain\/cmsis\/include \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal \\   $(SDK_ROOT)\/components\/libraries\/log\/src \\  # TOOLCHAIN OPTIONS #-------------------------------------------------------------------------------  DEFS += -DNRF51 -DNRF51422 -DBOARD_PCA10028 -DBSP_DEFINES_ONLY  include $(TARGET_MK)<\/code><\/pre>\n<p><code>C_SRC<\/code> \u0438 <code>INC_PATH<\/code> \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 \u0438 \u043f\u0443\u0442\u044f\u043c\u0438 \u0434\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 .cpp \u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0431\u0443\u0434\u0435\u0442 <code>CPP_SRC<\/code> . \u042d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 <code>include $(TARGET_MK)<\/code>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/github.com\/remotemcu\/remcu\/blob\/master\/mcu_utils\/common.mk\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>\u0412 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>DEFS<\/code> \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0443\u0436\u0435 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/defines_nRF51422.h\" rel=\"noopener noreferrer nofollow\">\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u043d\u0430\u043c \u043c\u0430\u043a\u0440\u043e\u0441\u044b<\/a>.<\/p>\n<p>\u0412 \u043d\u0430\u0448 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/Makefile\" rel=\"noopener noreferrer nofollow\">Makefile<\/a> \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>MCU_SDK_PATH<\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0432\u044b\u0448\u0435 \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/nordic\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/CMakeLists.txt#L11\" rel=\"noopener noreferrer nofollow\">CMakeLists.txt<\/a>, \u044d\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e \u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<pre><code class=\"cmake\">SDK_ROOT := $(MCU_SDK_PATH)<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u043a\u0430 \u0442\u043e \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u043c, \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Ubuntu \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks#docker-way\" rel=\"noopener noreferrer nofollow\">Docker \u043e\u0431\u0440\u0430\u0437<\/a> :<\/p>\n<pre><code class=\"bash\">docker pull sermkd\/remcu_builder<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 <strong>Windows OS<\/strong>, \u0442\u043e \u0441\u0440\u0435\u0434\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks#windows-os\" rel=\"noopener noreferrer nofollow\">\u043a\u0430\u043a \u0437\u0434\u0435\u0441\u044c<\/a>. \u0414\u043b\u044f <strong>MacOS<\/strong> \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/tree\/master#universal-easy-way-github-actions\" rel=\"noopener noreferrer nofollow\"><strong>GitHub Action<\/strong><\/a><strong>,<\/strong> \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u0435 \u0443\u0439\u043c\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0441\u0438\u043b!<\/p>\n<p><a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/tree\/8ee6eb05ed1e584f20f108caf19b08802de23458\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 nRF5 SDK \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435<\/a> \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b \u0432 \u043e\u0431\u0449\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0441 \u0443\u0436\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c\u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439, \u0441\u043a\u0430\u0447\u0430\u0435\u043c:<\/p>\n<pre><code class=\"bash\">git clone --recurse-submodules https:\/\/github.com\/remotemcu\/remcu-chip-sdks.git cd remcu-chip-sdks git checkout 8ee6eb05ed1e584f20f108caf19b08802de23458 <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c docker. \u0412 \u0434\u043e\u043a\u0435\u0440\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434 <strong>Linux<\/strong> \u0438 \u0435\u0441\u0442\u044c \u043a\u0440\u043e\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0434\u043b\u044f <em>Raspberry<\/em>.<\/p>\n<pre><code class=\"bash\">docker run -it --name remcu-build-docker -v $PWD\/remcu-chip-sdks:\/remcu-chip-sdks -w \/remcu-chip-sdks remcu_builder<\/code><\/pre>\n<p>\u0412 \u0434\u043e\u043a\u0435\u0440\u0435, \u0438\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/tree\/8ee6eb05ed1e584f20f108caf19b08802de23458\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\" rel=\"noopener noreferrer nofollow\">NRF51422<\/a> \u0438 \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u043e\u0431\u0440\u0430\u0442\u044c. \u0412 \u043e\u043f\u0446\u0438\u0438 <code>-DCMAKE_TOOLCHAIN_FILE<\/code><strong> <\/strong>\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c \u0434\u043e <strong>toolchain<\/strong> \u0444\u0430\u0439\u043b\u0430 \u043f\u043e\u0434 \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a <strong>toolchain <\/strong>\u0444\u0430\u0439\u043b\u043e\u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu\/tree\/master\/platform\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>. <\/p>\n<pre><code class=\"bash\">cd \/remcu-mcu-sdks\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422 mkdir build cd build cmake .. -DCMAKE_TOOLCHAIN_FILE=\/remcu-mcu-sdks\/REMCU\/platform\/linux_x64.cmake make<\/code><\/pre>\n<p>\u0418 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443<\/p>\n<pre><code class=\"erlang\">\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/..\/components\/libraries\/util\/app_error.h:128:8: error: unknown type name '__INLINE' static __INLINE void app_error_log(uint32_t id, uint32_t pc, uint32_t info)<\/code><\/pre>\n<p><code>type name '__INLINE\u2019<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/components\/device\/compiler_abstraction.h#L91\" rel=\"noopener noreferrer nofollow\">compiler_abstraction.h<\/a> , \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/components\/device\/nrf.h#L55\" rel=\"noopener noreferrer nofollow\">nrf.h<\/a>. Nordic \u043b\u044e\u0431\u0435\u0437\u043d\u043e \u0443\u0431\u0435\u0440\u0435\u0433\u0430\u0435\u0442 \u043d\u0430\u0441 \u043e\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434 PC host. \u0427\u0442\u043e \u0431\u044b \u043d\u0435 \u043b\u043e\u043c\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u0430 <code>REMCU_LIB<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/remotemcu\/remcu\/tree\/3dd1e01ae80a5fe05bdea68283a4fe849801c134\/cmake\" rel=\"noopener noreferrer nofollow\">\u0441\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432<\/a> REMCU. <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/commit\/787ebf08bd284dee9ac24136269b461031277def\" rel=\"noopener noreferrer nofollow\"><strong>\u041f\u0430\u0442\u0447<\/strong><\/a><\/p>\n<pre><code class=\"cpp\">#ifndef REMCU_LIB     #define NO_REMCU_LIB #endif \/\/REMCU_LIB  #if defined(_WIN32) &amp;&amp; defined(NO_REMCU_LIB)     \/* Do not include nrf specific files when building for PC host *\/ #elif defined(__unix) &amp;&amp; defined(NO_REMCU_LIB)     \/* Do not include nrf specific files when building for PC host *\/ #elif defined(__APPLE__) &amp;&amp; defined(NO_REMCU_LIB)     \/* Do not include nrf specific files when building for PC host *\/ #else      \/* Device selection for device includes. *\/     #if defined (NRF51)         #include \"nrf51.h\"         #include \"nrf51_bitfields.h\"         #include \"nrf51_deprecated.h\"     #elif defined (NRF52840_XXAA)         #include \"nrf52840.h\"         #include \"nrf52840_bitfields.h\"         #include \"nrf51_to_nrf52840.h\"         #include \"nrf52_to_nrf52840.h\"     #elif defined (NRF52832_XXAA)         #include \"nrf52.h\"         #include \"nrf52_bitfields.h\"         #include \"nrf51_to_nrf52.h\"         #include \"nrf52_name_change.h\"     #else         #error \"Device must be defined. See nrf.h.\"     #endif \/* NRF51, NRF52832_XXAA, NRF52840_XXAA *\/      #include \"compiler_abstraction.h\"  #endif \/* _WIN32 || __unix || __APPLE__ *\/<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043d\u043e\u0432\u0430 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u0430(<a href=\"https:\/\/github.com\/remotemcu\/prebuilt_libraries\/blob\/master\/NordSemi\/nRF51422-SDK-V12.3.0-01\/Linux_x64\/libremcu.so\" rel=\"noopener noreferrer nofollow\">libremcu.so<\/a>). \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b  <strong>nRF5 SDK<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439. \u0411\u0435\u0440\u0435\u043c \u043d\u0430\u043c \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u0442\u0435\u0439:<\/p>\n<pre><code class=\"cmake\">  $(SDK_ROOT)\/components\/libraries\/util \\   $(SDK_ROOT)\/examples\/peripheral\/adc\/pca10028\/blank\/config \\   $(SDK_ROOT)\/components\/drivers_nrf\/common \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc \\   $(SDK_ROOT)\/components\/drivers_nrf\/nrf_soc_nosd \\   $(SDK_ROOT)\/components\/toolchain \\   $(SDK_ROOT)\/components\/device \\   $(SDK_ROOT)\/components\/libraries\/log \\   $(SDK_ROOT)\/components\/boards \\   $(SDK_ROOT)\/components\/toolchain\/cmsis\/include \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal \\   $(SDK_ROOT)\/components\/libraries\/log\/src \\<\/code><\/pre>\n<p>\u0418 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/CMakeLists.txt#L25\" rel=\"noopener noreferrer nofollow\">CMakeLists.txt<\/a><\/p>\n<pre><code class=\"cmake\">file(INSTALL        \"${MCU_SDK_PATH}\/components\/libraries\/util\/\"       \"${MCU_SDK_PATH}\/components\/drivers_nrf\/common\/\"       \"${MCU_SDK_PATH}\/components\/drivers_nrf\/adc\/\"       \"${MCU_SDK_PATH}\/components\/drivers_nrf\/nrf_soc_nosd\/\"       \"${MCU_SDK_PATH}\/components\/toolchain\/\"       \"${MCU_SDK_PATH}\/components\/device\/\"       \"${MCU_SDK_PATH}\/components\/libraries\/log\/\"       \"${MCU_SDK_PATH}\/components\/boards\/\"       \"${MCU_SDK_PATH}\/components\/toolchain\/cmsis\/include\/\"       \"${MCU_SDK_PATH}\/components\/drivers_nrf\/hal\/\"       \"${MCU_SDK_PATH}\/components\/libraries\/log\/src\/\"       \"${MCU_SDK_PATH}\/examples\/peripheral\/adc\/pca10028\/blank\/config\/\"       DESTINATION ${ALL_INCLUDE_DIR}       FILES_MATCHING PATTERN \"*.h\"       )<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435(*.h) \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0443\u0442\u0435\u0439 \u0431\u0443\u0434\u0443\u0442 \u0432 <a href=\"https:\/\/github.com\/remotemcu\/prebuilt_libraries\/tree\/master\/NordSemi\/nRF51422-SDK-V12.3.0-01\/Linux_x64\/remcu_include\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u043f\u043a\u0435<\/a> <code>remcu_include<\/code> \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0435\u0441\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u043d\u0435 \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0441\u0442\u0430. \u0410 \u0437\u0430\u043e\u0434\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 ADC. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432 \u043d\u0430\u0448 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/CMakeLists.txt#L42\" rel=\"noopener noreferrer nofollow\">CMakeLists.txt<\/a><\/p>\n<pre><code class=\"cmake\">add_subdirectory(test)<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/tree\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/test\" rel=\"noopener noreferrer nofollow\"><strong>test<\/strong><\/a>, \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0442\u0430\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/test\/CMakeLists.txt\" rel=\"noopener noreferrer nofollow\">CMakeLists.txt<\/a>  \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0442\u0435\u0441\u0442\u0430 \u0438 \u0441\u0430\u043c <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/nordic\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/test\/main.c\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442<\/a>(<a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/nordic\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/test\/main.c\" rel=\"noopener noreferrer nofollow\">main.c<\/a>). \u041a\u043e\u0434 \u044f \u0432\u0437\u044f\u043b \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043b\u044f <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/examples\/peripheral\/adc\/main.c\" rel=\"noopener noreferrer nofollow\">ADC<\/a>. \u0423\u0431\u0440\u0430\u043b \u043e\u0442 \u0442\u0443\u0434\u0430 \u043b\u0438\u0448\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438, \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 <code>printf<\/code> , \u0430 \u0442\u0430\u043a \u0436\u0435 \u0443\u0431\u0440\u0430\u043b \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b. \u0417\u0430\u043c\u0435\u043d\u0438\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 polling(\u043e\u043f\u0440\u043e\u0441). \u041f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u043c \u044f\u0434\u0440\u0435 \u041c\u041a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 <strong>build<\/strong> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c <code>cmake<\/code> \u0438 <code>make<\/code>, \u0432\u0441\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<pre><code class=\"bash\">\/remcu-mcu-sdks\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/build# rm -rf * \/remcu-mcu-sdks\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/build# cmake .. -DCMAKE_TOOLCHAIN_FILE=\/build\/AddressInterceptorLib\/platform\/linux_x64.cmake &amp;&amp; make \/remcu-mcu-sdks\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/build# ls CMakeCache.txt  CMakeFiles  IrTest  Makefile  README.txt  REMCU_LICENSE.txt  build_remcu_object  cmake_install.cmake  libremcu.so  nRF51422-SDK-V12.3.0-01  remcu_include  test<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/nordic\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/test\/main.c\" rel=\"noopener noreferrer nofollow\">main.c<\/a> \u0444\u0430\u0439\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u041e\u043d \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0430\u0440\u0441\u0438\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443(\u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0432\u0435\u0440\u0430 \u0438 \u043f\u043e\u0440\u0442) \u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u0440\u0442\u0430, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/test\/main.c#L113\" rel=\"noopener noreferrer nofollow\">OpenOCD<\/a>(\u043f\u043e\u0440\u0442 6666) \u0438\u043b\u0438 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/test\/main.c#L115\" rel=\"noopener noreferrer nofollow\">GDB<\/a> \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u0434\u0430\u043b\u044c\u0448\u0435 \u0447\u0438\u043f \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/test\/main.c#L118\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u0436\u0438\u043c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f<\/a>, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043b\u0438 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/test\/main.c#L121\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438\u0441\u044c \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443<\/a>. \u0418 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444-\u0446\u0438\u044e<\/p>\n<pre><code class=\"cpp\">SystemInit();<\/code><\/pre>\n<p>\u041e\u043d\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u0437 <em>asmbler<\/em> \u043a\u043e\u0434\u0430. \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0435\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u044f\u0432\u043d\u043e. \u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442-\u043f\u0440\u0438\u043c\u0435\u0440. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a \u0447\u0438\u043f\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 OpenOCD \u0441\u0435\u0440\u0432\u0435\u0440(\u043b\u0443\u0447\u0448\u0435 \u0432\u0435\u0440\u0441\u0438\u044e <a href=\"https:\/\/github.com\/ilg-archived\/openocd\/releases\/tag\/v0.10.0-12-20190422\" rel=\"noopener noreferrer nofollow\">0.10.0-11-20190118-1134<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/github.com\/xpack-dev-tools\/openocd-xpack\/releases\/tag\/v0.12.0-1\/\" rel=\"noopener noreferrer nofollow\">v0.12.0-1<\/a>)<\/p>\n<pre><code class=\"bash\">openocd -f interface\/stlink.cfg -f target\/nrf51.cfg<\/code><\/pre>\n<p>\u0438 \u0441\u0430\u043c \u0442\u0435\u0441\u0442:<\/p>\n<pre><code class=\"bash\">LD_LIBRARY_PATH=$PWD test\/test_build_nrf5_adc localhost 6666<\/code><\/pre>\n<p>6666 &#8212; \u044d\u0442\u043e \u043f\u043e\u0440\u0442 OpenOCD \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GDB \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0441\u0435\u0442\u044c \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 3333<\/p>\n<pre><code class=\"bash\">LD_LIBRARY_PATH=$PWD test\/test_build_nrf5_adc localhost 3333<\/code><\/pre>\n<p>LD_LIBRARY_PATH \u043d\u0443\u0436\u0435\u043d \u0447\u0442\u043e \u0431\u044b \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u043c\u043e\u0433 \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432, \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u043b\u0438\u0431\u0430\u043c.<\/p>\n<h2>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 Windows OS<\/h2>\n<p>\u0411\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0440\u0435\u0434\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks#windows-os\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>. \u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u0441\u0438\u044e VS2017 \u0438 clang 8.0.0, \u0430 \u0442\u0430\u043a \u0436\u0435  \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 ninja \u0438\u043b\u0438 make. \u041d\u043e \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/tree\/master#universal-easy-way-github-actions\" rel=\"noopener noreferrer nofollow\"><strong>GitHub Action<\/strong><\/a>, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 <u>\u043d\u0430\u043c\u043d\u043e\u0433\u043e<\/u> \u043b\u0435\u0433\u0447\u0435.<\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/commit\/787ebf08bd284dee9ac24136269b461031277def\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u0442\u0447\u0430<\/a> \u0432\u044b\u0448\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0432 Unix \u0441\u0438\u0441\u0442\u0435\u043c\u0435.  \u0414\u043b\u044f Windows OS \u0435\u0449\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c SDK nRF5, \u0447\u0442\u043e \u0431\u044b \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u043e\u0434 Windows \u0431\u044b\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043c\u0430\u043a\u0440\u043e\u0441<\/p>\n<pre><code>__GNUC__<\/code><\/pre>\n<p>\u0418\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0440\u0443\u0448\u0438\u0442\u0441\u044f \u0432\u0441\u044f \u0441\u0431\u043e\u0440\u043a\u0430. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/commit\/c203edb5c4728ff45d24e27523d92f0caaaa15e7#diff-bf7e07b415343d353bad91b79f8bc1b5bda7edd32667dadc4800a2b3f4839a72\" rel=\"noopener noreferrer nofollow\">Makefile<\/a> \u0438 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/commit\/c203edb5c4728ff45d24e27523d92f0caaaa15e7#diff-c6fcf6f8725f31e63ceaf5abbc53e9fa85811df01ab31a518973f1da335f13be\" rel=\"noopener noreferrer nofollow\">defines_nRF51422.h<\/a> \u0412\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0435\u0449\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444-\u0446\u0438\u0438 \u0438\u0437 SDK, \u0447\u0442\u043e \u0431\u044b \u043e\u043d\u0438 \u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043d\u0430\u0448\u0443 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443.<\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <code>__declspec( dllexport )<\/code> \u041d\u043e \u0447\u0442\u043e \u0431\u044b \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 \u0432\u043e\u0437\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0444-\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0443\u044e <code>#pragma<\/code> \u0443 <strong>clang<\/strong><\/p>\n<pre><code class=\"cpp\">#pragma clang attribute push (__declspec(dllexport), apply_to = function)  \/\/ Functions to be exported void exportedFunction1(); void exportedFunction2();  #pragma clang attribute pop<\/code><\/pre>\n<p>\u0418 \u0432\u0441\u0435 \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 <code>#pragma<\/code> \u0431\u0443\u0434\u0435\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e. \u0427\u0442\u043e \u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u0430\u043c\u0438 <code>#pragma<\/code><strong> <\/strong>\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434 Windows, \u044f \u0438\u0445 \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u043b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<pre><code class=\"cpp\">#include \"remcu_exports_symbol_enter.h\"  \/\/ Functions to be exported void exportedFunction1(); void exportedFunction2();  #include \"remcu_exports_symbol_exit.h\"<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430:<\/p>\n<p>remcu.dll remcu.lib &#8212; \u0434\u043b\u044f Windows<br \/>libremcu.so -\u0434\u043b\u044f Linux<br \/>libremcu.myLib &#8212; \u0434\u043b\u044f Macos<\/p>\n<p>\u0410 \u0442\u0430\u043a \u0436\u0435 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u043f\u0430\u043f\u043a\u0435 <a href=\"https:\/\/github.com\/remotemcu\/prebuilt_libraries\/tree\/master\/NordSemi\/nRF51422-SDK-V12.3.0-01\/Windows_x64\/remcu_include\" rel=\"noopener noreferrer nofollow\">remcu_include<\/a>.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu_examples\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 c \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438<\/a>, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0432 <a href=\"https:\/\/remotemcu.com\/tutorials\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430\u0445<\/a> \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/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\/768688\/\"> https:\/\/habr.com\/ru\/articles\/768688\/<\/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><em>*\u042d\u0442\u043e\u0442 tutorial \u0442\u0430\u043a \u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0438\u043c \u043e\u0447\u0435\u043d\u044c \u0432\u043e\u043b\u044c\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c <\/em><a href=\"https:\/\/ser-mk.github.io\/remcu\/tutorial-preparing-nrf51-sdk\/\" rel=\"noopener noreferrer nofollow\"><em>\u0441\u0442\u0430\u0442\u044c\u0438<\/em><\/a><em> \u0438\u0437 \u0431\u043b\u043e\u0433\u0430.<\/em><\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/768460\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043d\u0446\u0438\u043f, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 (UART, I2C, CAN bus etc) \u0432 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u041f\u041a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u0430 \u0432\u0445\u043e\u0434\u0438\u043b\u0430 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438 \u0432\u0438\u0441\u0435\u043b\u0430 \u043d\u0430 \u043e\u0431\u0448\u0435\u0439 \u0448\u0438\u043d\u0435 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e. \u0412 \u0442\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043e\u0440\u0438\u044f \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a\u043e\u0434\u0430 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 <a href=\"https:\/\/github.com\/remotemcu\/adin-llvm-pass\" rel=\"noopener noreferrer nofollow\"><em>ADIN<\/em><\/a><em> LLVM pass<\/em> \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0447\u0438\u043f <strong>nRF51422<\/strong> \u0438 <strong>nRF5 SDK <\/strong>\u043e\u0442 <a href=\"https:\/\/www.nordicsemi.com\/Products\/Development-software\/nrf5-sdk\" rel=\"noopener noreferrer nofollow\">Nordicsemi<\/a>. C\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0430\u0435\u043c <a href=\"https:\/\/www.nordicsemi.com\/-\/media\/Software-and-other-downloads\/SDKs\/nRF5\/Binaries\/nRF5SDK1230.zip\" rel=\"noopener noreferrer nofollow\">SDK<\/a> \u0434\u043b\u044f nRF51422, \u0440\u0430\u0441\u043f\u0430\u043a\u0443\u0435\u043c, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c:<\/p>\n<pre><code class=\"bash\">tree -d -L 2 nRF5_SDK_12.3.0_d7731ad\/ nRF5_SDK_12.3.0_d7731ad\/ \u251c\u2500\u2500 components \u2502\u00a0\u00a0 \u251c\u2500\u2500 ant \u2502\u00a0\u00a0 \u251c\u2500\u2500 ble \u2502\u00a0\u00a0 \u251c\u2500\u2500 boards \u2502\u00a0\u00a0 \u251c\u2500\u2500 device \u2502\u00a0\u00a0 \u251c\u2500\u2500 drivers_ext \u2502\u00a0\u00a0 \u251c\u2500\u2500 drivers_nrf \u2502\u00a0\u00a0 \u251c\u2500\u2500 libraries \u2502\u00a0\u00a0 \u251c\u2500\u2500 nfc \u2502\u00a0\u00a0 \u251c\u2500\u2500 proprietary_rf \u2502\u00a0\u00a0 \u251c\u2500\u2500 serialization \u2502\u00a0\u00a0 \u251c\u2500\u2500 softdevice \u2502\u00a0\u00a0 \u2514\u2500\u2500 toolchain \u251c\u2500\u2500 documentation \u251c\u2500\u2500 examples \u2502\u00a0\u00a0 \u251c\u2500\u2500 ant \u2502\u00a0\u00a0 \u251c\u2500\u2500 ble_central \u2502\u00a0\u00a0 \u251c\u2500\u2500 ble_central_and_peripheral \u2502\u00a0\u00a0 \u251c\u2500\u2500 ble_peripheral \u2502\u00a0\u00a0 \u251c\u2500\u2500 crypto \u2502\u00a0\u00a0 \u251c\u2500\u2500 dfu \u2502\u00a0\u00a0 \u251c\u2500\u2500 dtm \u2502\u00a0\u00a0 \u251c\u2500\u2500 multiprotocol \u2502\u00a0\u00a0 \u251c\u2500\u2500 nfc \u2502\u00a0\u00a0 \u251c\u2500\u2500 peripheral \u2502\u00a0\u00a0 \u2514\u2500\u2500 proprietary_rf \u251c\u2500\u2500 external \u2502\u00a0\u00a0 \u251c\u2500\u2500 cifra_AES128-EAX \u2502\u00a0\u00a0 \u251c\u2500\u2500 fatfs \u2502\u00a0\u00a0 \u251c\u2500\u2500 freertos \u2502\u00a0\u00a0 \u251c\u2500\u2500 micro-ecc \u2502\u00a0\u00a0 \u251c\u2500\u2500 nano-pb \u2502\u00a0\u00a0 \u251c\u2500\u2500 nfc_adafruit_library \u2502\u00a0\u00a0 \u251c\u2500\u2500 nrf_cc310 \u2502\u00a0\u00a0 \u251c\u2500\u2500 protothreads \u2502\u00a0\u00a0 \u251c\u2500\u2500 rtx \u2502\u00a0\u00a0 \u251c\u2500\u2500 segger_rtt \u2502\u00a0\u00a0 \u2514\u2500\u2500 tiny-AES128 \u2514\u2500\u2500 svd<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u0430 \u0432\u043e\u0442 \u043a\u043e\u0434 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441\u043e <em>BLE<\/em> \u0441\u0442\u0435\u043a\u043e\u043c, \u0440\u0430\u0434\u0438\u043e\u0447\u0430\u0441\u0442\u044c\u044e \u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0443\u0434\u0430\u043b\u0438\u043c, \u0434\u0430\u0431\u044b \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u0438\u0441\u044c. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code>tree  -L 2 nRF5_SDK_12.3.0_d7731ad\/ nRF5_SDK_12.3.0_d7731ad\/ \u251c\u2500\u2500 components \u2502\u00a0\u00a0 \u251c\u2500\u2500 boards \u2502\u00a0\u00a0 \u251c\u2500\u2500 device \u2502\u00a0\u00a0 \u251c\u2500\u2500 drivers_nrf \u2502\u00a0\u00a0 \u251c\u2500\u2500 libraries \u2502\u00a0\u00a0 \u251c\u2500\u2500 sdk_validation.h \u2502\u00a0\u00a0 \u2514\u2500\u2500 toolchain \u251c\u2500\u2500 examples \u2502\u00a0\u00a0 \u2514\u2500\u2500 peripheral \u2514\u2500\u2500 license.txt<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 <a href=\"https:\/\/github.com\/remotemcu\/adin-llvm-pass\" rel=\"noopener noreferrer nofollow\">ADIN<\/a> \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u044f\u0434\u043e\u043c \u043f\u0430\u043f\u043a\u0443 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/tree\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\" rel=\"noopener noreferrer nofollow\">NRF51422<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b. \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u0441 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/CMakeLists.txt\" rel=\"noopener noreferrer nofollow\">CMakeLists.txt.<\/a>  \u0417\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u041c\u041a, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u043e\u0442 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/stm32\/stm32f3\/STM32F3-Discovery_FW_V1.1.0\/CMakeLists.txt\" rel=\"noopener noreferrer nofollow\">STM32<\/a>. \u041f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u0435\u0440\u0432\u044b\u0445 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/CMakeLists.txt\" rel=\"noopener noreferrer nofollow\">CMakeLists.txt<\/a>:<\/p>\n<pre><code class=\"cpp\">set(MCU_TYPE nRF51422)  set(MCU_LIB_NAME SDK)  set(MCU_MAJOR_VERSION_LIB V12.3.0)  set(MCU_MINOR_VERSION_LIB 01)<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u0441\u043c\u0435\u0442\u0438\u043a\u0438, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e \u0447\u0438\u043f\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430:<\/p>\n<pre><code class=\"cmake\">set(MCU_SDK_PATH ${CMAKE_CURRENT_SOURCE_DIR}\/..)<\/code><\/pre>\n<p><code>MCU_SDK_PATH<\/code> &#8212; \u044d\u0442\u043e \u043f\u0443\u0442\u044c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c \u0441\u043a\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 <strong>nRF5 SDK<\/strong>. \u0412\u0430\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0431\u043e\u0440\u043a\u0435<\/p>\n<pre><code class=\"cmake\">include(${REMCU_VM_PATH}\/cmake\/mcu_build_target.cmake)  file(INSTALL \"${CMAKE_CURRENT_SOURCE_DIR}\/defines_${MCU_TYPE}.h\"        DESTINATION ${ALL_INCLUDE_DIR}       )  file(RENAME \"${ALL_INCLUDE_DIR}\/defines_${MCU_TYPE}.h\"             ${ALL_INCLUDE_DIR}\/device_defines.h       )<\/code><\/pre>\n<p>\u0421\u0442\u0440\u043e\u0447\u043a\u0438 \u0432\u044b\u0448\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c. \u0410 \u0432\u043e\u0442 \u044d\u0442\u0443 \u043d\u0438\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a python \u0444\u0430\u0439\u043b\u0430 \u0441 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0444-\u0446\u0438\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442:<\/p>\n<pre><code class=\"cmake\">file(INSTALL \"${CMAKE_CURRENT_SOURCE_DIR}\/${MCU_TYPE}_${MCU_LIB_NAME}.py\"       DESTINATION ${ALL_INCLUDE_DIR}       )<\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437 \u043d\u0430\u043f\u0438\u0448\u0443 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u044d\u043a\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444-\u0446\u0438\u0438\u0439 \u0438\u0437 SDK \u0432 \u043f\u0438\u0442\u043e\u043d \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/docs.python.org\/3\/library\/ctypes.html\" rel=\"noopener noreferrer nofollow\">ctypes<\/a>. \u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/remotemcu\/remcu_examples\/blob\/master\/stm32f4_discovery\/jupyter-notebook\/stm32f4_discovery_python.ipynb\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0432 Python \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e ctypes<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/conf.cpp\" rel=\"noopener noreferrer nofollow\"><strong>conf.cpp<\/strong><\/a>. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 ADIN \u0444-\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u0432. \u0428\u0430\u0431\u043b\u043e\u043d \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043e\u0442 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/stm32\/stm32f3\/STM32F3-Discovery_FW_V1.1.0\/conf.cpp\" rel=\"noopener noreferrer nofollow\">STM32<\/a>. \u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444-\u0446\u0438\u0438:<\/p>\n<p><code>add_to_mem_interval<\/code> &#8212; \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0434\u043b\u044f RAM, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043e\u043d \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0434\u043b\u044f STM32 \u0438 nRF51. \u0414\u043b\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f<br \/><code>add_to_adin_interval<\/code>  &#8212; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438 \u0438 \u0442\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0441\u0445\u0435\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 nRF51 \u0438\u0437 datasheet \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <code>AHB peripherals<\/code> \u0438 <code>APB peripherals<\/code><strong>,<\/strong> \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044f \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441 RF(ADC, \u0442\u0430\u0439\u043c\u0435\u0440\u044b, GPIO \u0438 \u0434\u0440.) <\/p>\n<pre><code class=\"cpp\">add_to_mem_interval(0x20000000, 0x20000000 + 8*1024); \/\/SRAM  8k add_to_adin_interval(0x40000000,  0x40008000); \/\/APB peripherals add_to_adin_interval(0x50000000,  0x50060000); \/\/AHB peripherals add_to_adin_interval(0xF0000FE0,  0xF0000FE8 + 4); \/\/PAN 26 \"System: Manual setup is required to enable the use of peripherals\"<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0444-\u0446\u0438\u0438 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/components\/toolchain\/system_nrf51.c#L62\" rel=\"noopener noreferrer nofollow\">SystemInit<\/a>. \u0422\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u044d\u0442\u0438\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/components\/toolchain\/system_nrf51.c#L62\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043a\u043e\u0434\u0443<\/a>. \u0424-\u0446\u0438\u044e <code>get_RAM_addr_for_test<\/code> \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"cpp\">uint32_t get_RAM_addr_for_test(){     return 0x20000000; }<\/code><\/pre>\n<p>\u041e\u043d\u0430 \u043e\u0442\u0434\u0430\u0435\u0442 \u0430\u0434\u0440\u0435\u0441, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0442\u0435\u0441\u0442\u044b \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e. \u0410\u0434\u0440\u0435\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 RAM \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430, \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438 \u0447\u0442\u043e \u0431\u044b \u0432 \u044d\u0442\u043e\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444-\u0446\u0438\u044e <code>remcu_debuggerTest<\/code> \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u043e\u043c (\u0442.\u0435. \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 <code>remcu_connect2OpenOCD<\/code> \/ <code>remcu_connect2GDB<\/code>)<\/p>\n<pre><code class=\"cpp\">\/**  * @brief remcu_debuggerTest  * Performs test of debugger and debug server while mcu is connected.  * @return If no error occurs, the function returns NULL  * else the function returns error message (char array)  * Don't free the pointer after use!  * Note:  Invoke the function after establishing a connection with the debugger  * through the successful utilization of either the  * remcu_connect2OpenOCD or remcu_connect2GDB functions.  *\/ REMCULIB_DLL_API const char* remcu_debuggerTest();<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u0434\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>defines_${MCU_TYPE}.h<\/code> \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f <code>defines_nRF51422.h<\/code>. \u0412 \u043d\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0421\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u0447\u0442\u043e \u0431\u044b \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u044d\u0442\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 SDK, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">#ifdef OPTION1 void foo(); #endif<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0431\u044b \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0444-\u0446\u0438\u044e <code>foo<\/code>, \u043d\u0430\u0434\u043e \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u043c\u0430\u043a\u0440\u043e\u0441 <code>OPTION1<br \/><\/code>\u041d\u0430\u0434\u043e \u043d\u0430\u0439\u0442\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f nRF5 SDK \u043f\u043e\u0434 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0447\u0438\u043f. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445. \u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/examples\/peripheral\/adc\/pca10028\/blank\/armgcc\/Makefile\" rel=\"noopener noreferrer nofollow\">Makefile<\/a> \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 <strong>ADC<\/strong>. \u0422\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u044b:<\/p>\n<pre><code class=\"cpp\">CFLAGS += -DNRF51 CFLAGS += -DNRF51422 CFLAGS += -DBOARD_PCA10028 CFLAGS += -DBSP_DEFINES_ONLY<\/code><\/pre>\n<p>\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0438\u0445 \u0432 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/defines_nRF51422.h\" rel=\"noopener noreferrer nofollow\">defines_nRF51422.h<\/a><\/p>\n<pre><code class=\"cpp\">#define REMCU_LIB  #define NRF51  #define NRF51422  #define BOARD_PCA10028  #define BSP_DEFINES_ONLY<\/code><\/pre>\n<p>\u0418\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/examples\/peripheral\/adc\/pca10028\/blank\/armgcc\/Makefile\" rel=\"noopener noreferrer nofollow\">Makefile<\/a> \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043f\u0443\u0442\u0435\u0439 \u0434\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<pre><code class=\"haskell\"># Source files common to all targets SRC_FILES += \\   $(SDK_ROOT)\/components\/libraries\/log\/src\/nrf_log_backend_serial.c \\   $(SDK_ROOT)\/components\/libraries\/log\/src\/nrf_log_frontend.c \\   $(SDK_ROOT)\/components\/libraries\/util\/app_error.c \\   $(SDK_ROOT)\/components\/libraries\/util\/app_error_weak.c \\   $(SDK_ROOT)\/components\/libraries\/util\/app_util_platform.c \\   $(SDK_ROOT)\/components\/libraries\/util\/nrf_assert.c \\   $(SDK_ROOT)\/components\/libraries\/util\/sdk_errors.c \\   $(SDK_ROOT)\/components\/boards\/boards.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal\/nrf_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc\/nrf_drv_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/common\/nrf_drv_common.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/uart\/nrf_drv_uart.c \\   $(PROJ_DIR)\/main.c \\   $(SDK_ROOT)\/external\/segger_rtt\/RTT_Syscalls_GCC.c \\   $(SDK_ROOT)\/external\/segger_rtt\/SEGGER_RTT.c \\   $(SDK_ROOT)\/external\/segger_rtt\/SEGGER_RTT_printf.c \\   $(SDK_ROOT)\/components\/toolchain\/gcc\/gcc_startup_nrf51.S \\   $(SDK_ROOT)\/components\/toolchain\/system_nrf51.c \\  # Include folders common to all targets INC_FOLDERS += \\   $(SDK_ROOT)\/components \\   $(SDK_ROOT)\/components\/libraries\/util \\   $(SDK_ROOT)\/components\/toolchain\/gcc \\   $(SDK_ROOT)\/components\/drivers_nrf\/uart \\   ..\/config \\   $(SDK_ROOT)\/components\/drivers_nrf\/common \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc \\   $(PROJ_DIR) \\   $(SDK_ROOT)\/external\/segger_rtt \\   $(SDK_ROOT)\/components\/libraries\/bsp \\   $(SDK_ROOT)\/components\/drivers_nrf\/nrf_soc_nosd \\   $(SDK_ROOT)\/components\/toolchain \\   $(SDK_ROOT)\/components\/device \\   $(SDK_ROOT)\/components\/libraries\/log \\   $(SDK_ROOT)\/components\/boards \\   $(SDK_ROOT)\/components\/drivers_nrf\/delay \\   $(SDK_ROOT)\/components\/toolchain\/cmsis\/include \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal \\   $(SDK_ROOT)\/components\/libraries\/log\/src \\<\/code><\/pre>\n<p>\u0423\u0431\u0435\u0440\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439, \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u043c\u0438 printf \u0438 \u0444\u0430\u0439\u043b\u044b \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430. \u0422\u0430\u043a \u0436\u0435 \u0443\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u0442\u0438 \u0434\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a:<\/p>\n<pre><code class=\"haskell\">SRC_FILES +=  \\   $(SDK_ROOT)\/components\/boards\/boards.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal\/nrf_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc\/nrf_drv_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/common\/nrf_drv_common.c \\   $(SDK_ROOT)\/components\/toolchain\/system_nrf51.c \\  INC_FOLDERS =  \\   $(SDK_ROOT)\/components\/libraries\/util \\   ..\/config \\   $(SDK_ROOT)\/components\/drivers_nrf\/common \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc \\   $(SDK_ROOT)\/components\/drivers_nrf\/nrf_soc_nosd \\   $(SDK_ROOT)\/components\/toolchain \\   $(SDK_ROOT)\/components\/device \\   $(SDK_ROOT)\/components\/libraries\/log \\   $(SDK_ROOT)\/components\/boards \\   $(SDK_ROOT)\/components\/toolchain\/cmsis\/include \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal \\   $(SDK_ROOT)\/components\/libraries\/log\/src \\<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/nordicsemi\/nRF5_SDK_12.3.0_d7731ad\/NRF51422\/Makefile\" rel=\"noopener noreferrer nofollow\">Makefile<\/a> \u0434\u043b\u044f ADIN \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0435\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 <strong>nRF5 SDK<\/strong>, \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043e\u0442 <a href=\"https:\/\/github.com\/remotemcu\/remcu-chip-sdks\/blob\/master\/stm32\/stm32f3\/STM32F3-Discovery_FW_V1.1.0\/Makefile\" rel=\"noopener noreferrer nofollow\">STM32<\/a>:<\/p>\n<pre><code class=\"haskell\">SDK_ROOT := $(MCU_SDK_PATH)  C_SRC +=  \\   $(SDK_ROOT)\/components\/boards\/boards.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/hal\/nrf_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc\/nrf_drv_adc.c \\   $(SDK_ROOT)\/components\/drivers_nrf\/common\/nrf_drv_common.c \\   $(SDK_ROOT)\/components\/toolchain\/system_nrf51.c \\  INC_PATH =  \\   $(SDK_ROOT)\/components\/libraries\/util \\   $(SDK_ROOT)\/examples\/peripheral\/adc\/pca10028\/blank\/config \\   $(SDK_ROOT)\/components\/drivers_nrf\/common \\   $(SDK_ROOT)\/components\/drivers_nrf\/adc \\<\/code><\/pre>\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-357987","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/357987","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=357987"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/357987\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=357987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=357987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=357987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}