{"id":366423,"date":"2024-05-21T02:59:12","date_gmt":"2024-05-21T02:59:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=366423"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=366423","title":{"rendered":"<span>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Unit-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u044b STM32CubeIDE<\/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>\u0410 \u0438\u043c\u0435\u043d\u043d\u043e, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 <a href=\"http:\/\/www.throwtheswitch.org\/ceedling\" rel=\"noopener noreferrer nofollow\"><strong>\u0421eedling<\/strong><\/a>. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u2013 <strong>Unity <\/strong>\u2013 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 <strong>CMock <\/strong>\u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432-\u0437\u0430\u0433\u043b\u0443\u0448\u0435\u043a. \u041d\u043e \u0441\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0437\u0430\u0441\u043b\u0443\u0433\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u2013 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0432\u043e \u0432\u0441\u0435\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u0445 \u2013 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u0434\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <strong>\u0421eedling <\/strong>\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0443\u0442\u0438\u043d\u043d\u043e\u0435 TDD (\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435) \u0438\u043b\u0438 TLD(\u0435\u0441\u043b\u0438 \u0437\u0430\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0442\u0430\u043a) \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. <\/p>\n<p>\u041a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u0421\u0432\u0435\u0436\u0435\u0435 \u043f\u0435\u0440\u0435\u0438\u0437\u0434\u0430\u043d\u0438\u0435 Test Driven Development for Embedded C (Pragmatic Programmers) \u043e\u0442 <strong>James W. Grenning<\/strong> <\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0430\u044f(Ceedling \u0443\u0436\u0435 \u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 rake \u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c), \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 <a href=\"https:\/\/dmitryfrank.com\/articles\/unit_testing_embedded_c_applications\" rel=\"noopener noreferrer nofollow\"><u>\u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u0442 Dmitry Frank<\/u><\/a><\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, <a href=\"https:\/\/github.com\/ThrowTheSwitch\" rel=\"noopener noreferrer nofollow\"><strong><u>GIT \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/u><\/strong><\/a>. \u0422\u0430\u043c \u043d\u0430\u0439\u0434\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0430\u044f \u0432\u0441\u0435\u043e\u0431\u044a\u0435\u043c\u043b\u044e\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/ThrowTheSwitch\/CMock\/blob\/master\/docs\/CMock_Summary.md\" rel=\"noopener noreferrer nofollow\">CMock<\/a>, <a href=\"https:\/\/github.com\/ThrowTheSwitch\/Ceedling\/blob\/master\/docs\/CeedlingPacket.md\" rel=\"noopener noreferrer nofollow\">Ceedling<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0443, \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u044f \u0441\u043e\u0431\u0435\u0440\u0443\u0441\u044c \u0441 \u0441\u0438\u043b\u0430\u043c\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0437\u0430\u043c\u0435\u0442\u043a\u0443<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 <strong>Ceedling <\/strong>\u0438 \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0435\u0433\u043e \u043a\u0430\u043a-\u0442\u043e \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043a \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438\u0441\u044c \u0441\u0430\u043c\u0438 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0431\u043e\u0440\u043a\u0438. <\/p>\n<blockquote>\n<p><a href=\"http:\/\/www.electronvector.com\/blog\/add-unit-tests-to-your-current-project-with-ceedling\" rel=\"noopener noreferrer nofollow\"><u>\u041a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/u><\/a><\/p>\n<\/blockquote>\n<hr\/>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/h3>\n<h4>\u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b<\/h4>\n<p>\u0423 Eclipse, \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d STM32CubeIDE, \u0435\u0441\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u2013 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b, \u043d\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c STM32CubeIDE. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <strong>TM Terminal<\/strong> (<em>\u0410 \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 VSCode, \u0433\u0434\u0435 \u0443\u0436\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0430 IDE \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432<\/em>)<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6ee\/711\/0bc\/6ee7110bc4537edda9d2a434077dde17.png\" width=\"1024\" height=\"315\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6ee\/711\/0bc\/6ee7110bc4537edda9d2a434077dde17.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b55\/f73\/ca5\/b55f73ca593b4c7e593efb98c3129c81.png\" width=\"683\" height=\"183\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b55\/f73\/ca5\/b55f73ca593b4c7e593efb98c3129c81.png\"\/><\/figure>\n<p>\u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0432 \u043b\u044e\u0431\u043e\u0439 \u043f\u0430\u043f\u043a\u0435.<\/p>\n<h4>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0443 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u0432\u0430\u043d <em>programel_prj<\/em>. \u0414\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0432\u0435\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0438\u043c\u0441\u044f \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435<\/p>\n<pre><code class=\"bash\">E:\\programel_prj>cd ..\/ E:\\>ceedling new programel_prj Welcome to Ceedling!       create  programel_prj\/project.yml Project 'programel_prj' created!  - Execute 'ceedling help' from programel_prj to view available test &amp; build task<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432\u044b\u0448\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u0438\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <strong>\u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0435 <\/strong>\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0431\u044b\u043b\u0438 \u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>\u0411\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0430\u0439\u043b <strong>project.yml<\/strong> \u0438 \u043f\u0430\u043f\u043a\u0430 <strong>src<\/strong>. \u041f\u0430\u043f\u043a\u0443 <strong>src <\/strong>\u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0438\u0441\u044c \u0432 \u043e\u043a\u043d\u0435 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 F5.<\/p>\n<h4>\u041f\u0440\u0430\u0432\u043a\u0430 \u0430\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h4>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <strong>Ceedling<\/strong>, \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <strong>project.yml<\/strong>. \u0417\u0430\u0447\u0435\u043c? <em>(\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430)<\/em><\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 STM32CubeIDE \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0430. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0438\u043d\u043e\u0432, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0438 \u0442.\u0434. \u0432 *.ioc-\u0444\u0430\u0439\u043b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439. \u041c\u044b \u0436\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c TDD \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0423\u0434\u043e\u0431\u043d\u043e, \u0435\u0441\u043b\u0438 \u0441\u0430\u043c <strong>Ceedling<\/strong> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432 \u043d\u0443\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445. <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432 <strong>project.yml<\/strong> \u043f\u043e\u0441\u043b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u0441 <strong>:project:<\/strong>:<\/p>\n<pre><code class=\"yaml\">:project:   :use_exceptions: FALSE   :use_test_preprocessor: TRUE   :use_auxiliary_dependencies: TRUE   :build_root: build #  :release_build: TRUE   :test_file_prefix: test_   :which_ceedling: gem   :ceedling_version: 0.31.1   :default_tasks:     - test:all :module_generator:   :project_root: .\/   :source_root: Core\/Src\/   :inc_root: Core\/Inc\/   :test_root: test\/<\/code><\/pre>\n<p>\u0417\u043d\u0430\u0447\u0438\u0442, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <strong>:module_generator:<\/strong> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0433\u0434\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0434\u0443\u043b\u044f. \u041c\u043e\u0436\u043d\u043e \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0443 \u043f\u0430\u043f\u043a\u0438 <strong>test <\/strong>\u0441\u043c\u0435\u043d\u0438\u0442\u044c, \u043d\u043e \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u043e. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0438 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>:paths:<\/strong><\/p>\n<pre><code class=\"yaml\">:paths:   :test:     - +:test\/**     - -:test\/support   :source:     - Core\/Inc\/**     - Core\/Src\/**<\/code><\/pre>\n<p>(<em>\u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/em>) \u0412 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>:cmock:<\/strong> \u0441 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 (<em>uint8_t<\/em>, <em>int32_fast_t <\/em>\u0438 \u0442.\u0434.)<\/p>\n<pre><code class=\"yaml\">:cmock:   :mock_prefix: mock_   :when_no_prototypes: :warn   :enforce_strict_ordering: TRUE   :plugins:     - :ignore     - :callback   :treat_as:     uint8:    HEX8     uint16:   HEX16     uint32:   UINT32     int8:     INT8     bool:     UINT8   :includes:    - &lt;stdint.h><\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c <strong>module_sample<\/strong>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0432\u0435\u0434\u0435\u043c \u0432 <strong>TM Terminal<\/strong> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\">E:\\programel_prj>ceedling module:create[module_sample] File Core\/Src\/module_sample.c created File Core\/Inc\/module_sample.h created File test\/test_module_sample.c created Generate Complete<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438\u0441\u044c \u0432 \u043d\u0443\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445!<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/19d\/428\/de2\/19d428de230b46ad3f383f0baa45bfe0.png\" width=\"492\" height=\"623\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/19d\/428\/de2\/19d428de230b46ad3f383f0baa45bfe0.png\"\/><\/figure>\n<p>\u041f\u0440\u044f\u043c \u043f\u043e\u0447\u0442\u0438 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 <strong>TDD<\/strong>!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/854\/6ae\/09a\/8546ae09a3a42649b57ed0e4cb338f7c.png\" width=\"817\" height=\"463\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/854\/6ae\/09a\/8546ae09a3a42649b57ed0e4cb338f7c.png\"\/><\/figure>\n<p>\u0412 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0438\u043d\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u0430. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u2013 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0431\u043e\u0440\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>Debug <\/strong>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0430\u043a\u0440\u043e\u0441 <strong>TEST<\/strong>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/26d\/44c\/746\/26d44c7463362372e37bc47df317d0ae.png\" width=\"816\" height=\"605\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/26d\/44c\/746\/26d44c7463362372e37bc47df317d0ae.png\"\/><\/figure>\n<p>\u0418 \u0435\u0449\u0451 \u2013 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043e\u0442 Unity(<strong>unity.h<\/strong>) \u0432 \u043f\u0430\u043f\u043a\u0443 Inc. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. <\/p>\n<p><em>\u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0443 \u043c\u0435\u043d\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u2013 E:\\Ruby30-x64\\lib\\ruby\\gems\\3.0.0\\gems\\ceedling-0.31.1\\vendor\\unity\\src<\/em>\\<\/p>\n<hr\/>\n<h3>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0433\u043e\u043d \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u043b\u043e\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 \u2013 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u043a\u043e\u043c\u043c\u0430\u043d\u0434 \u0432 build steps. \u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043c\u044d\u0439\u043a\u0444\u0430\u0439\u043b\u0430\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0430\u0445 Debug \u0438\u043b\u0438 Relase \u2013 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u2013 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432\u044b\u0448\u0435 \u043f\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 (\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c) \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <strong>ceedling<\/strong>. \u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0434\u043e \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u2013 <strong>pre\/post build steps<\/strong>. \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438 (\u0441\u043c. <em>Chaining Commands<\/em> \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u0435). <\/p>\n<p>\u041c\u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0432 post-build, \u043d\u043e \u0432 \u043c\u043e\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 STM32CubeIDE \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b make-\u0444\u0430\u0439\u043b\u043e\u0432. \u041e\u043d\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u044e\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 post-build, <strong>\u0432\u0441\u0435\u0433\u0434\u0430<\/strong> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430. \u0423 \u043c\u0435\u043d\u044f \u043d\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u2013 \u043e\u0431 \u044d\u0442\u043e\u0439 \u0433\u0430\u0434\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0442\u0443\u0442:<\/p>\n<blockquote>\n<p><a href=\"https:\/\/www.eclipse.org\/forums\/index.php\/t\/58614\/\" rel=\"noopener noreferrer nofollow\"><u>Eclipse Community Forums: C \/ C++ IDE (CDT) \u00bb Post-Build Step<\/u><\/a><\/p>\n<\/blockquote>\n<p><code>cd ..\/; ceedling test;<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5dc\/971\/28a\/5dc97128a2e0e3afb039a6e7f5edae76.png\" width=\"822\" height=\"654\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5dc\/971\/28a\/5dc97128a2e0e3afb039a6e7f5edae76.png\"\/><\/figure>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <strong>test_module_sample.c<\/strong> \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0438 \u0432\u0435\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u2013 \u043e\u0434\u0438\u043d \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0442\u0435\u0441\u0442. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/307\/33b\/6a4\/30733b6a4fc7ef62a16895024738dfa6.png\" width=\"701\" height=\"475\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/307\/33b\/6a4\/30733b6a4fc7ef62a16895024738dfa6.png\"\/><\/figure>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0431\u043e\u0440\u043a\u0443 <strong>Debug <\/strong>\u0432\u0435\u0440\u0441\u0438\u0438<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9b6\/368\/301\/9b63683017a2760b5b86186f4559028e.png\" width=\"160\" height=\"83\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9b6\/368\/301\/9b63683017a2760b5b86186f4559028e.png\"\/><\/figure>\n<p>\u0427\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432 \u043e\u043a\u043d\u0435 <strong>Console<\/strong>:<\/p>\n<pre><code class=\"bash\">15:59:53 **** Build of configuration Debug for project programel_prj **** make -j12 all  cd ..\/; ceedling test; Test 'test_module_sample.c' --------------------------- Generating runner for test_module_sample.c... Compiling test_module_sample_runner.c... Compiling test_module_sample.c... Compiling unity.c... Compiling module_sample.c... Compiling cmock.c... Linking test_module_sample.out... Running test_module_sample.out... -------------------- IGNORED TEST SUMMARY -------------------- [test_module_sample.c]   Test: test_module_sample_NeedToImplement   At line (17): \"Need to Implement module_sample\" -------------------- OVERALL TEST SUMMARY -------------------- TESTED:  1 PASSED:  0 FAILED:  0 IGNORED: 1   arm-none-eabi-gcc \"..\/Drivers\/STM32F0xx_HAL_D..............<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0441\u044f(<em>\u0431\u044b\u043b \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d<\/em>) \u043e\u0434\u0438\u043d \u0442\u0435\u0441\u0442. \u041c\u044b \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432 STM32CubeIDE.<\/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\/789202\/\"> https:\/\/habr.com\/ru\/articles\/789202\/<\/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>\u0410 \u0438\u043c\u0435\u043d\u043d\u043e, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 <a href=\"http:\/\/www.throwtheswitch.org\/ceedling\" rel=\"noopener noreferrer nofollow\"><strong>\u0421eedling<\/strong><\/a>. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u2013 <strong>Unity <\/strong>\u2013 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 <strong>CMock <\/strong>\u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432-\u0437\u0430\u0433\u043b\u0443\u0448\u0435\u043a. \u041d\u043e \u0441\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0437\u0430\u0441\u043b\u0443\u0433\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u2013 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0432\u043e \u0432\u0441\u0435\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u0445 \u2013 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u0434\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <strong>\u0421eedling <\/strong>\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0443\u0442\u0438\u043d\u043d\u043e\u0435 TDD (\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435) \u0438\u043b\u0438 TLD(\u0435\u0441\u043b\u0438 \u0437\u0430\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0442\u0430\u043a) \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. <\/p>\n<p>\u041a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u0421\u0432\u0435\u0436\u0435\u0435 \u043f\u0435\u0440\u0435\u0438\u0437\u0434\u0430\u043d\u0438\u0435 Test Driven Development for Embedded C (Pragmatic Programmers) \u043e\u0442 <strong>James W. Grenning<\/strong> <\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0430\u044f(Ceedling \u0443\u0436\u0435 \u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 rake \u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c), \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 <a href=\"https:\/\/dmitryfrank.com\/articles\/unit_testing_embedded_c_applications\" rel=\"noopener noreferrer nofollow\"><u>\u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u0442 Dmitry Frank<\/u><\/a><\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, <a href=\"https:\/\/github.com\/ThrowTheSwitch\" rel=\"noopener noreferrer nofollow\"><strong><u>GIT \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/u><\/strong><\/a>. \u0422\u0430\u043c \u043d\u0430\u0439\u0434\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0430\u044f \u0432\u0441\u0435\u043e\u0431\u044a\u0435\u043c\u043b\u044e\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/ThrowTheSwitch\/CMock\/blob\/master\/docs\/CMock_Summary.md\" rel=\"noopener noreferrer nofollow\">CMock<\/a>, <a href=\"https:\/\/github.com\/ThrowTheSwitch\/Ceedling\/blob\/master\/docs\/CeedlingPacket.md\" rel=\"noopener noreferrer nofollow\">Ceedling<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0443, \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u044f \u0441\u043e\u0431\u0435\u0440\u0443\u0441\u044c \u0441 \u0441\u0438\u043b\u0430\u043c\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0437\u0430\u043c\u0435\u0442\u043a\u0443<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 <strong>Ceedling <\/strong>\u0438 \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0435\u0433\u043e \u043a\u0430\u043a-\u0442\u043e \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043a \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438\u0441\u044c \u0441\u0430\u043c\u0438 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0431\u043e\u0440\u043a\u0438. <\/p>\n<blockquote>\n<p><a href=\"http:\/\/www.electronvector.com\/blog\/add-unit-tests-to-your-current-project-with-ceedling\" rel=\"noopener noreferrer nofollow\"><u>\u041a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/u><\/a><\/p>\n<\/blockquote>\n<hr\/>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/h3>\n<h4>\u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b<\/h4>\n<p>\u0423 Eclipse, \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d STM32CubeIDE, \u0435\u0441\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u2013 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b, \u043d\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c STM32CubeIDE. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <strong>TM Terminal<\/strong> (<em>\u0410 \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 VSCode, \u0433\u0434\u0435 \u0443\u0436\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0430 IDE \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432<\/em>)<\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<p>\u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0432 \u043b\u044e\u0431\u043e\u0439 \u043f\u0430\u043f\u043a\u0435.<\/p>\n<h4>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0443 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u0432\u0430\u043d <em>programel_prj<\/em>. \u0414\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0432\u0435\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0438\u043c\u0441\u044f \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435<\/p>\n<pre><code class=\"bash\">E:\\programel_prj>cd ..\/ E:\\>ceedling new programel_prj Welcome to Ceedling!       create  programel_prj\/project.yml Project 'programel_prj' created!  - Execute 'ceedling help' from programel_prj to view available test &amp; build task<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432\u044b\u0448\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u0438\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <strong>\u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0435 <\/strong>\u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0431\u044b\u043b\u0438 \u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>\u0411\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0430\u0439\u043b <strong>project.yml<\/strong> \u0438 \u043f\u0430\u043f\u043a\u0430 <strong>src<\/strong>. \u041f\u0430\u043f\u043a\u0443 <strong>src <\/strong>\u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0438\u0441\u044c \u0432 \u043e\u043a\u043d\u0435 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 F5.<\/p>\n<h4>\u041f\u0440\u0430\u0432\u043a\u0430 \u0430\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h4>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <strong>Ceedling<\/strong>, \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <strong>project.yml<\/strong>. \u0417\u0430\u0447\u0435\u043c? <em>(\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430)<\/em><\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 STM32CubeIDE \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0430. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0438\u043d\u043e\u0432, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0438 \u0442.\u0434. \u0432 *.ioc-\u0444\u0430\u0439\u043b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439. \u041c\u044b \u0436\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c TDD \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0423\u0434\u043e\u0431\u043d\u043e, \u0435\u0441\u043b\u0438 \u0441\u0430\u043c <strong>Ceedling<\/strong> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432 \u043d\u0443\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445. <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432 <strong>project.yml<\/strong> \u043f\u043e\u0441\u043b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u0441 <strong>:project:<\/strong>:<\/p>\n<pre><code class=\"yaml\">:project:   :use_exceptions: FALSE   :use_test_preprocessor: TRUE   :use_auxiliary_dependencies: TRUE   :build_root: build #  :release_build: TRUE   :test_file_prefix: test_   :which_ceedling: gem   :ceedling_version: 0.31.1   :default_tasks:     - test:all :module_generator:   :project_root: .\/   :source_root: Core\/Src\/   :inc_root: Core\/Inc\/   :test_root: test\/<\/code><\/pre>\n<p>\u0417\u043d\u0430\u0447\u0438\u0442, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <strong>:module_generator:<\/strong> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0433\u0434\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0434\u0443\u043b\u044f. \u041c\u043e\u0436\u043d\u043e \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0443 \u043f\u0430\u043f\u043a\u0438 <strong>test <\/strong>\u0441\u043c\u0435\u043d\u0438\u0442\u044c, \u043d\u043e \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u043e. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0438 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>:paths:<\/strong><\/p>\n<pre><code class=\"yaml\">:paths:   :test:     - +:test\/**     - -:test\/support   :source:     - Core\/Inc\/**     - Core\/Src\/**<\/code><\/pre>\n<p>(<em>\u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/em>) \u0412 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>:cmock:<\/strong> \u0441 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 (<em>uint8_t<\/em>, <em>int32_fast_t <\/em>\u0438 \u0442.\u0434.)<\/p>\n<pre><code class=\"yaml\">:cmock:   :mock_prefix: mock_   :when_no_prototypes: :warn   :enforce_strict_ordering: TRUE   :plugins:     - :ignore     - :callback   :treat_as:     uint8:    HEX8     uint16:   HEX16     uint32:   UINT32     int8:     INT8     bool:     UINT8   :includes:    - &lt;stdint.h><\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c <strong>module_sample<\/strong>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0432\u0435\u0434\u0435\u043c \u0432 <strong>TM Terminal<\/strong> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\">E:\\programel_prj>ceedling module:create[module_sample] File Core\/Src\/module_sample.c created File Core\/Inc\/module_sample.h created File test\/test_module_sample.c created Generate Complete<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438\u0441\u044c \u0432 \u043d\u0443\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445!<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041f\u0440\u044f\u043c \u043f\u043e\u0447\u0442\u0438 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 <strong>TDD<\/strong>!<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0438\u043d\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u0430. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u2013 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0431\u043e\u0440\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>Debug <\/strong>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0430\u043a\u0440\u043e\u0441 <strong>TEST<\/strong>.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u0435\u0449\u0451 \u2013 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043e\u0442 Unity(<strong>unity.h<\/strong>) \u0432 \u043f\u0430\u043f\u043a\u0443 Inc. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. <\/p>\n<p><em>\u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0443 \u043c\u0435\u043d\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u2013 E:\\Ruby30-x64\\lib\\ruby\\gems\\3.0.0\\gems\\ceedling-0.31.1\\vendor\\unity\\src<\/em>\\<\/p>\n<hr\/>\n<h3>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0433\u043e\u043d \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u043b\u043e\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 \u2013 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u043a\u043e\u043c\u043c\u0430\u043d\u0434 \u0432 build steps. \u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043c\u044d\u0439\u043a\u0444\u0430\u0439\u043b\u0430\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0430\u0445 Debug \u0438\u043b\u0438 Relase \u2013 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u2013 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432\u044b\u0448\u0435 \u043f\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 (\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c) \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <strong>ceedling<\/strong>. \u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0434\u043e \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u2013 <strong>pre\/post build steps<\/strong>. \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438 (\u0441\u043c. <em>Chaining Commands<\/em> \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u0435). <\/p>\n<p>\u041c\u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0432 post-build, \u043d\u043e \u0432 \u043c\u043e\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 STM32CubeIDE \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b make-\u0444\u0430\u0439\u043b\u043e\u0432. \u041e\u043d\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u044e\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 post-build, <strong>\u0432\u0441\u0435\u0433\u0434\u0430<\/strong> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430. \u0423 \u043c\u0435\u043d\u044f \u043d\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u2013 \u043e\u0431 \u044d\u0442\u043e\u0439 \u0433\u0430\u0434\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0442\u0443\u0442:<\/p>\n<blockquote>\n<p><a href=\"https:\/\/www.eclipse.org\/forums\/index.php\/t\/58614\/\" rel=\"noopener noreferrer nofollow\"><u>Eclipse Community Forums: C \/ C++ IDE (CDT) \u00bb Post-Build Step<\/u><\/a><\/p>\n<\/blockquote>\n<p><code>cd ..\/; ceedling test;<\/code><\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <strong>test_module_sample.c<\/strong> \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0438 \u0432\u0435\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0432 \u0444\u0430\u0439\u043b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u2013 \u043e\u0434\u0438\u043d \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0442\u0435\u0441\u0442. <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0431\u043e\u0440\u043a\u0443 <strong>Debug <\/strong>\u0432\u0435\u0440\u0441\u0438\u0438<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0427\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432 \u043e\u043a\u043d\u0435 <strong>Console<\/strong>:<\/p>\n<pre><code class=\"bash\">15:59:53 **** Build of configuration Debug for project programel_prj **** make -j12 all  cd ..\/; ceedling test; Test 'test_module_sample.c' --------------------------- Generating runner for test_module_sample.c... Compiling test_module_sample_runner.c... Compiling test_module_sample.c... Compiling unity.c... Compiling module_sample.c... Compiling cmock.c... Linking test_module_sample.out... Running test_module_sample.out... -------------------- IGNORED TEST SUMMARY -------------------- [test_module_sample.c]   Test: test_module_sample_NeedToImplement   At line (17): \"Need to Implement module_sample\" -------------------- OVERALL TEST SUMMARY -------------------- TESTED:  1 PASSED:  0 FAILED:  0 IGNORED: 1   arm-none-eabi-gcc \"..\/Drivers\/STM32F0xx_HAL_D..............<\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0441\u044f(<em>\u0431\u044b\u043b \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d<\/em>) \u043e\u0434\u0438\u043d \u0442\u0435\u0441\u0442. \u041c\u044b \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432 STM32CubeIDE.<\/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\/789202\/\"> https:\/\/habr.com\/ru\/articles\/789202\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-366423","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/366423","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=366423"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/366423\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=366423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=366423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=366423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}