{"id":443271,"date":"2024-12-26T07:00:59","date_gmt":"2024-12-26T07:00:59","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=443271"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=443271","title":{"rendered":"<span>\u0414\u043d\u0435\u0432\u043d\u0438\u043a \u0430\u043b\u044c\u0442\u0440\u0443\u0438\u0441\u0442\u0430. OpenBlt<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/feaser\/openblt\" rel=\"noopener noreferrer nofollow\">OpenBlt<\/a> \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438 CMake. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043d\u0435 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043b\u0438 \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043b\u0443\u0447\u0448\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0443\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0447\u0435\u043c \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u043e\u043d\u043d\u043e\u0439 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0438 \u043d\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e cmake \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 &#8212; \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0433\u0447\u0435 \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435, \u0447\u0435\u043c \u043e\u043d\u0438 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434.<br \/>* \u0418 \u0434\u0430, \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u0438 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439, \u0438 \u043d\u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0437\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0436\u0430\u043b\u043e\u0431\u0443 \u043d\u0430 Kitware \u043f\u043e\u0434\u0430\u0442\u044c. \ud83d\ude00<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/1a1\/39f\/7ac\/1a139f7ac5c9f0a08dc67e5c873f005f.jpg\" alt=\"\u0420\u0435\u0430\u043a\u0446\u0438\u044f \u043c\u043e\u0435\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u043d\u0430 \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438\" title=\"\u0420\u0435\u0430\u043a\u0446\u0438\u044f \u043c\u043e\u0435\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u043d\u0430 \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438\" width=\"1340\" height=\"136\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1a1\/39f\/7ac\/1a139f7ac5c9f0a08dc67e5c873f005f.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0430\u043a\u0446\u0438\u044f \u043c\u043e\u0435\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u043d\u0430 \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043c\u043e\u0438\u043c \u0444\u043e\u0440\u043a\u043e\u043c <a href=\"https:\/\/github.com\/WorHyako\/openblt\/tree\/arch\/cmake\" rel=\"noopener noreferrer nofollow\">WorHyako\/openblt<\/a> (tree: <code>arch\/cmake<\/code>). \u0415\u0441\u043b\u0438 \u0442\u0430\u043c \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b, \u0442\u043e \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438. <br \/>\u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0430\u0436\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c PR \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043e\u0440\u0430, \u0435\u0441\u043b\u0438 \u043e\u043d \u043f\u043e\u0447\u0442\u0438\u0442 \u043c\u0435\u043d\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u043c. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7f8\/791\/e35\/7f8791e35c5c3fd3f166c5c5c51758e1.png\" alt=\"\u0414\u0438\u0444\u0444 \u0444\u043e\u0440\u043a\u0430 \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0438\u0437 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438. \" title=\"\u0414\u0438\u0444\u0444 \u0444\u043e\u0440\u043a\u0430 \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0438\u0437 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438. \" width=\"1260\" height=\"218\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7f8\/791\/e35\/7f8791e35c5c3fd3f166c5c5c51758e1.png\"\/><\/p>\n<div><figcaption>\u0414\u0438\u0444\u0444 \u0444\u043e\u0440\u043a\u0430 \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0438\u0437 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438. <\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0435 \u043a\u0440\u0435\u043f\u043a\u0438\u0435 \u043d\u0430\u0432\u044b\u043a\u0438 \u0441 CMake: \u0442\u0430\u0440\u0433\u0435\u0442\u044b \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/module\/CMakeParseArguments.html#module:CMakeParseArguments\" rel=\"noopener noreferrer nofollow\">CMakeParseArguments<\/a>, <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/module\/CMakePrintHelpers.html\" rel=\"noopener noreferrer nofollow\">CMakePrintHelpers<\/a> \u0438 <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/module\/FindPkgConfig.html\" rel=\"noopener noreferrer nofollow\">PkgConfig<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 OpenBlt?<\/summary>\n<div class=\"spoiler__content\">\n<blockquote>\n<p>OpenBLT \u044d\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0412\u0430\u043c \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0412\u0430\u0448\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c firmware \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438 \u0441 \u043a\u0430\u0440\u0442\u044b SD. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e OpenBLT &#8212; \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043e\u0434, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0412\u0430\u0448\u0438\u043c\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438. <\/p>\n<p>(c) microsin<\/p>\n<\/blockquote>\n<p>\u042d\u0442\u0430 \u0446\u0438\u0442\u0430\u0442\u0430 &#8212; \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0431\u0437\u0430\u0446 \u043d\u0430 <a href=\"https:\/\/microsin.net\/programming\/arm\/openblt-bootloader.html\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a> \u0441\u0430\u0439\u0442\u0430 microsin.net. \u041e\u043d\u0430 (\u0446\u0438\u0442\u0430\u0442\u0430) \u0434\u0430\u0451\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0441 \u043a\u0430\u043a\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0436\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435, \u0433\u0438\u043f\u0435\u0440\u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043f\u0440\u0438\u0432\u0451\u043b. \u0421\u0430\u0439\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0451\u043c\u043a\u043e \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.  <\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0447\u0435\u043c \u0442\u0440\u043e\u0433\u0430\u0442\u044c OpenBlt?<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042f, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u0434 <a href=\"https:\/\/github.com\/feaser\/openblt\" rel=\"noopener noreferrer nofollow\">OpenBlt<\/a>, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043d\u0438\u043c. \u041c\u043e\u0451 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u043f\u0440\u0438\u0432\u043b\u0451\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u0430\u0431\u0440\u0430 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u0432 GitHub 200+ \u0444\u043e\u0440\u043a\u043e\u0432, \u043d\u043e \u043d\u043e\u043b\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u043e \u0441\u0443\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044f \u043d\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0438\u0445, &#8212; \u043a\u0430\u043a \u0441\u0435\u0439\u0447\u0430\u0441 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043c\u043e\u043b\u043e\u0434\u0435\u0436\u044c &#171;100% \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, 0% \u043e\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f&#187;. <\/p>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434 \u043b\u044e\u0431\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043d\u0430 \u0421\u0438: \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u0438\u0431\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u0435, \u043b\u0438\u0431\u043e \u0432\u0435\u043a \u043d\u0430\u0437\u0430\u0434, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0451.<\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u0436\u0435 \u0442\u043e\u0433\u0434\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442?<br \/>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0430\u0432\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u043d\u0435 \u0432\u043d\u043e\u0441\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442, \u0430 \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044f \u043d\u0435 \u0441\u043c\u043e\u0433 \u0443\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0445\u0430\u0431\u0440\u0430. \ud83d\ude00<\/p>\n<blockquote>\n<p>\u041d\u0443 \u0438 \u043f\u043e \u0442\u0435\u043c\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 openblt.<\/p>\n<p><a href=\"https:\/\/github.com\/feaser\/openblt\/\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/feaser\/openblt\/<\/a><\/p>\n<p>\u041e\u043d \u0443\u0436\u0435 \u043d\u0430 \u0441\u0438\u043c\u0435\u0439\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e <\/p>\n<p>(c) <a class=\"mention\" href=\"\/users\/mcublog\">@Mcublog<\/a><\/p>\n<\/blockquote>\n<blockquote>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u043e\u0446\u0435\u043d\u043a\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 openblt, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043b\u043e\u0442\u043d\u043e \u043e\u0434\u043d\u043e \u0432\u0440\u0435\u043c\u044f \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u0432\u043e\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f&amp;<\/p>\n<p>(c) <a class=\"mention\" href=\"\/users\/mcublog\">@Mcublog<\/a><\/p>\n<\/blockquote>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0442\u0440\u043e \u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u044c\u0438<\/summary>\n<div class=\"spoiler__content\">\n<h2>\u0417\u0430\u0447\u0435\u043c \u0431\u044b\u043b\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043e OpenBlt?<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0447\u0438\u0442\u0430\u043b\u0438 \u043c\u043e\u044e \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0442\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u043d\u0435\u0439 \u0431\u044b\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f dfu-util \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 CMake\/\u0421++, \u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0438\u043c\u0435\u043b\u0430 \u043d\u0438\u0437\u043a\u0438\u0439 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430.<\/p>\n<blockquote>\n<p>CMakeList-\u044b \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u0430\u043a \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0441\u0432\u043e\u0438\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u0431\u043e\u043b\u0435\u0435 \u0451\u043c\u043a\u043e\u0439 \u0438 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0439. <\/p>\n<p>(\u0441) <a class=\"mention\" href=\"\/users\/worhyako\">@WorHyako<\/a><\/p>\n<\/blockquote>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0446\u0435\u043b\u044c:<\/p>\n<blockquote>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e-\u0433\u0430\u0439\u0434\u043e\u043c \u043f\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u043d\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0421\u0438 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e CMakeList-\u043e\u0432. <\/p>\n<p>(c) <a class=\"mention\" href=\"\/users\/worhyako\">@WorHyako<\/a><\/p>\n<\/blockquote>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u0421\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 dfu-util \u044f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c CMake \u0442\u043e\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043f\u043b\u0430\u043d\u043a\u0443 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u043d\u043e \u043b\u0438\u0445\u043e\u0434\u0435\u0439\u043d\u0438\u0447\u0430\u0442\u044c, \u0437\u0430\u0439\u0434\u044f \u0432\u043d\u0443\u0442\u0440\u044c open-source \u043f\u0440\u043e\u0435\u043a\u0442\u0430 OpenBlt.<\/p>\n<h2>\u0421\u043d\u043e\u0432\u0430 \u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0434\u044b?<\/h2>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433\u0430 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u044f \u043c\u043e\u0433\u0443 \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0440\u044f\u0434\u0430 CMake \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u0430. \u042f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043d\u0435 \u0434\u0430\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0432\u043e\u044e \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0442.\u043a \u043b\u0443\u0447\u0448\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 &#171;<strong>Professional CMake: A Practical Guide<\/strong>&#187; \u0430\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u0430\u00a0<a href=\"https:\/\/discourse.cmake.org\/u\/craig.scott\/summary\" rel=\"noopener noreferrer nofollow\">Craig Scott<\/a>. \u0410 \u0442\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u043b \u044f \u043d\u0430 \u0434\u043e\u0441\u0443\u0433\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0430-\u043b\u044f &#171;CMake: 20 \u0441\u043e\u0432\u0435\u0442\u043e\u0432&#187;&#8230; \u0425\u0440\u0430\u043d\u0438 \u0433\u043e\u0441\u043f\u043e\u0434\u044c \u044d\u0442\u0438\u0445 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0438 \u0438\u0445 \u0442\u0438\u043c\u043b\u0438\u0434\u043e\u0432. \ud83d\ude00<\/p>\n<p>P.S. \u0414\u0430 \u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u043c\u043d\u0435 \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u0445\u0430\u0431\u0440\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430 20+ \u043c\u0438\u043d\u0443\u0442 \u0447\u0442\u0435\u043d\u0438\u044f, \u043d\u043e \u0443\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c. \ud83d\ude42<\/p>\n<\/p>\n<\/div>\n<\/details>\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<ul>\n<li>\n<p><a href=\"#projectStruct\" rel=\"noopener noreferrer nofollow\">\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#libOpenBlt\" rel=\"noopener noreferrer nofollow\">LibOpenBlt \u0442\u0430\u0440\u0433\u0435\u0442<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#bootCommander\" rel=\"noopener noreferrer nofollow\">BootCommander<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#seednkey\" rel=\"noopener noreferrer nofollow\">SeedNKey<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#lint\" rel=\"noopener noreferrer nofollow\">Lint<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#outro\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"projectStruct\" id=\"projectStruct\"><\/a><\/p>\n<h2>\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>\u0421\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/feaser\/openblt\" rel=\"noopener noreferrer nofollow\">Feaser\/OpenBlt<\/a>, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 <code>OpenBlt\/Host\/Source<\/code>, \u0442.\u043a. \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u043e\u0441\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0430\u0437\u0443 \u0441\u0434\u0435\u043b\u0430\u044e \u0440\u0435\u043c\u0430\u0440\u043a\u0443, \u0447\u0442\u043e <code>root<\/code> \/ <code>root_dir<\/code> \/ <code>\u0440\u0443\u0442\u043e\u0432\u044b\u0439<\/code> \u0438 \u043f\u0440\u043e\u0447\u0438\u043c\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u044f \u0431\u0443\u0434\u0443 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>OpenBlt\/Host\/Source<\/code>. <\/p>\n<pre><code>&lt;root&gt;     |-- BootCommander         |-- CMakeLists.txt         |-- ...     |-- LibOpenBLT         |-- CMakeLists.txt         |-- ...     |-- MicroBoot         |-- ...     |-- SeedNKey         |-- CMakeLists.txt         |-- ...<\/code><\/pre>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <code>MicroBoot<\/code> \u0442\u043e\u0436\u0435 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0447\u0435\u0433\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0442\u0435\u043c\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0439 \u0443\u0434\u0435\u043b\u044f\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443. <\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 cmake \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432:<\/p>\n<pre><code>\u0422\u0430\u0440\u0433\u0435\u0442\u044b, \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 CMakeLists-\u0430\u0445  BootCommander     |-- openblt_shared OR openblt_static seednkey_shared openblt_shared OR openblt_static     |-- usb-1.0 dl OR ws2_32 winusb setupapi ALL_LINT     |-- &lt;target&gt;_LINT<\/code><\/pre>\n<ul>\n<li>\n<p><code>BootCommander<\/code>  \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <code>openblt_shared<\/code> \/ <code>openblt_static<\/code> , \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p><code>&lt;target&gt;_LINT<\/code>  \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0446\u0435\u043b\u0438 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0444\u0430\u0439\u043b\u043e\u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/PC-Lint\" rel=\"noopener noreferrer nofollow\">lint<\/a>, \u0430 <code>ALL_LINT<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u0443\u044e <code>&lt;target&gt;_LINT<\/code> \u0446\u0435\u043b\u0435\u0439. \u041c\u0430\u043b\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0448\u0442\u0443\u043a\u0430, \u043d\u043e \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c;<\/p>\n<\/li>\n<li>\n<p><code>seednkey_shared<\/code>  \u0434\u0430\u0436\u0435 \u0441\u043c\u043e\u0433 \u0441\u0431\u0438\u043b\u0434\u0438\u0442\u044c\u0441\u044f (\u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0438 \u0432\u043e\u0442 \u043e\u043f\u044f\u0442\u044c);<\/p>\n<\/li>\n<li>\n<p><code>openblt_shared<\/code> \/ <code>openblt_static<\/code> \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u0443\u043f\u0430\u043b \u0432 \u043e\u0448\u0438\u0431\u043a\u0443, \u0442.\u043a. \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0421 \u043d\u0435\u0433\u043e \u0438 \u043d\u0430\u0447\u043d\u0443.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"libOpenBlt\" id=\"libOpenBlt\"><\/a><\/p>\n<h2>LibOpenBlt \u0442\u0430\u0440\u0433\u0435\u0442<\/h2>\n<blockquote>\n<p>&#171;\u041f\u043e\u043d\u0435\u0441\u043b\u0430\u0441\u044c \u0434\u0443\u0448\u0430 \u0432 \u0440\u0430\u0439, \u0430 \u043d\u043e\u0433\u0438 &#8212; \u0432 \u043c\u0438\u043b\u0438\u0446\u0438\u044e&#187; (\u0441) \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u2014 \u041c.: \u041f\u0410\u0418\u041c\u0421. \u0412.\u041f. \u0411\u0435\u043b\u044f\u043d\u0438\u043d, \u0418.\u0410. \u0411\u0443\u0442\u0435\u043d\u043a\u043e. 1994<\/p>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>\u041f\u0435\u0440\u0432\u043e\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043d\u0435\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c libusb \u0442\u043e\u043b\u044c\u043a\u043e \u0432 UNIX \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 <code>usbbulk.h<\/code> \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 <code>&lt;os_name&gt;\/usbbulk.c<\/code> \u0444\u0430\u0439\u043b\u0430\u0445. <\/p>\n<pre><code class=\"cpp\">\/\/\/ ubsbulk.h ... void UsbBulkInit(void); void UsbBulkTerminate(void); bool UsbBulkOpen(void); void UsbBulkClose(void); bool UsbBulkWrite(uint8_t const * data, uint16_t length); bool UsbBulkRead(uint8_t * data, uint16_t length, uint32_t timeout); ...<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f libusb. \u0417\u0430\u0447\u0435\u043c \u0430\u0432\u0442\u043e\u0440 \u043c\u0443\u0447\u0430\u043b\u0441\u044f \u0441 WinAPI (<code>SetupAPI<\/code> + <code>WinSock2<\/code>) , \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e libusb-\u0445\u043e\u0439, \u043c\u043d\u0435 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432\u044b \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0432 libusb \u043d\u0435\u0442 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"https:\/\/gitlab.com\/dfu-util\/dfu-util\" rel=\"noopener noreferrer nofollow\">dfu-util<\/a>. \u041a\u0430\u043a\u0438\u0435 \u0442\u0430\u043c \u0444\u043e\u043a\u0443\u0441\u044b \u0441 libusb \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a &#8212; \u0432\u043e\u043b\u0448\u0435\u0431\u0441\u0442\u0432\u043e. <\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0440\u0430\u0437\u0443 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0443\u0442\u043e\u0432\u044b\u0439 (\u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <code>OpenBlt\/Host\/Source<\/code>) CMakeLists.txt, \u0430 \u043d\u0435 \u0431\u0435\u0433\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0436\u0434\u044b\u043c \u0438\u0437 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432:<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/CMakeLists.txt  cmake_minimum_required(VERSION 3.15)  project(OpenBlt)  # -------------- # #   LibOpenBlt   # # -------------- # add_subdirectory(LibOpenBLT)<\/code><\/pre>\n<p>\u0421 \u044d\u0442\u0438\u043c \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u043c \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0423 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043b\u044e\u0434\u0435\u0439 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0438\u0445 \u0432\u0435\u0441\u044c <code>$ENV:PATH<\/code> \u0443\u0442\u044b\u043a\u0430\u043d \u043f\u0443\u0442\u044f\u043c\u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0438\u043b\u0438 \u043e\u043d\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 <code>&lt;LIB&gt;_CFLAGS<\/code> \/ <code>&lt;LIB&gt;_LIBS<\/code> \/ <code>&lt;LIB&gt;_DIR<\/code> \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 (\u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0445\u0443\u0436\u0435). \u0414\u043b\u044f libusb \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0417\u0430\u043e\u0434\u043d\u043e \u0432 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b <code>ThirdParty.cmake<\/code> \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u0438 \u043f\u043e\u0438\u0441\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/CMakeLists.txt ... list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) include(ThirdParty) ...<\/code><\/pre>\n<pre><code class=\"cmake\"># &lt;root&gt;\/cmake\/ThirdParty.cmake  cmake_minimum_required(VERSION 3.15)  # ---------- # #   libusb   # # ---------- # find_package(PkgConfig REQUIRED) pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0)  # ------------------------ # #   Collect OS libraries   # # ------------------------ # add_library(OsLibs INTERFACE) add_library(openblt::osLibs ALIAS OsLibs)  if (WIN32)     find_library(SetupApi REQUIRED             NAMES setupapi)     find_library(Ws2_32 REQUIRED             NAMES ws2_32)     find_library(WinUsb REQUIRED             NAMES winusb)      target_link_libraries(OsLibs             INTERFACE             ${SetupApi}             ${Ws2_32}             ${WinUsb}) elseif (UNIX)     find_library(Dl REQUIRED             NAMES dl)      target_link_libraries(OsLibs             INTERFACE ${Dl}) endif ()<\/code><\/pre>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... target_link_libraries(openblt_static         PUBLIC         PkgConfig::libusb         openblt::osLibs) ... target_link_libraries(openblt_shared         PUBLIC         PkgConfig::libusb         openblt::osLibs) ...<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 libusb \u0445\u0438\u0434\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u0441\u043c\u0435\u043d\u043e\u0439 \u0443 \u0442\u0430\u0440\u0433\u0435\u0442\u0430 <code>PkgConfig::libusb<\/code>  \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439, \u043b\u0438\u0431\u043e \u0441\u043c\u0435\u043d\u043e\u0439 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445. \u041c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e \u0434\u0443\u0448\u0435 \u0432\u0442\u043e\u0440\u043e\u0435, \u0442\u0430\u043a \u0447\u0442\u043e:<\/p>\n<pre><code class=\"cpp\">\/\/ &lt;root&gt;\/LibOpenBLT\/port\/linux\/usbbulk.c (Line 37)  #include &lt;libusb.h&gt;<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u0431\u0438\u043b\u0434\u0438\u0442\u044c\u0441\u044f, \u043d\u043e \u043a\u0442\u043e \u044f \u0442\u0430\u043a\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0435\u0441\u043d\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0435 \u0432\u0435\u0441\u0451\u043b\u043e\u0435.<\/p>\n<p>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <code>LibOpenBlt<\/code> :<\/p>\n<pre><code>&lt;root&gt;\/LibOpenBlt     |-- build     |-- port         |-- windows             |-- ...             |-- critutils.c             |-- netaccess.c             |-- serialport.c             |-- timeutil.c             |-- usbbulk.c             |-- xcpprotect.c         |-- linux             |-- ...             |-- critutils.c             |-- netaccess.c             |-- serialport.c             |-- timeutil.c             |-- usbbulk.c             |-- xcpprotect.c     |-- netaccess.h     |-- serialport.h     |-- usbbulk.c     |-- xcpprotect.c     |-- *.c \/ *.h<\/code><\/pre>\n<p>\u041f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c CMake \u0447\u0435\u0440\u0435\u0437 <code>set(PROJECT_PORT_DIR ...)<\/code> \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0438\u0434\u0443\u0442 \u0442\u0435 \u0441\u0443\u0440\u0441\u043d\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u0438\u043a\u0438 \u0432 <code>LibOpenBlt<\/code> \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u044e\u0442 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0437 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u041f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0432\u0438\u0436\u0443 \u0442\u0430\u043a\u043e\u0435 \u043a\u0443\u043d\u0433-\u0444\u0443, \u043d\u043e \u0438\u0434\u0435\u044f \u043a\u043b\u0430\u0441\u0441\u043d\u0430\u044f, \u0442.\u043a \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432 \u0421\u0438 \u0431\u0435\u0437 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430 <code>if-def<\/code> \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439.<\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e \u043a\u0443\u043d\u0433-\u0444\u0443 \u0430\u0432\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430, \u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0442\u0438\u043f \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0430\u0440\u0433\u0435\u0442 <code>openblt::port<\/code> .<\/p>\n<pre><code>&lt;root&gt;\/LibOpenBlt     |-- port         |-- cmake             |-- ThirdParty.cmake         |-- common             |-- aes256.h             |-- aes256.c             |-- candriver.h             |-- candriver.c             |-- util.h             |-- util.c         |-- interface             |-- netaccess.h             |-- serialport.h             |-- usbbulk.h             |-- xcpprotect.h         |-- linux             |-- ... (*.c \/ *.h)         |-- windows             |-- ...     |-- ...<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0438\u0437 <code>&lt;root&gt;\/LibOpenBlt<\/code> \u0444\u0430\u0439\u043b\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044e \u043f\u043e\u0440\u0442-\u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0432 <code>&lt;root&gt;\/LibOpenBlt\/port\/interface<\/code> ;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 <code>&lt;root&gt;\/LibOpenBlt<\/code> \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u0440\u0442-\u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0432 <code>&lt;root&gt;\/LibOpenBlt\/port\/common<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0444\u0430\u0439\u043b <code>&lt;root&gt;\/cmake\/ThirdParty.cmake<\/code> \u0432 <code>&lt;root&gt;\/LibOpenBlt\/port\/cmake\/ThirdParty.cmake<\/code> , \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0449\u0438\u0439 <code>openblt::port<\/code>  \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u043f\u0440\u043e\u043a\u0438\u043d\u0435\u0442 \u0438\u0445 \u0432\u044b\u0448\u0435\u0441\u0442\u043e\u044f\u0449\u0438\u043c \u0446\u0435\u043b\u044f\u043c.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/port\/CMakeLists.txt  cmake_minimum_required(VERSION 3.15)  project(OpenBlt_Port         LANGUAGES C)  # --------------- # #   Third party   # # --------------- # list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}\/cmake) include(ThirdParty)  # ---------------- # #   OpenBlt port   # # ---------------- # add_library(openblt_port) add_library(openblt::port ALIAS openblt_port)  file(GLOB_RECURSE CommonSources ${CMAKE_CURRENT_SOURCE_DIR}\/common\/*.c) if (WIN32)     file(GLOB_RECURSE Sources ${CMAKE_CURRENT_SOURCE_DIR}\/windows\/*.c) elseif (UNIX)     file(GLOB_RECURSE Sources ${CMAKE_CURRENT_SOURCE_DIR}\/linux\/*.c) endif ()  target_sources(openblt_port         PRIVATE         ${CommonSources}         ${Sources})  target_include_directories(openblt_port         PUBLIC         ${CMAKE_CURRENT_SOURCE_DIR}\/common         ${CMAKE_CURRENT_SOURCE_DIR}\/interface         $&lt;$&lt;BOOL:${WIN32}&gt;:${CMAKE_CURRENT_SOURCE_DIR}\/windows&gt;         $&lt;$&lt;BOOL:${WIN32}&gt;:${CMAKE_CURRENT_SOURCE_DIR}\/windows\/canif\/ixxat&gt;         $&lt;$&lt;BOOL:${WIN32}&gt;:${CMAKE_CURRENT_SOURCE_DIR}\/windows\/canif\/kvaser&gt;         $&lt;$&lt;BOOL:${WIN32}&gt;:${CMAKE_CURRENT_SOURCE_DIR}\/windows\/canif\/lawicel&gt;         $&lt;$&lt;BOOL:${WIN32}&gt;:${CMAKE_CURRENT_SOURCE_DIR}\/windows\/canif\/peak&gt;         $&lt;$&lt;BOOL:${WIN32}&gt;:${CMAKE_CURRENT_SOURCE_DIR}\/windows\/canif\/vector&gt;         $&lt;$&lt;BOOL:${UNIX}&gt;:${CMAKE_CURRENT_SOURCE_DIR}\/linux&gt;         $&lt;$&lt;BOOL:${UNIX}&gt;:${CMAKE_CURRENT_SOURCE_DIR}\/linux\/canif\/socketcan&gt;)  target_link_libraries(openblt_port         PUBLIC         openblt::osLibs         PkgConfig::libusb)  target_compile_definitions(openblt_port         PUBLIC         $&lt;$&lt;STREQUAL:${CMAKE_C_COMPILER_ID},MSVC&gt;:_CRT_SECURE_NO_WARNINGS&gt;         $&lt;IF:$&lt;BOOL:${WIN32}&gt;,PLATFORM_WINDOWS,PLATFORM_LINUX&gt;         $&lt;IF:$&lt;EQUAL:${CMAKE_SIZEOF_VOID_P},4&gt;,PLATFORM_32BIT,PLATFORM_64BIT&gt;)<\/code><\/pre>\n<p>\u0421 <code>openblt::port<\/code>  \u043f\u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0442\u0430\u0440\u0433\u0435\u0442\u0430\u043c <code>openblt_shared<\/code>  \/ <code>openblt_static<\/code> . <br \/>\u042f \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0438\u0434\u0442\u0438 \u043f\u043e <code>&lt;root&gt;\/LibOpenBlt\/CMakeLists.txt<\/code> \u0444\u0430\u0439\u043b\u0443 \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438 \u0431\u0443\u0434\u0443\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e. \u041f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 &#171;overview&#187; \u043a\u043e\u0434\u0430. \u0412\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043e\u0440\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u043a\u043e\u0434\u0430 \u044f \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043a\u0440\u043e\u044e. <\/p>\n<ol>\n<li>\n<p>CMake \u043e\u043f\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u0440\u0443\u0442\u043e\u0432\u044b\u0439 CMakeLists.txt, \u0442.\u043a. \u043e\u043d\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439;<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... option(BUILD_SHARED \"Configurable to enable\/disable building of the shared library\" ON)  option(BUILD_STATIC \"Configurable to enable\/disable building of the static library\" OFF)  option(LINT_ENABLED \"Configurable to enable\/disable the PC-lint target\" OFF) ...<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0412\u044b\u0431\u043e\u0440 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u0434 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0432 <code>openblt::port<\/code> ;<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... if(WIN32)     set(PROJECT_PORT_DIR ${PROJECT_SOURCE_DIR}\/port\/windows) elseif(UNIX)     set(PROJECT_PORT_DIR ${PROJECT_SOURCE_DIR}\/port\/linux) endif(WIN32) ...<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u0440\u0443\u0442\u043e\u0432\u044b\u0439 CMakeLists.txt. \u041f\u0440\u0438\u0447\u0435\u043c \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u0445 \u0431\u0435\u0437 <code>foreach(...)<\/code>  \u0431\u043b\u043e\u043a\u0430. \u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>CMAKE_XXX_OUTPUT_DIRECTORY<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u0434\u043b\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0430 \u043d\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0431\u0438\u043b\u0434\u043e\u0432\u043e\u0433\u043e \u043a\u044d\u0448\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 MSVC \u043b\u044e\u0431\u0438\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u0432 <code>Debug<\/code> \/ <code>Release<\/code>  \u0438 \u0442\u043f \u0431\u0438\u043b\u0434-\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b. \u0418 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u043a\u043e\u0434\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <code>PROJECT_OUTPUT_DIRECTORY<\/code>  \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e \u0432 <code>set(...CACHE STRING...)<\/code> ;<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... set (PROJECT_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}\/..\/..\/..)  set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_OUTPUT_DIRECTORY} ) set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_OUTPUT_DIRECTORY} ) set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_OUTPUT_DIRECTORY} ) foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )     string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )     set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${PROJECT_OUTPUT_DIRECTORY} )     set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${PROJECT_OUTPUT_DIRECTORY} )     set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${PROJECT_OUTPUT_DIRECTORY} ) endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES ) ...<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0444\u043b\u0430\u0433\u043e\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u0417\u0434\u0435\u0441\u044c \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e. \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u044d\u0442\u043e \u0432\u044b\u043d\u0435\u0441\u0435\u0442\u0441\u044f \u0432 <code>CompolerFlags.cmake<\/code> \u0438 <code>target_compile_definitions(...)<\/code>, \u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u0442\u043e\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u0445\u043d\u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u044f\u0445;<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... if(WIN32)     if(CMAKE_C_COMPILER_ID MATCHES GNU)         if(CMAKE_SIZEOF_VOID_P EQUAL 4)             set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -DPLATFORM_WINDOWS -DPLATFORM_32BIT -D_CRT_SECURE_NO_WARNINGS -std=gnu99\")         else()             set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -DPLATFORM_WINDOWS -DPLATFORM_64BIT -D_CRT_SECURE_NO_WARNINGS -std=gnu99\")         endif()     elseif(CMAKE_C_COMPILER_ID MATCHES MSVC)         if(CMAKE_SIZEOF_VOID_P EQUAL 4)             set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -DPLATFORM_WINDOWS -DPLATFORM_32BIT -D_CRT_SECURE_NO_WARNINGS\")         else()             set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -DPLATFORM_WINDOWS -DPLATFORM_64BIT -D_CRT_SECURE_NO_WARNINGS\")         endif()     endif() elseif(UNIX)     if(CMAKE_SIZEOF_VOID_P EQUAL 4)         set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -DPLATFORM_LINUX -DPLATFORM_32BIT -pthread -std=gnu99\")     else()         set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -DPLATFORM_LINUX -DPLATFORM_64BIT -pthread -std=gnu99\")     endif() endif(WIN32)  if(WIN32)     if(CMAKE_C_COMPILER_ID MATCHES MSVC)         set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$&lt;$&lt;CONFIG:Debug&gt;:Debug&gt;\")     endif() endif(WIN32) ...<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041c\u0430\u043a\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0434\u0430\u0451\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043d\u0443\u0436\u0435\u043d. \u041d\u0435 \u043d\u0443\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e. \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430 <code>target_include_directories(...)<\/code> \u0441 \u0440\u0443\u0447\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439;<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... macro (header_directories return_list dir)     file(GLOB_RECURSE new_list ${dir}\/*.h)     set(dir_list \"\")     foreach(file_path ${new_list})         get_filename_component(dir_path ${file_path} PATH)         set(dir_list ${dir_list} ${dir_path})     endforeach()     list(REMOVE_DUPLICATES dir_list)     set(${return_list} ${dir_list}) endmacro()  header_directories(PROJECT_PORT_INC_DIRS \"${PROJECT_PORT_DIR}\") include_directories(\"${PROJECT_SOURCE_DIR}\" \"${PROJECT_PORT_INC_DIRS}\") ...<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0421\u0431\u043e\u0440 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0427\u0430\u0441\u0442\u044c \u0441\u0443\u0440\u0441\u043e\u0432 \u0443\u0436\u0435 \u0443\u0448\u043b\u0430 \u043d\u0430 <code>openblt::port<\/code> . \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c <code>file(GLOB ...)<\/code> , \u043d\u043e \u0431\u0435\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u0425\u0432\u0430\u0442\u0438\u0442 \u043a\u0438\u0434\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443, \u0435\u043c\u0443 \u0438 \u0431\u0435\u0437 \u043d\u0438\u0445 \u0442\u044f\u0436\u0435\u043b\u043e;<\/p>\n<pre><code class=\"cmake\"> &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... file(GLOB INCS_ROOT \"*.h\") file(GLOB_RECURSE INCS_PORT \"${PROJECT_PORT_DIR}\/*.h\") set(INCS ${INCS_ROOT} ${INCS_PORT})  file(GLOB SRCS_ROOT \"*.c\") file(GLOB_RECURSE SRCS_PORT \"${PROJECT_PORT_DIR}\/*.c\") set(SRCS ${SRCS_ROOT} ${SRCS_PORT})  set(         LIB_SRCS         ${SRCS}         ${INCS} ) ...<\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u0423\u043c\u0430 \u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0443, \u0437\u0430\u0447\u0435\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e OpenBlt \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043d\u043e \u0432\u0434\u0440\u0443\u0433 \u0430\u0432\u0442\u043e\u0440 \u0437\u043d\u0430\u0435\u0442 \u0447\u0442\u043e-\u0442\u043e. \u041e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u044b \u0432 \u0440\u0443\u0442\u043e\u0432\u044b\u0439 <code>CMakeLists.txt<\/code>. <br \/>* rpath \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 windows, \u0435\u0441\u043b\u0438 \u043c\u043d\u0435 \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... set(CMAKE_SKIP_BUILD_RPATH  FALSE) set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) set(CMAKE_INSTALL_RPATH \"\\$ORIGIN\") ...<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u043f.1 \u043f\u0440\u043e CMake \u043e\u043f\u0446\u0438\u0438. \u0423 CMake \u0435\u0441\u0442\u044c \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u043d\u0430 \u043e\u043f\u0446\u0438\u044e <code>CMAKE_BUILD_SHARED<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c  <code>add_library(...)<\/code> , \u0432 \u043a\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0442\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u0438 if-\u0431\u043b\u043e\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c;<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... if(BUILD_STATIC)     ... endif(BUILD_STATIC)  if(BUILD_SHARED)     ... endif(BUILD_SHARED) ...<\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043e\u0434\u043e\u0431\u0440\u044f\u044e \u0442\u0430\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0433\u0434\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e \u0442\u0438\u043f\u0443 \u0438 \u043d\u0435\u0439\u043c\u0438\u043d\u0433\u0443. \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u043f.8 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e  <code>add_library(&lt;target&gt;)<\/code>  + <code>target_sources(&lt;target&gt; PRIVATE ...)<\/code> , \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 CMake \u0441\u0430\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043e\u043f\u0446\u0438\u0438 <code>CMAKE_BUILD_SHARED<\/code> . \u0414\u043e\u0431\u0438\u0432\u0430\u0435\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043b\u0438\u0430\u0441\u0430. <\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... add_library(openblt_static STATIC ${LIB_SRCS}) ... add_library(openblt_shared SHARED ${LIB_SRCS}) ...<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443 \u043e-\u043e-\u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e \u0442\u0438\u043f\u0443 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0442\u043e \u0432\u043e\u0442 \u0432\u0430\u043c  \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cmake\"># example  add_library(openblt OBJECT) add_library(openblt::obj ALIAS openblt)  target_sources(openblt         PRIVATE ...)  target_include_directories(openblt         PUBLIC ...         PRIVATE ...)  target_link_libraries(openblt         PUBLIC ...         PRIVATE ...)  add_library(openblt_static STATIC)   add_library(openbly_shared SHARED)<\/code><\/pre>\n<p>\u041b\u0438\u0431\u043e, \u043a\u0430\u043a \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0434\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0435 CMake:<\/p>\n<pre><code class=\"cmake\"># example  option(BUILD_SHARED_LIBS \"...\" OFF)  add_library(openblt) add_library(openblt::openblt ALIAS openblt)  target_sources(openblt         PRIVATE ...)  target_include_directories(openblt         PUBLIC ...         PRIVATE ...)  target_link_libraries(openblt         PUBLIC ...         PRIVATE ...)  set_target_properties(openblt         PROPERTIES         POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS})<\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0443\u0436\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u043a <code>openblt::port<\/code> , \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u0442\u043e\u0436\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u043c;<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... if(UNIX)     target_link_libraries(openblt_shared usb-1.0 dl) elseif(WIN32)     target_link_libraries(openblt_shared ws2_32 winusb setupapi) endif(UNIX) ...<\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u0425\u0430\u0440\u0434\u043a\u043e\u0434 \u0438\u043c\u0435\u043d\u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 &#8212; \u043e\u0447\u0435\u043d\u044c \u0441\u043f\u043e\u0440\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u042f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435 \u043f\u043e\u043d\u044f\u043b, \u0437\u0430\u0447\u0435\u043c \u0442\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u043b \u0430\u0432\u0442\u043e\u0440 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b \u044d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430  <code>$&lt;$&lt;STREQUAL:${CMAKE_C_COMPILER_ID},MSVC&gt;:lib&gt;openblt<\/code> . \u041d\u043e \u043f\u043e\u0442\u043e\u043c \u044f \u0443\u0432\u0438\u0434\u0435\u043b, \u0447\u0442\u043e \u0446\u0435\u043b\u044c <code>BootCommander<\/code> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442 <code>LibOpenBlt<\/code> \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0442\u0438. \u0410 <code>CLEAN_DIRECT_OUTPUT<\/code> &#8212; \u044d\u0442\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442. \u041f\u043e \u0438\u0442\u043e\u0433\u0443, \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0442.\u043a. \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <code>LibOpenBlt<\/code> \u0431\u0443\u0434\u0435\u0442 \u043f\u043e CMake \u0442\u0430\u0440\u0433\u0435\u0442\u0443;<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... if(CMAKE_C_COMPILER_ID MATCHES MSVC)     SET_TARGET_PROPERTIES(openblt_shared PROPERTIES OUTPUT_NAME libopenblt CLEAN_DIRECT_OUTPUT 1) else()     SET_TARGET_PROPERTIES(openblt_shared PROPERTIES OUTPUT_NAME openblt CLEAN_DIRECT_OUTPUT 1) endif() ...<\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0437\u043e\u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 <code>lint<\/code> \u0434\u043b\u044f \u043d\u0430\u0442\u0440\u0430\u0432\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438. \u041f\u043e \u0445\u043e\u0434\u0443 \u043f\u044c\u0435\u0441\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0442\u0430\u0440\u0433\u0435\u0442\u044b \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 CMake \u0442\u0430\u0440\u0433\u0435\u0442\u044b \u0430-\u043b\u044f <code>&lt;target&gt;_LINT<\/code> (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>openblt_LINT<\/code>). \u042f \u0434\u043e\u043b\u0433\u043e \u043d\u0435 \u043c\u043e\u0433 \u043f\u043e\u043d\u044f\u0442\u044c, \u0437\u0430\u0447\u0435\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u043d\u0443\u0436\u0435\u043d \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u0435 (LibOpenBlt, BootCommander, SeedNKey) \u043b\u0435\u0436\u0438\u0442 \u0441\u0432\u043e\u044f lint \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0438 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0442\u0434, \u043d\u043e \u043f\u043e \u0438\u0442\u043e\u0433\u0443 \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0448\u043b\u043e. \u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0447\u0442\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u043c\u044b \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435. <\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... if(LINT_ENABLED)     if(CMAKE_C_COMPILER_ID MATCHES GNU)         include(${PROJECT_SOURCE_DIR}\/lint\/gnu\/pc_lint.cmake)     elseif(CMAKE_C_COMPILER_ID MATCHES MSVC)         include(${PROJECT_SOURCE_DIR}\/lint\/msvc\/pc_lint.cmake)     endif()      if(COMMAND add_pc_lint)         add_pc_lint(openblt ${LIB_SRCS})     endif(COMMAND add_pc_lint) endif(LINT_ENABLED) ...<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0436\u0435 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043d\u0435\u0436\u0435\u043b\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f:<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt  cmake_minimum_required(VERSION 3.15)  project(LibOpenBLT         LANGUAGES C)  # ----------------- # #   openblt::port   # # ----------------- # add_subdirectory(port)  # ----------- # #   openblt   # # ----------- # add_library(openblt) add_library(openblt::openblt ALIAS openblt)  set_target_properties(openblt         PROPERTIES         POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS})  target_include_directories(openblt         PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})  file(GLOB Sources ${CMAKE_CURRENT_SOURCE_DIR}\/*.c)  target_sources(openblt         PRIVATE ${Sources})  target_link_libraries(openblt         PUBLIC         openblt::port         openblt::osLibs)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0444\u043b\u0430\u0433\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>CompilerFlags.cmake<\/code> . \u0424\u043b\u0430\u0433\u0438 \u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b \u043a\u0430\u043a \u0443 \u0430\u0432\u0442\u043e\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435, \u0430 \u0432\u043e\u0442 \u0434\u0435\u0444\u0430\u0439\u043d\u044b \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043a \u0446\u0435\u043b\u0438 <code>openblt::port<\/code> .<\/p>\n<pre><code class=\"cmake\">#&lt;root&gt;\/cmake\/CompilerFlags.cmake  cmake_minimum_required(VERSION 3.15)  if (CMAKE_C_COMPILER_ID MATCHES GNU)     set(CompilerFlag \"-std=gnu99\") elseif (CMAKE_C_COMPILER_ID MATCHES MSVC)     # Configure a statically linked run-time library for msvc     set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$&lt;$&lt;CONFIG:Debug&gt;:Debug&gt;\") endif ()  if (UNIX)     set(PlatformFlag \"-pthread\") endif ()  list(APPEND CMAKE_C_FLAGS ${CompilerFlag} ${PlatformFlag})<\/code><\/pre>\n<pre><code class=\"cmake\">#&lt;root&gt;\/CMakeLists.txt ... # ------------------ # #   Compiler flags   # # ------------------ # list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}\/cmake) include(CompilerFlags) ...<\/code><\/pre>\n<pre><code class=\"cmake\">#&lt;root&gt;\/LibOpenBlt\/port\/CMakeLists.txt ... target_compile_definitions(openblt_port         PUBLIC         $&lt;$&lt;STREQUAL:${CMAKE_C_COMPILER_ID},MSVC&gt;:_CRT_SECURE_NO_WARNINGS&gt;         $&lt;IF:$&lt;BOOL:${WIN32}&gt;,PLATFORM_WINDOWS,PLATFORM_LINUX&gt;         $&lt;IF:$&lt;EQUAL:${CMAKE_SIZEOF_VOID_P},4&gt;,PLATFORM_32BIT,PLATFORM_64BIT&gt;) ...<\/code><\/pre>\n<p>\u0421 \u0446\u0435\u043b\u044f\u043c\u0438 <code>openblt<\/code> \u0438 <code>openblt::port<\/code> \u043f\u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043e. \u041e\u043d\u0438 \u0432\u0441\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0431\u0438\u043b\u0434\u044f\u0442\u0441\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0440\u0430 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c.<\/p>\n<p><a class=\"anchor\" name=\"bootCommander\" id=\"bootCommander\"><\/a><\/p>\n<h2>BootCommander<\/h2>\n<p>\u041d\u0435 \u0431\u0443\u0434\u0443 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043d\u043d\u0443 \u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u043e\u0439 &#171;overview&#187; \u043f\u043e <code>&lt;root&gt;\/LibOpenBlt\/CMakeLists.txt<\/code>  \u0438, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u0441\u0435 \u0442\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f CMake \u0442\u0430\u0440\u0433\u0435\u0442\u0430 <code>BootCommander<\/code> .<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/BootCommander\/CMakeLists.txt  cmake_minimum_required(VERSION 3.15)  project(BootCommander         LANGUAGES C)  # ----------------- # #   BootCommander   # # ----------------- # add_executable(BootCommander)  target_sources(BootCommander         PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}\/main.c)  target_link_libraries(BootCommander         PRIVATE openblt::openblt)<\/code><\/pre>\n<pre><code class=\"cmake\"># &lt;root&gt;\/CMakeLists.txt ... # ----------------- # #   BootCommander   # # ----------------- # add_subdirectory(BootCommander) ...<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451. \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e <code>LibOpenBlt<\/code> \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0430\u0440\u0433\u0435\u0442\u044b \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<p><a class=\"anchor\" name=\"seednkey\" id=\"seednkey\"><\/a><\/p>\n<h2>SeedNKey<\/h2>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441 \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u043c <code>BootCommander<\/code> \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 CMake \u0444\u0430\u0439\u043b\u0430 \u0438\u043c\u0435\u0435\u0442 \u0443\u0436\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440.<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/SeedNKey\/CMakeLists.txt  cmake_minimum_required(VERSION 3.15)  project(SeedNKey         LANGUAGES C)  # ------------ # #   SeedNKey   # # ------------ # add_library(seednkey) add_library(openblt::seednkey ALIAS seednkey)  target_sources(seednkey         PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}\/seednkey.c)  target_include_directories(seednkey         PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})  set_target_properties(seednkey         PROPERTIES         POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS})<\/code><\/pre>\n<pre><code class=\"cmake\"># &lt;root&gt;\/CMakeLists.txt ... # ------------ # #   SeedNKey   # # ------------ # add_subdirectory(SeedNKey) ...<\/code><\/pre>\n<p><a class=\"anchor\" name=\"lint\" id=\"lint\"><\/a><\/p>\n<h2>Lint<\/h2>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u041d\u0430\u0447\u043d\u0443 \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u0441\u0435\u0445 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439 <code>lint<\/code>-a:<\/p>\n<pre><code>&lt;root&gt;     |-- LibOpenBlt         |-- lint             |-- msvc                 |-- pc_lint.cmake                 |-- ...             |-- gnu                 |-- pc_lint.cmake                 |-- ...         |-- CMakeLists.txt     |-- BootCommander         |-- lint             |-- msvc                 |-- pc_lint.cmake                 |-- ...             |-- gnu                 |-- pc_lint.cmake                 |-- ...         |-- CMakeLists.txt     |-- SeedNKey         |-- lint             |-- msvc                 |-- pc_lint.cmake                 |-- ...             |-- gnu                 |-- pc_lint.cmake                 |-- ...         |-- CMakeLists.txt<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0441\u043a\u0440\u0438\u043f\u0442, \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0444\u0430\u0439\u043b\u044b. <\/p>\n<pre><code class=\"cmake\"># pc_lint.cmake  set(PC_LINT_EXECUTABLE \"C:\/Lint\/lint-nt.exe\" CACHE STRING \"full path to the pc-lint executable. NOT the generated lin.bat\") set(PC_LINT_CONFIG_DIR \"${PROJECT_SOURCE_DIR}\/lint\/msvc\" CACHE STRING \"full path to the directory containing pc-lint configuration files\") set(PC_LINT_USER_FLAGS \"-b\" CACHE STRING \"additional pc-lint command line options -- some flags of pc-lint cannot be set in option files (most notably -b)\")  add_custom_target(ALL_LINT)  function(add_pc_lint target)     get_directory_property(lint_include_directories INCLUDE_DIRECTORIES)     get_directory_property(lint_defines COMPILE_DEFINITIONS)      set(lint_include_directories_transformed)     foreach(include_dir ${lint_include_directories})         list(APPEND lint_include_directories_transformed -i\"${include_dir}\")     endforeach(include_dir)      set(lint_defines_transformed)     foreach(definition ${lint_defines})         list(APPEND lint_defines_transformed -d${definition})     endforeach(definition)              set(pc_lint_commands)      foreach(sourcefile ${ARGN})         if( sourcefile MATCHES \\\\.c$|\\\\.cxx$|\\\\.cpp$ )             get_filename_component(sourcefile_abs ${sourcefile} ABSOLUTE)             list(APPEND pc_lint_commands                 COMMAND ${PC_LINT_EXECUTABLE}                 -i\"${PC_LINT_CONFIG_DIR}\" std.lnt                 \"-u\" ${PC_LINT_USER_FLAGS}                 ${lint_include_directories_transformed}                 ${lint_defines_transformed}                 ${sourcefile_abs})         endif()     endforeach(sourcefile)      add_custom_target(${target}_LINT ${pc_lint_commands} VERBATIM)     add_dependencies(ALL_LINT ${target}_LINT)  endfunction(add_pc_lint) <\/code><\/pre>\n<p>\u0418 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432:<\/p>\n<pre><code class=\"cmake\"># CMakeLists.txt ... if(LINT_ENABLED)   if(CMAKE_C_COMPILER_ID MATCHES GNU)       include(${PROJECT_SOURCE_DIR}\/lint\/gnu\/pc_lint.cmake)   elseif(CMAKE_C_COMPILER_ID MATCHES MSVC)     include(${PROJECT_SOURCE_DIR}\/lint\/msvc\/pc_lint.cmake)   endif()    if(COMMAND add_pc_lint)     add_pc_lint(openblt ${LIB_SRCS})   endif(COMMAND add_pc_lint) endif(LINT_ENABLED)<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>lint<\/code> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e *.c \u0444\u0430\u0439\u043b\u0430 \u0441 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438, \u0434\u0435\u0444\u0430\u043d\u043e\u0432, \u0444\u043b\u0430\u0433\u043e\u0432 \u0434\u043b\u044f <code>lint<\/code>-a. \u041e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f, \u0442.\u043a. \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0412\u044b\u0437\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434:<\/p>\n<pre><code class=\"bash\">$ &lt;lint executable&gt; \\     [-i&lt;user config path&gt;] std.lnt \\     [-u &lt;user flags&gt;] \\     [-i&lt;include dir&gt; [-i... [...]]] \\     [-d&lt;compile defs&gt; [-d... [...]]] \\     &lt;source file&gt;<\/code><\/pre>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 <code>add_pc_lint<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043a\u043e\u0448\u043c\u0430\u0440 \u0438 \u0443 \u043d\u0435\u0433\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u0442\u044c <a href=\"https:\/\/gitlab.kitware.com\/cmake\/community\/-\/wikis\/contrib\/macros\/PC-Lint\" rel=\"noopener noreferrer nofollow\">\u0440\u043e\u0434\u0438\u043d\u0430<\/a>.  \u042f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435 \u043c\u043e\u0433\u0443 \u043f\u043e\u043d\u044f\u0442\u044c, \u0437\u0430\u0447\u0435\u043c \u0442\u0430\u043a\u043e\u0439 &#171;\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439&#187; \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 openblt, \u043d\u043e \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c lint \u043a cmake \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u0432\u044b\u0437\u043e\u0432. <\/p>\n<p>\u0418\u0437 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>&lt;subproject&gt;\/lint<\/code> \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0432 <code>&lt;root&gt;\/lint<\/code> \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0451 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>&lt;root&gt;     |-- lint         |-- msvc             |-- ...         |-- gnu             |-- ...     |-- CMakeLists.txt     |-- pc_lint.cmake<\/code><\/pre>\n<pre><code class=\"cmake\"># &lt;root&gt;\/lint\/CMakeLists.txt  cmake_minimum_required(VERSION 3.15)  project(Lint     LANGUAGES NONE)  list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) include(pc_lint)<\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c <code>pc-lint.cmake<\/code> . \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u043c\u043e\u0438\u0445 \u043c\u044b\u0441\u043b\u044f\u0445 \u0437\u0430\u0438\u0433\u0440\u0430\u043b \u043a\u0440\u0430\u0441\u043a\u0430\u043c\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d:<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/lint\/pc_lint.cmake ... include(CMakeParseArguments)  function(add_pc_lint)     set(multiValueArgs TARGETS)     set(oneValueArgs NAME)      cmake_parse_arguments(ARG             \"${options}\"             \"${oneValueArgs}\"             \"${multiValueArgs}\"             ${ARGN})      foreach (Target ${ARG_TARGETS})         get_target_property(Target_Sources                 ${Target} SOURCES)          foreach (Source_File ${Target_Sources})             list(APPEND Pc_Lint_Commands                     COMMAND ${PC_LINT_EXECUTABLE}                     -i\"${PC_LINT_CONFIG_DIR}\" std.lnt                     \"-u\" ${PC_LINT_USER_FLAGS}                     $&lt;LIST:TRANSFORM,$&lt;TARGET_PROPERTY:${Target},INCLUDE_DIRECTORIES&gt;,PREPEND,-i&gt;                     $&lt;LIST:TRANSFORM,$&lt;TARGET_PROPERTY:${Target},COMPILE_DEFINITIONS&gt;,PREPEND,-d&gt;                     ${Source_File})         endforeach ()     endforeach ()<\/code><\/pre>\n<p>\u041d\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u043c\u0435\u043b\u0430 \u0434\u0435\u0444\u0435\u043a\u0442\u044b. \u0427\u0430\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 <code>foreach()<\/code> \u0431\u043b\u043e\u043a\u0430:<\/p>\n<pre><code class=\"bash\">$ lint-nt.exe \\       -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/msvc\\\" std.lnt \\       -u -b \\       \"-i\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT; \\       -i\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/common; \\       -i\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/interface; \\       -i; \\       -i; \\       -i; \\       -i; \\       -i; \\       -i; \\       -i\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/linux; \\       -i\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/linux\/canif\/socketcan; \\       -i\/opt\/homebrew\/Cellar\/libusb\/1.0.27\/include\/libusb-1.0\" \\       \"-d; \\       -dPLATFORM_LINUX; \\       -dPLATFORM_64BIT\" \\       \/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/firmware.c<\/code><\/pre>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043a\u0443\u0447\u0430 \u043f\u0443\u0441\u0442\u044b\u0445 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u0432 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 <code>$&lt;$&lt;BOOL:${var}&gt;:...&gt;<\/code> ;<br \/>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0430\u0451\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0438\u0434\u0430 <code>command \"[options1]\" \"[options2]\"... <\/code>&#171;, \u0430 CLI \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0449\u0430\u0435\u0442;<br \/>\u0412-\u0442\u0440\u0435\u0442\u044c\u0438\u0445,  \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0430 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 CMake \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432\u0438\u0434\u0430 &#171;<code>-i...;-i...;-i...<\/code>&#171;, \u0430 CLI \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0432\u0434\u0432\u043e\u0439\u043d\u0435.<\/p>\n<p>\u0415\u0441\u043b\u0438, \u0432 \u0446\u0435\u043b\u043e\u043c, \u044d\u0442\u0438 \u043f\u0443\u043d\u043a\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>add_custom_target(... COMMAND ... COMMAND_EXPAND_LISTS ...)<\/code>  \u0438 <code>$&lt;LIST:REMOVE_ITEM,...&gt;<\/code> , \u043d\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u0432\u0438\u0434 \u043e\u043f\u0446\u0438\u0438 <code>[-ipath\/to\/include\/dir]<\/code> . \u0412\u043e\u0437\u044c\u043c\u0438\u0442\u0435 \u043f\u0430\u0443\u0437\u0443 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u0435 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442. <br \/>\u041a\u0430-\u0432\u044b-\u0447\u043a\u0438. \u0415\u0441\u043b\u0438 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442 \u043b\u0435\u0436\u0438\u0442 \u0432 <code>path to\/include\/dir\/<\/code> , \u0442\u043e \u0435\u0441\u0442\u044c \u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u043e\u0431\u0435\u043b\u044b, \u0442\u043e CLI \u0443\u043f\u0430\u0434\u0451\u0442, \u0442.\u043a. \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0431\u0451\u0440\u043d\u0443\u0442\u0430 \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0438.<\/p>\n<p>\u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u043e\u0441\u0430\u0431\u043b\u0438\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438, \u044f \u043d\u0435 \u043c\u043e\u0433\u0443 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0437\u0436\u0438\u0440\u0435\u0432\u0448\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439.  \u0421\u0435\u0439\u0447\u0430\u0441 \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u043c\u0443 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u043e\u043b\u044c\u043d\u043e. <\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/lint\/pc_lint.cmake ... list(APPEND Pc_Lint_Commands         COMMAND ${PC_LINT_EXECUTABLE}         -i\"${PC_LINT_CONFIG_DIR}\" std.lnt         \"-u\" ${PC_LINT_USER_FLAGS}         $&lt;LIST:REMOVE_ITEM,$&lt;LIST:REMOVE_DUPLICATES,$&lt;LIST:TRANSFORM,$&lt;TARGET_PROPERTY:${Target},INCLUDE_DIRECTORIES&gt;,PREPEND,-i&gt;&gt;,-i&gt;         # prepend each definition with \"-d\"         $&lt;LIST:REMOVE_ITEM,$&lt;LIST:TRANSFORM,$&lt;TARGET_PROPERTY:${Target},COMPILE_DEFINITIONS&gt;,PREPEND,-d&gt;,-d&gt;         ${Source_File}) ...<\/code><\/pre>\n<p>\u0421\u043f\u043e\u0439\u043b\u0435\u0440: \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c append\/prepend \u043a\u0430\u0432\u044b\u0447\u0435\u043a, \u0442\u043e \u0434\u043b\u0438\u043d\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 182 \u0441\u0438\u043c\u0432\u043e\u043b\u0430.<br \/>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u043d\u043e, \u0442\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0445\u0430\u0431\u0440\u0430. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0443 \u0432\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0443\u0437\u0438\u043b\u0441\u044f \u044d\u0442\u043e\u0442 \u0443\u0436\u0430\u0441. <\/p>\n<p>\u041b\u0430\u0434\u043d\u043e, \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c. <code>$&lt;LIST:REMOVE_ITEM,...&gt;<\/code> \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c <code>$&lt;LIST:REMOVE_DUPLICATES,...&gt;<\/code> , \u0442.\u043a. \u043e\u043d \u043f\u043e\u0434\u0447\u0438\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 <code>-d<\/code> \u0438 <code>-i<\/code>  . \u041d\u043e \u0435\u0441\u043b\u0438 \u044f \u0432\u0441\u0442\u0440\u043e\u044e \u0435\u0449\u0435 <code>APPEND<\/code> \/ <code>PREPEND<\/code> \u0434\u043b\u044f \u043a\u0430\u0432\u044b\u0447\u0435\u043a, \u0442\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u0441\u044f \u0431\u0435\u0437\u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043d\u043e. <\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u043c \u0438 \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u043b\u043e \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0438 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u0442\u0430\u043b\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0433\u0447\u0435. <\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/lint\/pc_lint.cmake ... function(add_pc_lint)     set(oneValueArgs TARGET NAME)      cmake_parse_arguments(ARG             \"${options}\"             \"${oneValueArgs}\"             \"${multiValueArgs}\"             ${ARGN})      get_target_property(Target_Sources             ${ARG_TARGET} SOURCES)      # Original include files     set(Include_Files $&lt;TARGET_PROPERTY:${ARG_TARGET},INCLUDE_DIRECTORIES&gt;)     # Append\/prepend '\\\"' for each file     set(Include_Files $&lt;LIST:TRANSFORM,${Include_Files},APPEND,\\\"&gt;)     set(Include_Files $&lt;LIST:TRANSFORM,${Include_Files},PREPEND,\\\"&gt;)     # Prepend '-i' to each file     set(Include_Files $&lt;LIST:TRANSFORM,${Include_Files},PREPEND,-i&gt;)     # Remove empty '-i\"\"' from list     set(Include_Files $&lt;LIST:REMOVE_ITEM,${Include_Files},-i\\\"\\\"&gt;)      # Original definitions     set(Definitions $&lt;TARGET_PROPERTY:${ARG_TARGET},COMPILE_DEFINITIONS&gt;)     # Append\/prepend '\\\"' for each definition     set(Definitions $&lt;LIST:TRANSFORM,${Definitions},APPEND,\\\"&gt;)     set(Definitions $&lt;LIST:TRANSFORM,${Definitions},PREPEND,\\\"&gt;)     # Prepend -d for each definition     set(Definitions $&lt;LIST:TRANSFORM,${Definitions},PREPEND,-d&gt;)     # Remove empty '-d' from list     set(Definitions $&lt;LIST:REMOVE_ITEM,${Definitions},-d\\\"\\\"&gt;)      foreach (Source_File ${Target_Sources})         list(APPEND Pc_Lint_Commands                 COMMAND ${PC_LINT_EXECUTABLE}                 -i\"${PC_LINT_CONFIG_DIR}\" std.lnt                 \"-u\" ${PC_LINT_USER_FLAGS}                 ${Include_Files}                 ${Definitions}                 ${Source_File})     endforeach ()      # add a custom target consisting of all the commands generated above     add_custom_target(${ARG_NAME} ${Pc_Lint_Commands} COMMAND_EXPAND_LISTS VERBATIM)     # make the ALL_LINT target depend on each and every *_LINT target     add_dependencies(ALL_LINT ${ARG_NAME}) endfunction()<\/code><\/pre>\n<pre><code class=\"cmake\"># &lt;root&gt;\/lint\/CMakeLists.txt  cmake_minimum_required(VERSION 3.15)  project(Lint         LANGUAGES NONE)  list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) include(pc_lint)  # ---------------- # #   openblt_LINT   # # ---------------- # add_pc_lint(TARGET openblt NAME openblt_LINT)  # ----------------------- # #    BootCommander_LINT   # # ----------------------- # add_pc_lint(TARGET BootCommander NAME BootCommander_LINT)  # ----------------- # #   seednkey_LINT   # # ----------------- # add_pc_lint(TARGET seednkey NAME seednkey_LINT)<\/code><\/pre>\n<p>\u0418\u043c\u0435\u0435\u0442 \u043b\u0438 \u0441\u043c\u044b\u0441\u043b \u0441\u043c\u0435\u043d\u0430 \u0442\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>add_pc_lint<\/code> \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432\u0441\u0435\u0439 <code>lint<\/code> \u0447\u0430\u0441\u0442\u0438 \u0432 \u0440\u0443\u0442\u043e\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e? \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044e \u0441\u0430\u043c\u044b\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b:<\/p>\n<ul>\n<li>\n<p>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 <code>foreach()<\/code> + <code>list(&lt;option&gt; ...)<\/code> , \u0442.\u043a. \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0441\u0442\u0440\u043e\u0447\u043a\u0438: \u043a\u043e\u043c\u043c\u0435\u043d\u0442 &#171;\u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c?&#187; \u0438 \u043a\u043e\u0434 &#171;\u0434\u0435\u043b\u0430\u0435\u043c&#187;;<\/p>\n<\/li>\n<li>\n<p>\u0412\u043d\u0435\u0441\u0435\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043a\u0430\u0432\u044b\u0447\u0435\u043a \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u043e API \u043f\u043e\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e <code>_LINT<\/code> \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>get_directory_property(...)<\/code>  \u043d\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0442\u0430\u0440\u0433\u0435\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 <code>get_target_property(...)<\/code>  \u0438 <code>$&lt;TARGET_PROPERTY:&lt;target&gt;,&lt;property&gt;<\/code> ;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code>add_pc_lint<\/code> \u0432 \u0440\u0443\u0442\u043e\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0451 \u0438\u0437 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0443\u0439\u0442\u0438 \u043e\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0438 \u0444\u0430\u0439\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f <code>add_pc_lint<\/code> \u0438\u043c\u0435\u043b\u0430 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a: \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f  \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0430 \u043d\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0442\u0430\u0440\u0433\u0435\u0442\u0430. <br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>BootCommander<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <code>openblt::openblt<\/code>. \u0415\u0441\u043b\u0438 \u043c\u044b \u043d\u0430\u0442\u0440\u0430\u0432\u0438\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043d\u0430 <code>BootCommander<\/code> , \u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u0432\u044b\u0442\u0430\u0449\u0438\u0442 \u0438\u0437 \u0435\u0433\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0434\u0435\u0444\u0430\u0439\u043d\u044b, \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 <code>openblt::openblt<\/code> . \u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0436\u0435 \u0432\u0435\u0440\u0441\u0438\u044f <code>add_pc_lint<\/code>  \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u0442\u0430\u0440\u0433\u0435\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438 \u0434\u0435\u0444\u0430\u0439\u043d\u044b, \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430.<br \/>\u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u0444\u0430\u0439\u043d\u044b \u0438 \u043f\u0443\u0442\u0438 \u043a \u0445\u0438\u0434\u0435\u0440\u0430\u043c \u0434\u0430\u0436\u0435 libusb;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u044d\u0442\u0430\u043f CMake \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435\u043c \u0433\u0435\u043d\u0435\u043d\u0430\u0440\u0430\u0446\u0438\u0438 \u043a\u044d\u0448\u0430. <\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0445\u043e\u0434\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u043e\u0432\u044b\u0445 \u0446\u0435\u043b\u0435\u0439 <code>&lt;target&gt;_LINT<\/code> \u0438\u043c\u0435\u0435\u0442 \u0443\u0436\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"bash\"># \u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0437\u043e\u0432\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430 firmware.c \u0438\u0437 \u0442\u0430\u0440\u0433\u0435\u0442\u0430 openblt_LINT $ lint-nt.exe      -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/msvc\\\" std.lnt \\     -u -b  \\     -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\\\" \\     -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/common\\\" \\     -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/interface\\\" \\     -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/linux\\\" \\     -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/linux\/canif\/socketcan\\\" \\      -i\\\"\/opt\/homebrew\/Cellar\/libusb\/1.0.27\/include\/libusb-1.0\\\" \\     -dPLATFORM_LINUX \\     -dPLATFORM_64BIT \\     \\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/firmware.c\\\"   # \u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0437\u043e\u0432\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430 main.c \u0438\u0437 \u0442\u0430\u0440\u0433\u0435\u0442\u0430 BootCommander_LINT $ lint-nt.exe      -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/msvc\\\" std.lnt \\     -u -b \\     -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\\\" \\     -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/common\\\" \\     -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/interface\\\" \\     -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/linux\\\" \\     -i\\\"\/Users\/worhyako\/Coding\/OpenBlt\/Host\/Source\/LibOpenBLT\/port\/linux\/canif\/socketcan\\\" \\     -i\\\"\/opt\/homebrew\/Cellar\/libusb\/1.0.27\/include\/libusb-1.0\\\" \\     -dPLATFORM_LINUX \\     -dPLATFORM_64BIT \\     \\\"main.c\\\"  <\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043f\u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043e.<\/p>\n<p><a class=\"anchor\" name=\"outro\" id=\"outro\"><\/a><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>OpenBlt \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u043c \u043c\u0430\u043d\u0435\u043a\u0435\u043d\u043e\u043c \u0434\u043b\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 CMake \u043d\u0430\u0432\u044b\u043a\u043e\u0432, \u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0421\/\u0421++ \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438, \u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u043b\u0430\u0441\u044c \u0432 \u0440\u0430\u0437\u044b.<\/p>\n<details class=\"spoiler\">\n<summary>\u0410\u0443\u0442\u0440\u043e \u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u044c\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u0434\u043e\u0448\u043b\u0430 \u043a \u043a\u043e\u043d\u0446\u0443 \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0414\u043d\u0435\u0432\u043d\u0438\u043a\u0430 \u0430\u043b\u044c\u0442\u0440\u0443\u0438\u0441\u0442\u0430.<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u0421\u0438\/\u0421++ \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433\u0430 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430. \u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0446\u0435\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0441\u0435\u0432\u0434\u043e-\u0433\u0430\u0439\u0434\u0430 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438. \u041e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043a\u0435\u0439\u0441\u043e\u0432 \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e. \u0427\u0442\u043e \u0435\u0449\u0451 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442&#8230; \u0421\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0434 gcc-arm-none-eabi \u0438 STM32? CMake\/C#\/C++ \u043f\u0440\u043e\u0435\u043a\u0442? CMake\/C\/Python \u043f\u0440\u043e\u0435\u043a\u0442? \u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 CMake \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u0434\u043a\u043e, \u0438 \u0438\u0445 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f &#8212; \u0441\u043a\u043e\u0440\u0435\u0435 \u0430\u0431\u0441\u0443\u0440\u0434, \u0447\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043d\u043e\u0435.<\/p>\n<p>\u0417\u0430\u043a\u043e\u043d\u0447\u0443 \u0430\u0443\u0442\u0440\u043e \u0446\u0438\u0442\u0430\u0442\u043e\u0439 \u0438\u0437 \u043f\u0435\u0441\u043d\u0438 &#171;<strong>\u0421\u043e\u0431\u0438\u0440\u0430\u0442\u0435\u043b\u044c \u043b\u0435\u0433\u0435\u043d\u0434 &#8212; Norma Tale, \u043d\u043e\u0447\u043d\u043e\u0439 \u043a\u0430\u0440\u0430\u0441\u044c<\/strong>&#171;:<\/p>\n<blockquote>\n<p>&#171;\u041c\u043e\u044f \u0441\u0442\u0440\u0430\u043d\u043d\u0430\u044f \u043c\u0443\u0437\u0430 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043b\u044e\u0431\u0438\u043b\u0430,<br \/>\u041d\u043e \u043f\u044b\u0442\u0430\u043b\u0430\u0441\u044c \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0438\u043b\u043e\u0439&#187;<\/p>\n<\/blockquote>\n<p> \u041a\u0430\u043a \u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043c\u043e\u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441 CMake. \ud83d\ude00<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0421\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441?<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 CMakeLists.txt \u0444\u0430\u0439\u043b\u0430 <code>foo\/CMakeLists.txt<\/code> \u0438 <code>bar\/CMakeLists.txt<\/code> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"cmake\"># foo\/CMakeLists.txt  project(example         LANGUAGES CXX C ASM)  set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ...) set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ...) set(CMAKE_C_LINK_FLAGS ${CMAKE_C_LINK_FLAGS} ...) set(CMAKE_ASM_FLAGS ${CMAKE_ASM_FLAGS} ...) ...<\/code><\/pre>\n<pre><code class=\"cmake\"># bar\/CMakeLists.txt  set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ...) set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ...) set(CMAKE_C_LINK_FLAGS ${CMAKE_C_LINK_FLAGS} ...) set(CMAKE_ASM_FLAGS ${CMAKE_ASM_FLAGS} ...)  project(example         LANGUAGES CXX C ASM) ...<\/code><\/pre>\n<p>\u0412 \u0447\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c <code>CMAKE_XXX_FLAGS<\/code> \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0444\u0430\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0435?<br \/>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430:<\/p>\n<pre><code class=\"cmake\"># hint  project(hint         LANGUAGES NONE)<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>P.S. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0438\u043b\u0438 \u043b\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435, \u043d\u043e \u0438\u0445 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0445 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0432\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u0434\u043e\u043c.<\/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\/860736\/\"> https:\/\/habr.com\/ru\/articles\/860736\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/feaser\/openblt\" rel=\"noopener noreferrer nofollow\">OpenBlt<\/a> \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438 CMake. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043d\u0435 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043b\u0438 \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043b\u0443\u0447\u0448\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0443\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0447\u0435\u043c \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043c\u0438\u0440\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u043e\u043d\u043d\u043e\u0439 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0438 \u043d\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e cmake \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 &#8212; \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0433\u0447\u0435 \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435, \u0447\u0435\u043c \u043e\u043d\u0438 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434.<br \/>* \u0418 \u0434\u0430, \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u0438 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439, \u0438 \u043d\u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0437\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0436\u0430\u043b\u043e\u0431\u0443 \u043d\u0430 Kitware \u043f\u043e\u0434\u0430\u0442\u044c. \ud83d\ude00<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0430\u043a\u0446\u0438\u044f \u043c\u043e\u0435\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u043d\u0430 \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043c\u043e\u0438\u043c \u0444\u043e\u0440\u043a\u043e\u043c <a href=\"https:\/\/github.com\/WorHyako\/openblt\/tree\/arch\/cmake\" rel=\"noopener noreferrer nofollow\">WorHyako\/openblt<\/a> (tree: <code>arch\/cmake<\/code>). \u0415\u0441\u043b\u0438 \u0442\u0430\u043c \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b, \u0442\u043e \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438. <br \/>\u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0430\u0436\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c PR \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043e\u0440\u0430, \u0435\u0441\u043b\u0438 \u043e\u043d \u043f\u043e\u0447\u0442\u0438\u0442 \u043c\u0435\u043d\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u043c. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0414\u0438\u0444\u0444 \u0444\u043e\u0440\u043a\u0430 \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0438\u0437 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438. <\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0435 \u043a\u0440\u0435\u043f\u043a\u0438\u0435 \u043d\u0430\u0432\u044b\u043a\u0438 \u0441 CMake: \u0442\u0430\u0440\u0433\u0435\u0442\u044b \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/module\/CMakeParseArguments.html#module:CMakeParseArguments\" rel=\"noopener noreferrer nofollow\">CMakeParseArguments<\/a>, <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/module\/CMakePrintHelpers.html\" rel=\"noopener noreferrer nofollow\">CMakePrintHelpers<\/a> \u0438 <a href=\"https:\/\/cmake.org\/cmake\/help\/latest\/module\/FindPkgConfig.html\" rel=\"noopener noreferrer nofollow\">PkgConfig<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 OpenBlt?<\/summary>\n<div class=\"spoiler__content\">\n<blockquote>\n<p>OpenBLT \u044d\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0412\u0430\u043c \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0412\u0430\u0448\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c firmware \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438 \u0441 \u043a\u0430\u0440\u0442\u044b SD. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e OpenBLT &#8212; \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043e\u0434, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0412\u0430\u0448\u0438\u043c\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438. <\/p>\n<p>(c) microsin<\/p>\n<\/blockquote>\n<p>\u042d\u0442\u0430 \u0446\u0438\u0442\u0430\u0442\u0430 &#8212; \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0431\u0437\u0430\u0446 \u043d\u0430 <a href=\"https:\/\/microsin.net\/programming\/arm\/openblt-bootloader.html\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a> \u0441\u0430\u0439\u0442\u0430 microsin.net. \u041e\u043d\u0430 (\u0446\u0438\u0442\u0430\u0442\u0430) \u0434\u0430\u0451\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0441 \u043a\u0430\u043a\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0436\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435, \u0433\u0438\u043f\u0435\u0440\u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043f\u0440\u0438\u0432\u0451\u043b. \u0421\u0430\u0439\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0451\u043c\u043a\u043e \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.  <\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0447\u0435\u043c \u0442\u0440\u043e\u0433\u0430\u0442\u044c OpenBlt?<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042f, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u0434 <a href=\"https:\/\/github.com\/feaser\/openblt\" rel=\"noopener noreferrer nofollow\">OpenBlt<\/a>, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043d\u0438\u043c. \u041c\u043e\u0451 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u043f\u0440\u0438\u0432\u043b\u0451\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u0430\u0431\u0440\u0430 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u0432 GitHub 200+ \u0444\u043e\u0440\u043a\u043e\u0432, \u043d\u043e \u043d\u043e\u043b\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u043e \u0441\u0443\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044f \u043d\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0438\u0445, &#8212; \u043a\u0430\u043a \u0441\u0435\u0439\u0447\u0430\u0441 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043c\u043e\u043b\u043e\u0434\u0435\u0436\u044c &#171;100% \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, 0% \u043e\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f&#187;. <\/p>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434 \u043b\u044e\u0431\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043d\u0430 \u0421\u0438: \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u0438\u0431\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u0435, \u043b\u0438\u0431\u043e \u0432\u0435\u043a \u043d\u0430\u0437\u0430\u0434, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0451.<\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u0436\u0435 \u0442\u043e\u0433\u0434\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442?<br \/>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0430\u0432\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u043d\u0435 \u0432\u043d\u043e\u0441\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442, \u0430 \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044f \u043d\u0435 \u0441\u043c\u043e\u0433 \u0443\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0445\u0430\u0431\u0440\u0430. \ud83d\ude00<\/p>\n<blockquote>\n<p>\u041d\u0443 \u0438 \u043f\u043e \u0442\u0435\u043c\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 openblt.<\/p>\n<p><a href=\"https:\/\/github.com\/feaser\/openblt\/\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/feaser\/openblt\/<\/a><\/p>\n<p>\u041e\u043d \u0443\u0436\u0435 \u043d\u0430 \u0441\u0438\u043c\u0435\u0439\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e <\/p>\n<p>(c) <a class=\"mention\" href=\"\/users\/mcublog\">@Mcublog<\/a><\/p>\n<\/blockquote>\n<blockquote>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u043e\u0446\u0435\u043d\u043a\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 openblt, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043b\u043e\u0442\u043d\u043e \u043e\u0434\u043d\u043e \u0432\u0440\u0435\u043c\u044f \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u0432\u043e\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f&amp;<\/p>\n<p>(c) <a class=\"mention\" href=\"\/users\/mcublog\">@Mcublog<\/a><\/p>\n<\/blockquote>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0442\u0440\u043e \u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u044c\u0438<\/summary>\n<div class=\"spoiler__content\">\n<h2>\u0417\u0430\u0447\u0435\u043c \u0431\u044b\u043b\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043e OpenBlt?<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0447\u0438\u0442\u0430\u043b\u0438 \u043c\u043e\u044e \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0442\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u043d\u0435\u0439 \u0431\u044b\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f dfu-util \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 CMake\/\u0421++, \u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0438\u043c\u0435\u043b\u0430 \u043d\u0438\u0437\u043a\u0438\u0439 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430.<\/p>\n<blockquote>\n<p>CMakeList-\u044b \u0431\u0443\u0434\u0443 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u0430\u043a \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0441\u0432\u043e\u0438\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u0431\u043e\u043b\u0435\u0435 \u0451\u043c\u043a\u043e\u0439 \u0438 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0439. <\/p>\n<p>(\u0441) <a class=\"mention\" href=\"\/users\/worhyako\">@WorHyako<\/a><\/p>\n<\/blockquote>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0446\u0435\u043b\u044c:<\/p>\n<blockquote>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e-\u0433\u0430\u0439\u0434\u043e\u043c \u043f\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u043d\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0421\u0438 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e CMakeList-\u043e\u0432. <\/p>\n<p>(c) <a class=\"mention\" href=\"\/users\/worhyako\">@WorHyako<\/a><\/p>\n<\/blockquote>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u0421\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 dfu-util \u044f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c CMake \u0442\u043e\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043f\u043b\u0430\u043d\u043a\u0443 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u043d\u043e \u043b\u0438\u0445\u043e\u0434\u0435\u0439\u043d\u0438\u0447\u0430\u0442\u044c, \u0437\u0430\u0439\u0434\u044f \u0432\u043d\u0443\u0442\u0440\u044c open-source \u043f\u0440\u043e\u0435\u043a\u0442\u0430 OpenBlt.<\/p>\n<h2>\u0421\u043d\u043e\u0432\u0430 \u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0434\u044b?<\/h2>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433\u0430 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u044f \u043c\u043e\u0433\u0443 \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0440\u044f\u0434\u0430 CMake \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u0441\u043f\u0435\u043a\u0442\u0430. \u042f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043d\u0435 \u0434\u0430\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0432\u043e\u044e \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0442.\u043a \u043b\u0443\u0447\u0448\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 &#171;<strong>Professional CMake: A Practical Guide<\/strong>&#187; \u0430\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u0430\u00a0<a href=\"https:\/\/discourse.cmake.org\/u\/craig.scott\/summary\" rel=\"noopener noreferrer nofollow\">Craig Scott<\/a>. \u0410 \u0442\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u043b \u044f \u043d\u0430 \u0434\u043e\u0441\u0443\u0433\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0430-\u043b\u044f &#171;CMake: 20 \u0441\u043e\u0432\u0435\u0442\u043e\u0432&#187;&#8230; \u0425\u0440\u0430\u043d\u0438 \u0433\u043e\u0441\u043f\u043e\u0434\u044c \u044d\u0442\u0438\u0445 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0438 \u0438\u0445 \u0442\u0438\u043c\u043b\u0438\u0434\u043e\u0432. \ud83d\ude00<\/p>\n<p>P.S. \u0414\u0430 \u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u043c\u043d\u0435 \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u0445\u0430\u0431\u0440\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430 20+ \u043c\u0438\u043d\u0443\u0442 \u0447\u0442\u0435\u043d\u0438\u044f, \u043d\u043e \u0443\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c. \ud83d\ude42<\/p>\n<\/p>\n<\/div>\n<\/details>\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<ul>\n<li>\n<p><a href=\"#projectStruct\" rel=\"noopener noreferrer nofollow\">\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#libOpenBlt\" rel=\"noopener noreferrer nofollow\">LibOpenBlt \u0442\u0430\u0440\u0433\u0435\u0442<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#bootCommander\" rel=\"noopener noreferrer nofollow\">BootCommander<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#seednkey\" rel=\"noopener noreferrer nofollow\">SeedNKey<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#lint\" rel=\"noopener noreferrer nofollow\">Lint<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#outro\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"projectStruct\" id=\"projectStruct\"><\/a><\/p>\n<h2>\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>\u0421\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/feaser\/openblt\" rel=\"noopener noreferrer nofollow\">Feaser\/OpenBlt<\/a>, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 <code>OpenBlt\/Host\/Source<\/code>, \u0442.\u043a. \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u043e\u0441\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0430\u0437\u0443 \u0441\u0434\u0435\u043b\u0430\u044e \u0440\u0435\u043c\u0430\u0440\u043a\u0443, \u0447\u0442\u043e <code>root<\/code> \/ <code>root_dir<\/code> \/ <code>\u0440\u0443\u0442\u043e\u0432\u044b\u0439<\/code> \u0438 \u043f\u0440\u043e\u0447\u0438\u043c\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u044f \u0431\u0443\u0434\u0443 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>OpenBlt\/Host\/Source<\/code>. <\/p>\n<pre><code>&lt;root&gt;     |-- BootCommander         |-- CMakeLists.txt         |-- ...     |-- LibOpenBLT         |-- CMakeLists.txt         |-- ...     |-- MicroBoot         |-- ...     |-- SeedNKey         |-- CMakeLists.txt         |-- ...<\/code><\/pre>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <code>MicroBoot<\/code> \u0442\u043e\u0436\u0435 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0447\u0435\u0433\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0442\u0435\u043c\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0439 \u0443\u0434\u0435\u043b\u044f\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443. <\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 cmake \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432:<\/p>\n<pre><code>\u0422\u0430\u0440\u0433\u0435\u0442\u044b, \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 CMakeLists-\u0430\u0445  BootCommander     |-- openblt_shared OR openblt_static seednkey_shared openblt_shared OR openblt_static     |-- usb-1.0 dl OR ws2_32 winusb setupapi ALL_LINT     |-- &lt;target&gt;_LINT<\/code><\/pre>\n<ul>\n<li>\n<p><code>BootCommander<\/code>  \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <code>openblt_shared<\/code> \/ <code>openblt_static<\/code> , \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p><code>&lt;target&gt;_LINT<\/code>  \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0446\u0435\u043b\u0438 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0444\u0430\u0439\u043b\u043e\u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/PC-Lint\" rel=\"noopener noreferrer nofollow\">lint<\/a>, \u0430 <code>ALL_LINT<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u0443\u044e <code>&lt;target&gt;_LINT<\/code> \u0446\u0435\u043b\u0435\u0439. \u041c\u0430\u043b\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0448\u0442\u0443\u043a\u0430, \u043d\u043e \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c;<\/p>\n<\/li>\n<li>\n<p><code>seednkey_shared<\/code>  \u0434\u0430\u0436\u0435 \u0441\u043c\u043e\u0433 \u0441\u0431\u0438\u043b\u0434\u0438\u0442\u044c\u0441\u044f (\u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0438 \u0432\u043e\u0442 \u043e\u043f\u044f\u0442\u044c);<\/p>\n<\/li>\n<li>\n<p><code>openblt_shared<\/code> \/ <code>openblt_static<\/code> \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u0443\u043f\u0430\u043b \u0432 \u043e\u0448\u0438\u0431\u043a\u0443, \u0442.\u043a. \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0421 \u043d\u0435\u0433\u043e \u0438 \u043d\u0430\u0447\u043d\u0443.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"libOpenBlt\" id=\"libOpenBlt\"><\/a><\/p>\n<h2>LibOpenBlt \u0442\u0430\u0440\u0433\u0435\u0442<\/h2>\n<blockquote>\n<p>&#171;\u041f\u043e\u043d\u0435\u0441\u043b\u0430\u0441\u044c \u0434\u0443\u0448\u0430 \u0432 \u0440\u0430\u0439, \u0430 \u043d\u043e\u0433\u0438 &#8212; \u0432 \u043c\u0438\u043b\u0438\u0446\u0438\u044e&#187; (\u0441) \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u2014 \u041c.: \u041f\u0410\u0418\u041c\u0421. \u0412.\u041f. \u0411\u0435\u043b\u044f\u043d\u0438\u043d, \u0418.\u0410. \u0411\u0443\u0442\u0435\u043d\u043a\u043e. 1994<\/p>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>\u041f\u0435\u0440\u0432\u043e\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043d\u0435\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c libusb \u0442\u043e\u043b\u044c\u043a\u043e \u0432 UNIX \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 <code>usbbulk.h<\/code> \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 <code>&lt;os_name&gt;\/usbbulk.c<\/code> \u0444\u0430\u0439\u043b\u0430\u0445. <\/p>\n<pre><code class=\"cpp\">\/\/\/ ubsbulk.h ... void UsbBulkInit(void); void UsbBulkTerminate(void); bool UsbBulkOpen(void); void UsbBulkClose(void); bool UsbBulkWrite(uint8_t const * data, uint16_t length); bool UsbBulkRead(uint8_t * data, uint16_t length, uint32_t timeout); ...<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f libusb. \u0417\u0430\u0447\u0435\u043c \u0430\u0432\u0442\u043e\u0440 \u043c\u0443\u0447\u0430\u043b\u0441\u044f \u0441 WinAPI (<code>SetupAPI<\/code> + <code>WinSock2<\/code>) , \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e libusb-\u0445\u043e\u0439, \u043c\u043d\u0435 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432\u044b \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0432 libusb \u043d\u0435\u0442 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"https:\/\/gitlab.com\/dfu-util\/dfu-util\" rel=\"noopener noreferrer nofollow\">dfu-util<\/a>. \u041a\u0430\u043a\u0438\u0435 \u0442\u0430\u043c \u0444\u043e\u043a\u0443\u0441\u044b \u0441 libusb \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a &#8212; \u0432\u043e\u043b\u0448\u0435\u0431\u0441\u0442\u0432\u043e. <\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0440\u0430\u0437\u0443 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0443\u0442\u043e\u0432\u044b\u0439 (\u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <code>OpenBlt\/Host\/Source<\/code>) CMakeLists.txt, \u0430 \u043d\u0435 \u0431\u0435\u0433\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0436\u0434\u044b\u043c \u0438\u0437 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432:<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/CMakeLists.txt  cmake_minimum_required(VERSION 3.15)  project(OpenBlt)  # -------------- # #   LibOpenBlt   # # -------------- # add_subdirectory(LibOpenBLT)<\/code><\/pre>\n<p>\u0421 \u044d\u0442\u0438\u043c \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u043c \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0423 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043b\u044e\u0434\u0435\u0439 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443 \u043d\u0438\u0445 \u0432\u0435\u0441\u044c <code>$ENV:PATH<\/code> \u0443\u0442\u044b\u043a\u0430\u043d \u043f\u0443\u0442\u044f\u043c\u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0438\u043b\u0438 \u043e\u043d\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 <code>&lt;LIB&gt;_CFLAGS<\/code> \/ <code>&lt;LIB&gt;_LIBS<\/code> \/ <code>&lt;LIB&gt;_DIR<\/code> \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 (\u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0445\u0443\u0436\u0435). \u0414\u043b\u044f libusb \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0417\u0430\u043e\u0434\u043d\u043e \u0432 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b <code>ThirdParty.cmake<\/code> \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u0438 \u043f\u043e\u0438\u0441\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<pre><code class=\"cmake\"># &lt;root&gt;\/CMakeLists.txt ... list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) include(ThirdParty) ...<\/code><\/pre>\n<pre><code class=\"cmake\"># &lt;root&gt;\/cmake\/ThirdParty.cmake  cmake_minimum_required(VERSION 3.15)  # ---------- # #   libusb   # # ---------- # find_package(PkgConfig REQUIRED) pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0)  # ------------------------ # #   Collect OS libraries   # # ------------------------ # add_library(OsLibs INTERFACE) add_library(openblt::osLibs ALIAS OsLibs)  if (WIN32)     find_library(SetupApi REQUIRED             NAMES setupapi)     find_library(Ws2_32 REQUIRED             NAMES ws2_32)     find_library(WinUsb REQUIRED             NAMES winusb)      target_link_libraries(OsLibs             INTERFACE             ${SetupApi}             ${Ws2_32}             ${WinUsb}) elseif (UNIX)     find_library(Dl REQUIRED             NAMES dl)      target_link_libraries(OsLibs             INTERFACE ${Dl}) endif ()<\/code><\/pre>\n<pre><code class=\"cmake\"># &lt;root&gt;\/LibOpenBlt\/CMakeLists.txt ... target_link_libraries(openblt_static         PUBLIC         PkgConfig::libusb         openblt::osLibs) ... target_link_libraries(openblt_shared         PUBLIC         PkgConfig::libusb         openblt::osLibs) ...<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 libusb \u0445\u0438\u0434\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u0441\u043c\u0435\u043d\u043e\u0439 \u0443 \u0442\u0430\u0440\u0433\u0435\u0442\u0430 <code>PkgConfig::libusb<\/code>  \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439, \u043b\u0438\u0431\u043e \u0441\u043c\u0435\u043d\u043e\u0439 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445. \u041c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e \u0434\u0443\u0448\u0435 \u0432\u0442\u043e\u0440\u043e\u0435, \u0442\u0430\u043a \u0447\u0442\u043e:<\/p>\n<pre><code class=\"cpp\">\/\/ &lt;root&gt;\/LibOpenBLT\/port\/linux\/usbbulk.c (Line 37)  #include &lt;libusb.h&gt;<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u0431\u0438\u043b\u0434\u0438\u0442\u044c\u0441\u044f, \u043d\u043e \u043a\u0442\u043e \u044f \u0442\u0430\u043a\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0435\u0441\u043d\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0435 \u0432\u0435\u0441\u0451\u043b\u043e\u0435.<\/p>\n<p>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <code>LibOpenBlt<\/code> :<\/p>\n<pre><code>&lt;root&gt;\/LibOpenBlt     |-- build     |-- port         |-- windows             |-- ...             |-- critutils.c             |-- netaccess.c             |-- serialport.c             |-- timeutil.c             |-- usbbulk.c             |-- xcpprotect.c         |-- linux             |-- ...             |-- critutils.c   <\/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-443271","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/443271","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=443271"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/443271\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=443271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=443271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=443271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}