{"id":278577,"date":"2016-04-19T12:20:08","date_gmt":"2016-04-19T08:20:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=278577"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=278577","title":{"rendered":"\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 ARM Cortex-M4 \u0444\u0438\u0440\u043c\u044b Atmel \u0432 \u0441\u0440\u0435\u0434\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Linux. \u0427\u0430\u0441\u0442\u044c 2"},"content":{"rendered":"<p>       <i><b>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438\u0437 \u043d\u043e\u043c\u0435\u0440\u0430 \u21162 \u0437\u0430 2016 \u0433\u043e\u0434 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 <a href=\"http:\/\/www.kit-e.ru\/\">\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438<\/a>. \u0410\u0432\u0442\u043e\u0440 \u041a\u0443\u0440\u043d\u0438\u0446 \u0410\u043d\u0434\u0440\u0435\u0439. \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/habrahabr.ru\/company\/rainbow\/blog\/281665\/\">\u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c<\/a><\/b><\/i><\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435, \u0437\u0430\u043f\u0443\u0441\u043a \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 Atmel SAM4S \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0441\u0442\u0430\u043d\u0446\u0438\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0434 Atmel SAM4S \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b, \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0441\u043e\u0437\u0434\u0430\u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0436\u0438\u0433\u0430\u0442\u044c \u0438 \u0433\u0430\u0441\u0438\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 SAM4S-EK.<br \/>  \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043f\u043e\u043c\u0438\u043c\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f GCC \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:  <\/p>\n<ol>\n<li>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 CMSIS (Cortex Microcontroller Software Interface Standard) \u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0435\u0434\u0438\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u044f\u0434\u0440\u043e\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 ARM Cortex-M \u2014 \u043e\u0431\u0449\u0430\u044f \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 ARM Cortex-M \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439.<\/li>\n<li>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u2014 \u0441\u0432\u043e\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0431\u0443\u0434\u044c \u0442\u043e Atmel, STMicroelectronics, NXP \u0438 \u0434\u0440.<\/li>\n<li>\u0421\u043a\u0440\u0438\u043f\u0442 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430 (linker script) \u2014 \u0444\u0430\u0439\u043b \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c\u0438 \u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432\u043e flash-\u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0432 \u041e\u0417\u0423 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 (\u0441\u0435\u043a\u0446\u0438\u0439): \u0441\u0442\u0435\u043a, \u043a\u0443\u0447\u0430 \u0438 \u0434\u0440. \u0414\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430.<\/li>\n<li>\u0424\u0430\u0439\u043b syscalls.c \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044f\u0437\u044b\u043a\u0430 C (\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f newlib). \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0436\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0444\u0430\u0439\u043b syscalls.c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 [10]. <\/li>\n<li>\u0421\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438 \u0440\u0430\u0434\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432.<\/li>\n<li>\u041a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (startup code) \u2014 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u0431\u0440\u043e\u0441\u0443 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 (reset handler). <\/li>\n<li>\u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u0431\u0440\u043e\u0441\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 C \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u2014 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e main().<\/li>\n<\/ol>\n<p><a name=\"habracut\"><\/a><\/p>\n<h4>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Atmel Software Framework<\/h4>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0444\u0438\u0440\u043c\u0430 Atmel \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Atmel Software Framework (\u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e ASF) \u0434\u043b\u044f \u044f\u0437\u044b\u043a\u043e\u0432 C\/C+, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 5 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u0448\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<br \/>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 ASF \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0435\u0434\u0438\u043d\u044b\u0439 \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432 \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440: megaAVR, AVR XMEGA, AVR UC3 \u0438 SAM. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 ASF \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0439\u043d\u044b\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0446\u0435\u043d\u043e\u0447\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0430\u0445.<br \/>  \u0422\u0430\u043a\u043e\u0435 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0430 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u0438 \u0432 \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ASF. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0439, \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u043e\u0439 \u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 (\u0430\u0440\u0445\u0438\u0432 ~400 \u041c\u0431\u0430\u0439\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0431\u043e\u043b\u0435\u0435 70000 \u0444\u0430\u0439\u043b\u043e\u0432).<br \/>  \u0414\u0430\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 ASF \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e [8] \u0438 \u043e\u043d\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 GCC, \u043e\u0434\u043d\u0430\u043a\u043e \u0430\u0432\u0442\u043e\u0440 \u043d\u0435 \u0441\u0443\u043c\u0435\u043b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Atmel SAM4S16C. <br \/>  \u0410\u0432\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0443\u0442\u044c: <br \/>  1.\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Atmel Studio IDE, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c Windows \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u0441\u0440\u0435\u0434\u0435 Microsoft Visual Studio 2013. <br \/>  2. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u00ab\u0432\u0440\u0443\u0447\u043d\u0443\u044e\u00bb \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u043f\u0438\u0440\u0443\u044f \u0438\u0445 \u0438\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ASF.<\/p>\n<h4>\u0421\u0440\u0435\u0434\u0430 Atmel Studio IDE<\/h4>\n<p>  \u0421\u0440\u0435\u0434\u0430 Atmel Studio IDE \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 [<a href=\"http:\/\/www.atmel.com\/tools\/ATMELSTUDIO.aspx\">9<\/a>]. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Windows \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 ARM \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 ASF (\u0440\u0438\u0441. 5).<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/5f2\/51c\/05a\/5f251c05a89249db81ea8206e77f2587.png\"\/><br \/>  \u0420\u0438\u0441. 5. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Atmel Studio IDE.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Atmel Studio IDE \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432\u044b\u0431\u0440\u0430\u0432 \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u044e \u00abFile -&gt; New -&gt; Project\u2026\u00bb. \u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0438\u043f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u00abGCC C ASF Board Project\u00bb, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441. 6.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/25f\/83b\/638\/25f83b6383e6401c8272cdd80b46fa86.png\"\/><br \/>  \u0420\u0438\u0441. 6. \u0412\u044b\u0431\u043e\u0440 \u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 Atmel Studio IDE.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 (\u0440\u0438\u0441. 7)<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b32\/f7b\/7f0\/b32f7b7f08114a949c4f2db930225f74.png\"\/><br \/>  \u0420\u0438\u0441. 7. \u0412\u044b\u0431\u043e\u0440 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0449\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043e\u0447\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0443\u043d\u043a\u0442 \u00abSelect by Board\u00bb \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00abSAM4S-EK\u00bb (\u0440\u0438\u0441. 7). \u0412 \u0441\u043f\u0438\u0441\u043a\u0435 \u043d\u0438\u0436\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043f\u0443\u043d\u043a\u0442 \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u00abATSAM4S16C\u00bb \u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u00abOk\u00bb.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d, \u0444\u0430\u0439\u043b\u044b \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0440\u0430\u043d\u0435\u0435 (\u0440\u0438\u0441. 6) \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u0432\u0442\u043e\u0440\u0430 c:\\Users\\andrey_k\\Documents\\Atmel Studio\\7.0\\GccBoardProject1\\GccBoardProject1\\src).<br \/>  \u041a\u0430\u0442\u0430\u043b\u043e\u0433 src \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 Linux \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 ~\/sam\/. \u0415\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 \u0440\u0438\u0441. 8.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fbf\/b75\/963\/fbfb75963eab45399f9af690538e587d.png\"\/><br \/>  \u0420\u0438\u0441. 8. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/p>\n<p>  \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435:  <\/p>\n<ol>\n<li>\u0421\u043a\u0440\u0438\u043f\u0442 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430 \u2014 \u044d\u0442\u043e \u0444\u0430\u0439\u043b ~\/sam\/src\/ASF\/sam\/utils\/linker_scripts\/sam4s\/sam4s16\/gcc\/flash.ld<\/li>\n<li>\u041a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 ~\/sam\/src\/ASF\/sam\/utils\/cmsis\/sam4s\/source\/templates\/gcc\/startup_sam4s.c<\/li>\n<li>\u0424\u0430\u0439\u043b syscalls.c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 ~\/sam\/src\/ASF\/sam\/utils\/syscalls\/gcc.<\/li>\n<\/ol>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ASF<\/h4>\n<p>  \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 delay.h, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u0435\u043a \u043d\u0430 \u0442\u043e\u0447\u043d\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u044d\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u00ab\u043c\u0438\u0433\u0430\u043d\u0438\u044f\u00bb \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c). \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043f\u043e \u043c\u0435\u0440\u0435 \u0440\u043e\u0441\u0442\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ASF \u2014 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 delay.h. \u0427\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ASF [<a href=\"http:\/\/asf.atmel.com\/docs\/latest\/download.html\">8<\/a>] \u0444\u0430\u0439\u043b common\/services\/delay\/delay.h \u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 common\/services\/delay\/sam\/ \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 ~\/sam\/src\/ASF\/common\/services\/delay. <br \/>  \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 delay.h \u0432 \u0441\u0431\u043e\u0440\u043a\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0444\u0430\u0439\u043b\u0430 ~\/sam\/src\/asf.h \u0441\u0442\u0440\u043e\u043a\u0443:  <\/p>\n<pre><code class=\"cpp\">#include &lt;delay.h&gt; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ASF \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<h4>\u041a\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h4>\n<p>  \u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u0444\u0430\u0439\u043b\u0430 main.c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043d\u0438\u0436\u0435:  <\/p>\n<pre><code class=\"cpp\">#include &lt;asf.h&gt; int main (void) {     board_init();     sysclk_init();     while (1) {         LED_On(LED1_GPIO);         delay_ms(500);         LED_Off(LED1_GPIO);         delay_ms(500);     }     return 0; } <\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f board_init() \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u0440\u0442\u044b \u0432\u0432\u043e\u0434\u0430\/\u0432\u044b\u0432\u043e\u0434\u0430 (GPIO) \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u043a \u043d\u0438\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0440\u0442\u044b \u0432\u0432\u043e\u0434\u0430\/\u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u0430\u043a \u0432\u044b\u0445\u043e\u0434\u044b \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\/\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432. \u0424\u0443\u043d\u043a\u0446\u0438\u044f board_init() \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 src\/ASF\/sam\/borads\/sam4s_ek\/init.c.<br \/>  \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u0440\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442 \u2014 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u043a\u0440\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b\u0435 src\/config\/conf_borad.h.<br \/>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f sysclk_init() \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u043b\u043e\u043a\u0430 \u0442\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u041f\u043e\u0441\u043b\u0435 \u0441\u0431\u0440\u043e\u0441\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 RC-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430 4 \u041c\u0413\u0446 [<a href=\"http:\/\/www.atmel.com\/images\/atmel-11100-32-bit cortex-m4-microcontroller-sam4s_datasheet.pdf\">12<\/a>]. \u0424\u0443\u043d\u043a\u0446\u0438\u044f sysclk_init() \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043a\u0432\u0430\u0440\u0446\u0435\u0432\u043e\u0433\u043e \u0440\u0435\u0437\u043e\u043d\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 12 \u041c\u0413\u0446, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0431\u043b\u043e\u043a \u0444\u0430\u0437\u043e\u0432\u043e\u0439 \u0430\u0432\u0442\u043e\u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u044b PLL, \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0442\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f\u0434\u0440\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0430 120\u041c\u0413\u0446.<br \/>  \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b\u0435 src\/config\/conf_clock.h.<br \/>  \u0414\u0430\u043b\u0435\u0435 \u0432 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u043e\u0446\u0435\u043d\u043e\u0447\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b: LED_On() \u0438 LED_Off(). \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0440\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 LED1_GPIO, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0435\u043b\u0435\u043d\u043e\u043c\u0443 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0443, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c\u0443 \u043a \u043f\u043e\u0440\u0442\u0443 PA20. \u0424\u0443\u043d\u043a\u0446\u0438\u0438 LED_On(), LED_Off() \u0438 \u043c\u0430\u043a\u0440\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 LED1_GPIO \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 src\/ASF\/sam\/borads\/sam4s_ek\/, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u043a \u0432\u044b\u0432\u043e\u0434\u0430\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<br \/>  \u0412\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 delay_ms(500), \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0432 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043c\u043e\u0434\u0443\u043b\u044c delay.h, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 0,5 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0417\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u0443\u0441\u0442\u044b\u043c\u0438 \u0446\u0438\u043a\u043b\u0430\u043c\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043f\u0440\u0438\u0447\u0435\u043c \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043e\u0431 \u0443\u0447\u0435\u0442\u0435 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0442\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u2014 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ASF \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 sysclk_init().<\/p>\n<h4>\u0421\u0431\u043e\u0440\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 QBS<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0444\u0430\u0439\u043b\u043e\u0432. \u0424\u0438\u0440\u043c\u0430 Atmel \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0430\u0439\u043b\u0430\u043c\u0438 makefile, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 GCC.<br \/>  \u0410\u0432\u0442\u043e\u0440 \u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0432 Qt Creator \u0441\u0440\u0435\u0434\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 QBS [1]. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c QBS \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u0431 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445, \u043f\u043e\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. <br \/>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 QBS \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0432 QBS \u0444\u0430\u0439\u043b \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0430\u043c\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0435\u043a\u0441\u0442 QBS \u0444\u0430\u0439\u043b\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">import qbs import qbs.FileInfo import qbs.ModUtils  Project {     CppApplication {         type: [&quot;application&quot;, &quot;ucfw&quot; ]         Depends { name: &quot;cpp&quot; }         consoleApplication: true         cpp.positionIndependentCode: false         cpp.executableSuffix: &quot;.elf&quot;         cpp.includePaths: [             &quot;src&quot;,              &quot;src\/ASF\/common\/boards&quot;,             &quot;src\/ASF\/common\/services\/clock&quot;,             &quot;src\/ASF\/common\/services\/clock\/sam4s&quot;,             &quot;src\/ASF\/common\/services\/gpio&quot;,             &quot;src\/ASF\/common\/services\/gpio\/sam_gpio&quot;,             &quot;src\/ASF\/common\/services\/ioport&quot;,             &quot;src\/ASF\/common\/services\/ioport\/sam&quot;,             &quot;src\/ASF\/common\/services\/delay&quot;,             &quot;src\/ASF\/common\/services\/delay\/sam&quot;,             &quot;src\/ASF\/common\/utils&quot;,             &quot;src\/ASF\/common\/utils\/interrupt&quot;,              &quot;src\/ASF\/sam\/boards&quot;,             &quot;src\/ASF\/sam\/boards\/sam4s_ek&quot;,             &quot;src\/ASF\/sam\/drivers\/pio&quot;,             &quot;src\/ASF\/sam\/drivers\/pmc&quot;,              &quot;src\/ASF\/sam\/utils&quot;,             &quot;src\/ASF\/sam\/utils\/cmsis\/sam4s\/include&quot;,             &quot;src\/ASF\/sam\/utils\/cmsis\/sam4s\/include\/component&quot;,             &quot;src\/ASF\/sam\/utils\/cmsis\/sam4s\/include\/instance&quot;,             &quot;src\/ASF\/sam\/utils\/cmsis\/sam4s\/include\/pio&quot;,             &quot;src\/ASF\/sam\/utils\/header_files&quot;,             &quot;src\/ASF\/sam\/utils\/preprocessor&quot;,              &quot;src\/ASF\/thirdparty\/CMSIS\/Include&quot;,              &quot;src\/config&quot;         ]                 cpp.defines: [             &quot;__SAM4SA16C__&quot;,             &quot;BOARD = SAM4S_EK&quot;         ]         cpp.commonCompilerFlags: [             &quot;-mcpu=cortex-m4&quot;,             &quot;-mthumb&quot;,             &quot;-mfloat-abi=soft&quot;         ]         cpp.linkerFlags: [             &quot;-mcpu=cortex-m4&quot;,             &quot;-mthumb&quot;,             &quot;-mfloat-abi=soft&quot;,             &quot;-Xlinker&quot;,             &quot;--gc-sections&quot;         ]          \/\/ \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f - \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438.         Properties {             condition: qbs.buildVariant === &quot;debug&quot;             cpp.debugInformation: true             cpp.optimization: &quot;none&quot;         }         Properties {             condition: qbs.buildVariant === &quot;release&quot;             cpp.debugInformation: false             cpp.optimization: &quot;small&quot;         }          \/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0430\u043a\u0440\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 DEBUG, \u0435\u0441\u043b\u0438 \u0441\u0431\u043e\u0440\u043a\u0430 &quot;\u041e\u0442\u043b\u0430\u0434\u043a\u0430&quot;.         Properties {             condition: cpp.debugInformation             cpp.defines: outer.concat(&quot;DEBUG&quot;)         }          \/\/ \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430         cpp.linkerScripts: [             &quot;src\/ASF\/sam\/utils\/linker_scripts\/sam4s\/sam4s16\/gcc\/flash.ld&quot;         ]          \/\/ \u0413\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 &quot;sources&quot;         Group {             name: &quot;sources&quot;             prefix: &quot;.\/src\/**\/&quot;             files: [                 &quot;*.c&quot;,                 &quot;*.cpp&quot;,                 &quot;*.h&quot;,                 &quot;*.s&quot;             ]             cpp.cxxFlags: [ &quot;-std=c++11&quot; ]             cpp.cFlags: [ &quot;-std=gnu99&quot; ]             cpp.warningLevel: &quot;all&quot;         }          \/\/ \u0413\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 &quot;ldscripts&quot;         Group {             name: &quot;ldscripts&quot;             prefix: &quot;.\/src\/**\/&quot;             files: &quot;*.ld&quot;         }          \/\/ \u0412 \u0433\u0440\u0443\u043f\u043f\u0443 &quot;others&quot; \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 OpenOCD         Group {             name: &quot;others&quot;             prefix: &quot;.\/**\/&quot;             files: [                 &quot;*.cfg&quot;             ]         }          \/\/ \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438:         \/\/ 1. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b size \u0438\u0437 \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f GCC         \/\/ 2. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043f\u0438\u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0432 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Intel HEX         \/\/ 3. &quot;\u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0430&quot; \u0432 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b OpenOCD         Rule {             id: flashing              \/\/ \u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 &quot;\u041e\u0442\u043b\u0430\u0434\u043a\u0430&quot;             condition: qbs.buildVariant === &quot;release&quot;              inputs: [&quot;application&quot;]              Artifact {                 fileTags: [&quot;ucfw&quot;]  \/\/ !!!\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u043b\u0435\u043c type \u0438\u0442\u0435\u043c\u0430 CppApplication!!!                 filePath: input.baseDir + &quot;\/&quot; + input.baseName + &quot;.hex&quot;             }              prepare: {                 \/\/ \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0440\u0430\u0437\u043c\u0435\u0440                 var sizePath = &quot;arm-none-eabi-size&quot;;                 var argsSize = [input.filePath];                 var cmdSize = new Command(sizePath, argsSize);                 cmdSize.description = &quot;Size of sections:&quot;;                 cmdSize.highlight = &quot;linker&quot;;                  \/\/ \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u044e \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Intel HEX                 var objCopyPath = &quot;arm-none-eabi-objcopy&quot;;                 var argsConv = [&quot;-O&quot;, &quot;ihex&quot;, input.filePath, output.filePath];                 var cmdConv = new Command(objCopyPath, argsConv);                 cmdConv.description = &quot;converting to HEX: &quot; + FileInfo.fileName(input.filePath);                 cmdConv.highlight = &quot;linker&quot;;                  \/\/ \u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430                 var flashUtilityPath = &quot;openocd&quot;;                 var cmd1 = 'flash write_image erase' + ' ' + input.filePath;                 var argsFlash = [                             &quot;-f&quot;, &quot;interface\/jlink.cfg&quot;,                             &quot;-f&quot;, &quot;board\/atmel_sam4s_ek.cfg&quot;,                             &quot;-c&quot;, &quot;init&quot;,                             &quot;-c&quot;, &quot;halt&quot;,                             &quot;-c&quot;, cmd1,                             &quot;-c&quot;, &quot;reset&quot;,                             &quot;-c&quot;, &quot;shutdown&quot;];                 var cmdFlash = new Command(flashUtilityPath, argsFlash);                 cmdFlash.description = &quot;flashig to uC: &quot; + FileInfo.fileName(output.filePath);                 cmdFlash.highlight = &quot;linker&quot;;                  \/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0441\u0435 3 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f                 return [cmdSize, cmdConv, cmdFlash];             }         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 release \u0441\u0431\u043e\u0440\u043a\u0438 (release \u2014 \u0442.\u0435. \u043d\u0435 \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439) QBS \u0444\u0430\u0439\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u0435\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:  <\/p>\n<ol>\n<li>\u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438, <\/li>\n<li>\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0438\u0437 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 ELF \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 Intel HEX<\/li>\n<li>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 SAM-ICE, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 OpenOCD<\/li>\n<\/ol>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0434 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b Atmel SAM4S, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0438\u0437 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c. \u042d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e ARM \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0444\u0438\u0440\u043c\u044b Atmel.<br \/>  \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 [<a href=\"http:\/\/www.sourceware.org\/newlib\/libc.html#Syscalls\">11<\/a>]. \u0414\u043b\u044f \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 Ubuntu \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f \u043e\u0442 \u043d\u0435\u0435 (Lubuntu, Kubuntu, Xubuntu) \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438:  <\/p>\n<ul>\n<li>\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 GCC \u0434\u043b\u044f ARM \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 [1]<\/li>\n<li>\u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Qt Creator [1]<\/li>\n<li>\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 OpenOCD (\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432\u044b\u0448\u0435)<\/li>\n<\/ul>\n<h4>\u041b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0430<\/h4>\n<p>  <\/p>\n<ol>\n<li>\u041a\u0443\u0440\u043d\u0438\u0446 \u0410. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 STM32 \u0432 \u0441\u0440\u0435\u0434\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Linux \/\/ \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438. 2015. \u2116 10.<\/li>\n<li><a href=\"http:\/\/www.sourceforge.net\/projects\/openocd\">www.sourceforge.net\/projects\/openocd<\/a><\/li>\n<li><a href=\"http:\/\/www.we.easyelectronics.ru\/CADSoft\/ubuntueclipse-code-sourcery-openocd-j-link-arm-ilibystryy-start-dlya-somnevayuschihsya.html\">www.we.easyelectronics.ru\/CADSoft\/ubuntueclipse-code-sourcery-openocd-j-link-arm-ilibystryy-start-dlya-somnevayuschihsya.html<\/a><\/li>\n<li><a href=\"http:\/\/www.microsin.net\/programming\/arm\/openocdmanual-part1.html\">www.microsin.net\/programming\/arm\/openocdmanual-part1.html<\/a><\/li>\n<li><a href=\"http:\/\/www.microsin.net\/programming\/ARM\/openocdmanual-part2.html\">www.microsin.net\/programming\/ARM\/openocdmanual-part2.html<\/a><\/li>\n<li><a href=\"http:\/\/www.microsin.net\/programming\/ARM\/openocdmanual-part3.html\">www.microsin.net\/programming\/ARM\/openocdmanual-part3.html<\/a><\/li>\n<li><a href=\"http:\/\/www.openocd.org\/doc\/html\/General-Commands.html\">www.openocd.org\/doc\/html\/General-Commands.html<\/a><\/li>\n<li><a href=\"http:\/\/www.asf.atmel.com\/docs\/latest\/download.html\">www.asf.atmel.com\/docs\/latest\/download.html<\/a><\/li>\n<li><a href=\"http:\/\/www.atmel.com\/tools\/ATMELSTUDIO.aspx\">www.atmel.com\/tools\/ATMELSTUDIO.aspx<\/a><\/li>\n<li><a href=\"http:\/\/www.sourceware.org\/newlib\/libc.html#Syscalls\">www.sourceware.org\/newlib\/libc.html#Syscalls<\/a><\/li>\n<li><a href=\"http:\/\/www.e-kit.ru\">www.e-kit.ru<\/a><\/li>\n<li><a href=\"http:\/\/www.atmel.com\/images\/atmel-11100-32-bit%20cortex-m4-microcontroller-sam4s_datasheet.pdf\">www.atmel.com\/images\/atmel-11100-32-bit%20cortex-m4-microcontroller-sam4s_datasheet.pdf<\/a><\/li>\n<\/ol>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/281715\/\"> https:\/\/habrahabr.ru\/post\/281715\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <i><b>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438\u0437 \u043d\u043e\u043c\u0435\u0440\u0430 \u21162 \u0437\u0430 2016 \u0433\u043e\u0434 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 <a href=\"http:\/\/www.kit-e.ru\/\">\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438<\/a>. \u0410\u0432\u0442\u043e\u0440 \u041a\u0443\u0440\u043d\u0438\u0446 \u0410\u043d\u0434\u0440\u0435\u0439. \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/habrahabr.ru\/company\/rainbow\/blog\/281665\/\">\u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c<\/a><\/b><\/i><\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435, \u0437\u0430\u043f\u0443\u0441\u043a \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 Atmel SAM4S \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0441\u0442\u0430\u043d\u0446\u0438\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0434 Atmel SAM4S \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b, \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0441\u043e\u0437\u0434\u0430\u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0436\u0438\u0433\u0430\u0442\u044c \u0438 \u0433\u0430\u0441\u0438\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 SAM4S-EK.<br \/>  \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043f\u043e\u043c\u0438\u043c\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f GCC \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:  <\/p>\n<ol>\n<li>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 CMSIS (Cortex Microcontroller Software Interface Standard) \u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0435\u0434\u0438\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u044f\u0434\u0440\u043e\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 ARM Cortex-M \u2014 \u043e\u0431\u0449\u0430\u044f \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 ARM Cortex-M \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439.<\/li>\n<li>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u2014 \u0441\u0432\u043e\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0431\u0443\u0434\u044c \u0442\u043e Atmel, STMicroelectronics, NXP \u0438 \u0434\u0440.<\/li>\n<li>\u0421\u043a\u0440\u0438\u043f\u0442 \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430 (linker script) \u2014 \u0444\u0430\u0439\u043b \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c\u0438 \u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432\u043e flash-\u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0432 \u041e\u0417\u0423 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 (\u0441\u0435\u043a\u0446\u0438\u0439): \u0441\u0442\u0435\u043a, \u043a\u0443\u0447\u0430 \u0438 \u0434\u0440. \u0414\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043b\u0438\u043d\u043a\u043e\u0432\u0449\u0438\u043a\u0430.<\/li>\n<li>\u0424\u0430\u0439\u043b syscalls.c \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u044f\u0437\u044b\u043a\u0430 C (\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f newlib). \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0436\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0444\u0430\u0439\u043b syscalls.c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 [10]. <\/li>\n<li>\u0421\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438 \u0440\u0430\u0434\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432.<\/li>\n<li>\u041a\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (startup code) \u2014 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u0431\u0440\u043e\u0441\u0443 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 (reset handler). <\/li>\n<li>\u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u0431\u0440\u043e\u0441\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 C \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u2014 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e main().<\/li>\n<\/ol>\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-278577","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278577","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=278577"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278577\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}