{"id":372884,"date":"2024-05-21T05:23:11","date_gmt":"2024-05-21T05:23:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=372884"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=372884","title":{"rendered":"<span>KatWalk C2: \u0447.5: \u0423\u0447\u0438\u043c\u0441\u044f \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c ARM \u0432 Ghidra (aka \u043e\u0432\u0435\u0440\u043a\u043b\u043e\u043a\u0438\u043d\u0433 \u0438 \u0431\u0430\u0433\u0444\u0438\u043a\u0441\u0438\u043d\u0433)<\/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>&#171;\u0427\u0442\u043e \u0431 \u043e\u043d\u0438 \u043d\u0438 \u0434\u0435\u043b\u0430\u043b\u0438 &#8212; \u043d\u0435 \u0438\u0434\u0443\u0442 \u0434\u0435\u043b\u0430. \u0412\u0438\u0434\u0438\u043c\u043e \u0432 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0435 \u0431\u0430\u0433\u043e\u0432 \u0434\u043e\u0444\u0438\u0433\u0430&#187;. \u041a\u0430\u043a \u044f \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u043b \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 (\u0433\u0434\u0435 \u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f <a href=\"https:\/\/habr.com\/ru\/articles\/804327\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u0432<\/a>) &#8212; \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043f\u0440\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/798029\/\" rel=\"noopener noreferrer nofollow\">\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0434\u043b\u044f VR \u0438\u0433\u0440<\/a>, \u043a\u0430\u043a \u0441 <a href=\"https:\/\/habr.com\/ru\/articles\/799197\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/a> \u0438 \u043a\u0430\u043a \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/habr.com\/ru\/articles\/802125\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043e \u0435\u0435 \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u0432 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e<\/a>.<\/p>\n<p>\u0415\u0451 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0440\u0435\u0441\u0438\u0432\u0435\u0440 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u043d\u0441\u043e\u0440\u044b \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0432 86\u0413\u0446, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0433\u043d\u0430\u0442\u044c \u0434\u043e 133 \u0413\u0446, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043e\u0449\u0443\u0442\u0438\u043c\u043e \u043d\u0438\u0436\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438, \u043d\u043e \u0441\u0432\u044f\u0437\u044c \u0431\u044b\u043b\u0430 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0451\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u0435\u043d\u0441\u043e\u0440\u044b &#8212; \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0437\u0430 \u0438\u0433\u0440\u0430 <a href=\"https:\/\/ghidra-sre.org\/\" rel=\"noopener noreferrer nofollow\"><strong>ghidra_11.0_PUBLIC<\/strong><\/a> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0443 \u043c\u0435\u043d\u044f \u0432 <code>C:\\Games<\/code>, \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u043e\u0434\u043d\u0438\u043c \u0433\u043b\u0430\u0437\u043a\u043e\u043c \u0432 \u0441\u0430\u043c\u0443 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0438 \u043f\u043e\u043a\u043e\u0432\u044b\u0440\u044f\u0435\u043c\u0441\u044f \u0442\u0430\u043c \u0433\u0440\u044f\u0437\u043d\u044b\u043c\u0438 \u043f\u0430\u0442\u0447\u0438\u043a\u0430\u043c\u0438, \u0434\u0430 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c race condition \u043f\u043b\u044e\u0441 \u0432\u044b\u043a\u0438\u043d\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0445 \u0433\u043b\u044e\u043a\u043e\u0432. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0433\u043e\u0442\u043e\u0432\u0438\u043c\u0441\u044f \u043a \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044e. \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 &#8212; \u0432\u0441\u0451 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/f8e\/e01\/a74\/f8ee01a740e28e6c90348dd30e2a2558.jpg\" alt=\"We need to go deeper... into Ghidra\" title=\"We need to go deeper... into Ghidra\" width=\"279\" height=\"181\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f8e\/e01\/a74\/f8ee01a740e28e6c90348dd30e2a2558.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>We need to go deeper&#8230; into Ghidra<\/figcaption><\/div>\n<\/figure>\n<h2>\u0413\u0438\u0434\u0440\u0430: \u043a\u0430\u043a \u043d\u0430\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0434\u0440\u0430\u043a\u043e\u043d\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u043e\u043c \u043f\u043e\u0434 ARM<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e IDA \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 ARM, \u0430 IDA Freeware \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 x86, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0440\u0443\u0433\u0438\u043c. \u042d\u0442\u0438\u043c \u0447\u0435\u043c-\u043d\u0438\u0431\u0443\u0434\u044c, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c <a href=\"https:\/\/ghidra-sre.org\/\" rel=\"noopener noreferrer nofollow\">Ghidra<\/a> &#8212; \u043d\u0430\u0448\u0443\u043c\u0435\u0432\u0448\u0438\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0432\u044b\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0432 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441 \u043c\u043e\u0449\u043d\u044b\u0439 \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440, \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0412\u0441\u0451 \u043d\u0438\u043a\u0430\u043a \u0431\u044b\u043b\u043e \u043d\u0435 \u0434\u043e \u043d\u0435\u0433\u043e, \u0430 \u0442\u0443\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043f\u043e\u0432\u043e\u0434 \u043f\u043e\u0434\u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f.<\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0433\u0438\u0434\u0440\u0443 \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c (<code>C:\\Games<\/code>), \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 <code>C:\\Games\\ghidra_11.0_PUBLIC\\ghidraRun.bat<\/code>. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u0447\u0435\u0440\u0435\u0437 &#171;File=>Import File&#187; \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 Bin \u0444\u0430\u0439\u043b. \u0413\u0438\u0434\u0440\u0430 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b, \u043d\u043e \u0432\u043e\u0442 HEX \u043d\u0435 \u0443\u043c\u0435\u0435\u0442, \u0445\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438 \u0432 bin. \u0415\u0449\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0430\u043c\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0445\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c \u0447\u0442\u043e \u044d\u0442\u043e ARM, Cortex M3, little endian:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2cc\/955\/0f6\/2cc9550f6d17c4902294d2e45ef7444a.png\" alt=\"\u0412\u044b\u0431\u043e\u0440 \u044f\u0437\u044b\u043a\u0430\" title=\"\u0412\u044b\u0431\u043e\u0440 \u044f\u0437\u044b\u043a\u0430\" width=\"607\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2cc\/955\/0f6\/2cc9550f6d17c4902294d2e45ef7444a.png\"\/><\/p>\n<div><figcaption>\u0412\u044b\u0431\u043e\u0440 \u044f\u0437\u044b\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0413\u0438\u0434\u0440\u0430 \u0441\u043f\u0440\u0430\u0432\u0448\u0438\u0432\u0430\u0435\u0442, \u043d\u0435 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u0438 \u0444\u0430\u0439\u043b, \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u0435\u043c\u0441\u044f, \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0447\u0438\u0441\u0442\u044b\u0439 \u043b\u0438\u0441\u0442!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b65\/6b7\/6c8\/b656b76c84f444efb552f43547cbb007.png\" alt=\"\u0447\u0438\u0441\u0442\u044b\u0439 \u043b\u0438\u0441\u0442\" title=\"\u0447\u0438\u0441\u0442\u044b\u0439 \u043b\u0438\u0441\u0442\" width=\"1680\" height=\"1495\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b65\/6b7\/6c8\/b656b76c84f444efb552f43547cbb007.png\"\/><\/p>\n<div><figcaption>\u0447\u0438\u0441\u0442\u044b\u0439 \u043b\u0438\u0441\u0442<\/figcaption><\/div>\n<\/figure>\n<h3>\u0420\u0435\u0433\u0438\u043e\u043d\u044b \u043f\u0430\u043c\u044f\u0442\u0438<\/h3>\n<p>\u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0440\u0443\u043a\u0438, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u0430\u0440\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0430\u0448\u0435\u043b \u0433\u0434\u0435-\u0442\u043e <a href=\"https:\/\/software-dl.ti.com\/lprf\/simplelink_cc2640r2_latest\/docs\/blestack\/ble_user_guide\/html\/cc2640\/memory_management.html\" rel=\"noopener noreferrer nofollow\">\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0443 TI<\/a>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/87f\/97b\/b6a\/87f97bb6aeb5c30c137e8da9f6e457d5.png\" alt=\"\u041a\u0430\u0440\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u0438\" title=\"\u041a\u0430\u0440\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u0438\" width=\"970\" height=\"718\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/87f\/97b\/b6a\/87f97bb6aeb5c30c137e8da9f6e457d5.png\"\/><\/p>\n<div><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0434\u0451\u043c \u0432 &#171;Windows => Memory Map&#187; \u0438 \u043f\u0440\u0430\u0432\u0438\u043c. \u0423\u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u043e\u043d \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0432\u043e &#171;flash&#187; \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 &#171;W&#187; (\u044d\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0433\u0438\u043e\u043d). \u0427\u0435\u0440\u0435\u0437 \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u043f\u043b\u044e\u0441 \u0432 \u043d\u0430\u0431\u043e\u0440\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c &#171;rom&#187; \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u0441 <strong>10000000<\/strong>, \u0434\u043b\u0438\u043d\u043d\u043e\u044e \u0432 <strong>0x20000<\/strong> (\u0442\u043e\u0447\u043d\u0435\u0435 \u0432 0x1CC00 \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e), \u0433\u0430\u043b\u043e\u0447\u043a\u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0432 <strong>R<\/strong> \u0438 <strong>X<\/strong> (\u0443\u0431\u0438\u0440\u0430\u0435\u043c <strong>W<\/strong>). \u0415\u0449\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0433\u0438\u043e\u043d &#171;ram&#187; \u0441 \u0430\u0434\u0440\u0435\u0441\u0430 <strong>20000000<\/strong>, \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 <strong>0x5000<\/strong>, <strong>R\/W<\/strong> \u043d\u043e \u043d\u0435 <strong>X<\/strong>.<\/p>\n<p>\u0421 \u043d\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0443 \u043d\u0430\u0441 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u0441\u0442\u0435\u043a, \u0432 RAM, 0x20004000, \u043a\u0430\u043a \u0438 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043a\u0430\u0440\u0442\u044b \u043f\u0430\u043c\u044f\u0442\u0438. \u0417\u0430\u0442\u0435\u043c \u0435\u0441\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0447\u043d\u0451\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 &#8212; \u0432\u0441\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u044c ROM, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442, \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0434\u0432\u0430 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043a\u0440\u0438\u0432\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f. \u041d\u0435 \u043f\u043e\u0445\u043e\u0436\u0438 \u043d\u0430 \u043f\u0440\u0430\u0432\u0434\u0443.<\/p>\n<p>\u041d\u043e \u0441 \u043a\u0430\u0440\u0442\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u044b \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u0435\u0449\u0435 \u0435\u0441\u0442\u044c &#171;Peripherals&#187; \u0440\u0435\u0433\u0438\u043e\u043d, \u0447\u0435\u0440\u0435\u0437 \u0447\u0442\u0435\u043d\u0438\u0435-\u0437\u0430\u043f\u0438\u0441\u044c \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0434\u0451\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0436\u0435\u043b\u0435\u0437\u0430. \u0421\u0430\u043c\u043e\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0435, \u0441\u043a\u0430\u0447\u0430\u0442\u044c <a href=\"https:\/\/github.com\/cmsis-svd\/cmsis-svd-data\" rel=\"noopener noreferrer nofollow\">CMSIS-SVD<\/a> \u043f\u0430\u043a\u0435\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432 \u043c\u0430\u0448\u0438\u043d\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c \u0432\u0438\u0434\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0436\u0435\u043b\u0435\u0437\u0430 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 ARM \u0447\u0438\u043f\u043e\u0432 \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u0410 \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c <a href=\"https:\/\/github.com\/leveldown-security\/SVD-Loader-Ghidra\" rel=\"noopener noreferrer nofollow\">SVD-Loader-Ghidra<\/a>, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0438\u0434\u0451\u043c \u0432 &#171;Window=>Script Manager&#187;, \u0436\u043c\u0451\u043c \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u044e \u0441\u043f\u0440\u0430\u0432\u0430 \u0438\u043a\u043e\u043d\u043a\u0443 (\u0442\u0440\u0438 \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u043e\u0441\u043e\u0447\u043a\u0438, \u043b\u0435\u0432\u0435\u0435 \u043a\u0440\u0435\u0441\u0442\u0438\u043a\u0430 \u0438 \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043f\u043b\u044e\u0441\u0438\u043a\u0430, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f &#171;Manage Script Directories&#187;), \u0433\u0434\u0435 \u0447\u0435\u0440\u0435\u0437 \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u043f\u043b\u044e\u0441\u0438\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043e \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 (<code>$USER_HOME\/Documents\/GitHub\/SVD-Loader-Ghidra<\/code> \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435).  \u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u0438 \u0432 \u0444\u0438\u043b\u044c\u0442\u0440 \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432\u0432\u043e\u0434\u0438\u043c SVD, \u0447\u0442\u043e\u0431 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0439\u0442\u0438 \u0435\u0433\u043e:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/478\/a02\/5ea\/478a025ea06f8269efd04ce636158055.png\" alt=\"\u0441\u043a\u0440\u0438\u0442\u043f \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435\" title=\"\u0441\u043a\u0440\u0438\u0442\u043f \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435\" width=\"701\" height=\"225\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/478\/a02\/5ea\/478a025ea06f8269efd04ce636158055.png\"\/><\/p>\n<div><figcaption>\u0441\u043a\u0440\u0438\u0442\u043f \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0432\u043e\u0439\u043d\u044b\u043c \u043a\u043b\u0438\u043a\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e, \u043e\u043d \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 SVD \u0444\u0430\u0439\u043b. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <code>...GitHub\\cmsis-svd-data\\data\\TexasInstruments\\CC26x0.svd<\/code>.<\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 0x40000000.<\/p>\n<h3>\u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e ROM<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u044b\u0440\u0443\u044e \u043f\u043e\u0440\u0442\u044f\u043d\u043a\u0443, \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u0438\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u0432\u0435\u0441 \u0437\u043e\u043b\u043e\u0442\u0430. \u0410 \u043f\u043e\u0442\u043e\u043c\u0443, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c SDK, \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c, \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f. \u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0435\u0436\u0430\u0442\u044c. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0438\u0445 \u043d\u0430\u0439\u0442\u0438 \ud83d\ude42<\/p>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439: 1001c901, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0432\u0441\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0432 \u043b\u0438\u043d\u0443\u043a\u0441, \u0438:<\/p>\n<pre><code class=\"bash\">$ cd \/mnt\/c\/ti\/simplelink_cc2640r2_sdk_5_30_00_03 $ find . -name '*map' | xargs grep -i '1001c90'  .\/kernel\/tirtos\/packages\/ti\/sysbios\/rom\/cortexm\/cc26xx\/r2\/golden\/CC26xx\/rtos_rom.map:                  1001c900    00000020     arm_m3_Hwi_asm_rom.obj (.text:ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I) .\/kernel\/tirtos\/packages\/ti\/sysbios\/rom\/cortexm\/cc26xx\/r2\/golden\/CC26xx\/rtos_rom.map:1001c901  ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I                              .\/kernel\/tirtos\/packages\/ti\/sysbios\/rom\/cortexm\/cc26xx\/r2\/golden\/CC26xx\/rtos_rom.map:1001c901  ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I       <\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e! \u041d\u0430\u0434\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c. \u0412 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u0445 \u0441 \u0433\u0438\u0434\u0440\u043e\u0439 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <code>ImportSymbolsScript.py<\/code>, \u043d\u043e \u0438\u0433\u0440\u044b \u0441 \u043d\u0438\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438. \u041f\u043e\u0434 \u0441\u0432\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u044f \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u043b \u0435\u0433\u043e \u0434\u043e <a href=\"https:\/\/github.com\/datacompboy\/ghidra-arm-scripts\/blob\/main\/ArmImportSymbolsScript.py\" rel=\"noopener noreferrer nofollow\">ArmImportSymbolsScript.py<\/a>. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f: \u0435\u0441\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b \u044d\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e \u0447\u0435\u0442\u043d\u043e\u0433\u043e \u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f dword, \u0447\u0442\u043e\u0431\u044b \u0430\u0434\u0440\u0435\u0441+1 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0442\u043e\u043c.<\/p>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0430\u043c \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0430\u0434\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442: &lt;\u0438\u043c\u044f> &lt;\u0430\u0434\u0440\u0435\u0441> &lt;\u0442\u0438\u043f f \u0438\u043b\u0438 \u043d\u0435\u0442>.<\/p>\n<p>\u0410 \u0435\u0449\u0435, \u043a\u0430\u0440\u0442\u0430 \u0445\u043e\u0442\u044c \u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0434\u043b\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0442\u043e, \u0447\u0442\u043e \u043d\u0438\u0436\u0435 1xxxxxxx &#8212; \u043d\u0435 \u0432\u0441\u0451 \u043f\u0440\u0430\u0432\u0434\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>00001a25  main<\/code> &#8212; \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 main.<\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 &#8212; \u043d\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u043a\u0430\u0440\u0442\u043e\u0439, \u0430 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u0438\u043a:<\/p>\n<pre><code class=\"bash\">$ cd \/mnt\/c\/ti\/simplelink_cc2640r2_sdk_5_30_00_03 $ mkdir symbols $ objdump -t .\/kernel\/tirtos\/packages\/ti\/sysbios\/rom\/cortexm\/cc26xx\/r2\/golden\/CC26xx\/CC2640R2F_rtos_rom_syms.out | perl -ne '@a=split;print \"$a[-1] $a[0] $a[2]\\n\" if $a[1] eq \"g\"' > symbols\/rom.txt<\/code><\/pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u044b\u043c \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u043e <code>ArmImportSymbolsScript.py<\/code> \u0432 Scripts Manager, \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u0444\u0430\u0439\u043b \u0438\u0437 <code>C:\\ti\\simplelink...\\scripts\\rom.txt<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/44a\/2f8\/ec4\/44a2f8ec44dcd94f71e1c9e266e405dd.png\" alt=\"\u0423\u0436\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u043c\u044b\u0441\u043b\" title=\"\u0423\u0436\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u043c\u044b\u0441\u043b\" width=\"932\" height=\"382\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/44a\/2f8\/ec4\/44a2f8ec44dcd94f71e1c9e266e405dd.png\"\/><\/p>\n<div><figcaption>\u0423\u0436\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u043c\u044b\u0441\u043b<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"bash\">$ for k in source\/ti\/ble5stack\/rom\/ble_rom_releases\/cc26xx_r2\/Final_Release\/*symbols; do     objdump -t $k | perl -ne '@a=split;print \"$a[-1] $a[0] $a[2]\\n\" if $a[1] eq \"g\"' > symbols\/${k##*\/}.txt   done<\/code><\/pre>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c <code>ble_r2.symbols.txt<\/code> \u0438 <code>common_r2.symbols.txt<\/code>.<\/p>\n<h3>\u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 API SDK<\/h3>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u0432 \u043a\u0430\u0440\u0442\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u0441 \u0430\u0434\u0440\u0435\u0441\u0430 0x1000 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f &#171;TI RTOS ROM Jump Table&#187;. \u0415\u0441\u043b\u0438 \u0441\u0445\u043e\u0434\u0438\u043c \u0442\u0443\u0434\u0430, \u0443\u0432\u0438\u0434\u0438\u043c \u043a\u0443\u0447\u0443 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439. \u041d\u043e \u043d\u0435 \u0434\u0436\u0430\u043c\u043f\u043e\u0432&#8230; \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432 TI \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432 &#8212; &#171;ROM_Flash_JT&#187; &#8212; \u043e\u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043f\u043e 0x1000, \u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0435\u0451 \u043b\u0435\u0433\u043a\u043e: \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u0437 \u0442\u0435\u0445, \u0447\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0448\u043b\u0438 \u0432 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u0445 &#8212; \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <strong>HCI_bm_alloc<\/strong> &#8212; \u0438 \u043d\u0430\u0439\u0442\u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0435\u0451:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/10b\/cfc\/c08\/10bcfcc08934a9a18e86a53487a33b8a.png\" alt=\"\u0422\u0430\u0431\u043b\u0438\u0447\u043a\u0430\" title=\"\u0422\u0430\u0431\u043b\u0438\u0447\u043a\u0430\" width=\"1077\" height=\"1142\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/10b\/cfc\/c08\/10bcfcc08934a9a18e86a53487a33b8a.png\"\/><\/p>\n<div><figcaption>\u0422\u0430\u0431\u043b\u0438\u0447\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043e\u043d\u0430. \u041f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0432 &#171;ROM_Flash_JT&#187;. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0432 <code>rom_init.c<\/code> (\u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c<br \/><code>C:\\ti\\simplelink_cc2640r2_sdk_5_30_00_03\\source\\ti\\blestack\\rom\\r2\\rom_init.c<\/code>), \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043a\u0443\u0447\u0443 \u0438\u043c\u0451\u043d. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u042f \u043d\u0430\u043a\u0438\u0434\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442\u0438\u043a <a href=\"https:\/\/github.com\/datacompboy\/ghidra-arm-scripts\/blob\/main\/ROM_Flash_JT.py\" rel=\"noopener noreferrer nofollow\">ROM_Flash_JT<\/a> &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c rom_init.c, \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0435\u043c\u0441\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/402\/2e6\/263\/4022e6263b5eae7875a4c17be5f0c09f.png\" alt=\"\u0415\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043c\u044b\u0441\u043b\u0430!\" title=\"\u0415\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043c\u044b\u0441\u043b\u0430!\" width=\"1012\" height=\"1103\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/402\/2e6\/263\/4022e6263b5eae7875a4c17be5f0c09f.png\"\/><\/p>\n<div><figcaption>\u0415\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043c\u044b\u0441\u043b\u0430!<\/figcaption><\/div>\n<\/figure>\n<h3>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 ROM2RAM<\/h3>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u043a\u043e\u0433\u0434\u0430 \u0432 \u043a\u043e\u0434\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430<\/p>\n<pre><code class=\"cpp\">const char * str = \"MyString\"; char * str2 = \"OtherString\";<\/code><\/pre>\n<p>\u0442\u043e <code>str<\/code> \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 ROM, \u0442\u043e <code>str2<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 RAM, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0451 \u043c\u0435\u043d\u044f\u0442\u044c. \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438 \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0443 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u0432 ROM. \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u043e \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 GCC \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0432 TI SDK (\u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c <a href=\"https:\/\/downloads.ti.com\/dsps\/dsps_public_sw\/sdo_sb\/targetcontent\/rtsc\/\" rel=\"noopener noreferrer nofollow\">XDC Tools<\/a>), \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u043e\u0434\u0430. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 <a href=\"https:\/\/github.com\/datacompboy\/ghidra-arm-scripts\/blob\/main\/arm-romtoram.py\" rel=\"noopener noreferrer nofollow\">arm-romtotram<\/a>, \u0437\u0430\u0442\u0435\u043c \u0438\u0434\u0451\u043c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 Reset:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0d3\/c1a\/820\/0d3c1a820b0ea964e11f84886aca89bc.png\" alt=\"\u0421\u0430\u043c\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0440\u0442\u0430\" title=\"\u0421\u0430\u043c\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0440\u0442\u0430\" width=\"1102\" height=\"773\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0d3\/c1a\/820\/0d3c1a820b0ea964e11f84886aca89bc.png\"\/><\/p>\n<div><figcaption>\u0421\u0430\u043c\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0440\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dfb\/72e\/8d5\/dfb72e8d530e2b7cb55adbcd4d695da1.png\" alt=\"unpackRomToRam\" title=\"unpackRomToRam\" width=\"846\" height=\"281\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dfb\/72e\/8d5\/dfb72e8d530e2b7cb55adbcd4d695da1.png\"\/><\/p>\n<div><figcaption>unpackRomToRam<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0437 \u043d\u0435\u0451 \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0438 \u043c\u0435\u0442\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>&#171;ROMtoRAMtable&#187; &#8212; \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u0430,<\/p>\n<\/li>\n<li>\n<p>&#171;ROMtoRAMtableEnd&#187; &#8212; \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u0430 (\u0433\u0438\u0434\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043c \u043c\u0435\u0442\u043a\u0443, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0434\u0432\u0430\u0436\u0434\u044b \u043a\u043b\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0430 \u043d\u0435\u0451, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043a\u043d\u043e\u043f\u043a\u043e\u0439 &#171;p&#187; \u0438 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 &#171;L&#187; \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043a\u0443 &#171;ROMtoRAMtableEnd&#187;),<\/p>\n<\/li>\n<li>\n<p>\u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430 &#8212; &#171;ROMtoRAM_Processors&#187;.<\/p>\n<\/li>\n<\/ul>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">void unpackRomToRam(void) {   byte **ppbVar1;   for (ppbVar1 = (byte **)&amp;ROMtoRAMtable; ppbVar1 &lt; &amp;ROMtoRAMtableEnd; ppbVar1 = ppbVar1 + 2) {     (*(code *)(&amp;ROMtoRAM_Processors)[**ppbVar1])(*ppbVar1 + 1,ppbVar1[1]);   }   xdc_runtime_Startup_exec__E();   return; }<\/code><\/pre>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0447\u0435\u0433\u043e-\u0442\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0435\u0433\u043e LZ (\u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0431\u0430\u0439\u0442 \u043a\u0430\u043a \u0435\u0441\u0442\u044c, \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c N \u0431\u0430\u0439\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 M \u0431\u0430\u0439\u0442 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0435), memcpy \u0438 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u043e\u043d\u0430. \u0421\u0430\u043c\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 rom2ram \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0440\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432 &#8212; \u0430\u0434\u0440\u0435\u0441 \u0432 ROM \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0449\u0438\u043a\u0430 \u0438 \u0430\u0434\u0440\u0435\u0441 \u0432 RAM \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043b\u0438 \u0432\u0441\u0435 \u0442\u0440\u0438 \u043c\u0435\u0442\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c &#171;arm-romtoram&#187; \u0441\u043a\u0440\u0438\u043f\u0442, \u0438 \u0431\u0443\u043b\u044c\u043a &#8212; \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e.<\/p>\n<h3>\u0410\u043d\u0430\u043b\u0438\u0437 \u043a\u043e\u0434\u0430<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u043e\u0434, \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0441\u044f\u0442 \u0432 SysTick \u0438 IRQ. \u042d\u0442\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438, \u0430 \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0431\u0440\u043e\u0441\u0438\u043c \u0438\u0437 \u0447\u0435\u0440\u0435\u0437 &#171;c&#187;, \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u0443\u0435\u043c SysTick \u0432 &#171;Begin&#187; \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u043a\u043e\u0434\u043e\u043c \u0447\u0435\u0440\u0435\u0437 F12, \u0437\u0430\u0442\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 &#171;f&#187;.<\/p>\n<p>\u041a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0435\u0433\u043e-\u0442\u043e:<\/p>\n<pre><code class=\"cpp\">  FUN_0000c9d0(&amp;DAT_20001130,&amp;DAT_20001150);   ti_sysbios_knl_Queue_construct(&amp;DAT_2000118c,0);   DAT_20001154 = &amp;DAT_2000118c;   FUN_0000cdfc(&amp;DAT_2000120c,&amp;LAB_000100e2+1,0,8);   FUN_0000cdfc(&amp;DAT_20001230,&amp;LAB_000100e2+1,3,4);   FUN_0000cdfc(&amp;DAT_20001254,&amp;LAB_000100e2+1,0,0xb);   FUN_0000cdfc(&amp;DAT_200011e8,&amp;LAB_000100e2+1,0,3);   DAT_20002038 = FUN_00009730(&amp;DAT_20002040,&amp;DAT_20002064);   if (DAT_20002038 == 0) {     do {                     \/* WARNING: Do nothing block with infinite loop *\/     } while( true );   }   FUN_00005bf4(0x10,0xe165,0x1f,6);   uVar20 = 0;   local_5c = 9;   local_5e = 8;   local_53 = 0;   local_56 = 0;   local_5a = 100;   local_58 = 1000;   FUN_0000363c(0x306,2,&amp;local_56);   FUN_0000363c(0x308,0x10,&amp;DAT_200011a4);   FUN_0000363c(0x307,7,&amp;DAT_20001174);   FUN_0000363c(0x310,1,&amp;local_53);   FUN_0000363c(0x311,2,&amp;local_5e);   FUN_0000363c(0x312,2,&amp;local_5c);   FUN_0000363c(0x313,2,&amp;local_5a);   FUN_0000363c(0x314,2,&amp;local_58);   FUN_00005bf4(0x10,0xe165,6,0xa0);   FUN_00005bf4(0x10,0xe165,7,0xa0);   FUN_00005bf4(0x10,0xe165,8,0xa0);   FUN_00005bf4(0x10,0xe165,9,0xa0);   local_64 = 0;   local_50 = 0;   local_52 = 1;   local_51 = 1;   local_4f = 1;   FUN_00005bf4(0x10,&amp;DAT_00003fb5,0x408,4,&amp;local_64);   FUN_00005bf4(0x10,&amp;DAT_00003fb5,0x400,1,&amp;local_52);   FUN_00005bf4(0x10,&amp;DAT_00003fb5,0x402,1,&amp;local_51);   FUN_00005bf4(0x10,&amp;DAT_00003fb5,0x403,1,&amp;local_50);   FUN_00005bf4(0x10,&amp;DAT_00003fb5,0x406,1,&amp;local_4f);   FUN_00005bf4(0x10,&amp;LAB_0000f3f8+1,&amp;DAT_2000117c); <\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0435\u0433\u043e. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c (\u0447\u0435\u0440\u0435\u0437 Notepad++ \u0438\u043b\u0438 grep&#8217;\u043e\u043c):<\/p>\n<pre><code class=\"bash\">datacompboy@NUUBOX:\/mnt\/c\/ti\/simplelink_cc2640r2_sdk_5_30_00_03$ find . -name '*.h' | xargs grep 0x306 .\/kernel\/tirtos\/packages\/gnu\/targets\/arm\/libs\/install-native\/arm-none-eabi\/include\/elf.h:#define NT_S390_LAST_BREAK0x306 .\/source\/ti\/blestack\/profiles\/roles\/cc26xx\/broadcaster.h:#define GAPROLE_ADV_EVENT_TYPE      0x306  \/\/!&lt; Advertisement Type. Read\/Write. Size is uint8_t.  Default is GAP_ADTYPE_ADV_IND (defined in GAP.h). .\/source\/ti\/blestack\/profiles\/roles\/cc26xx\/multi.h:#define GAPROLE_ADVERT_OFF_TIME     0x306 .\/source\/ti\/blestack\/profiles\/roles\/cc26xx\/peripheral.h:#define GAPROLE_ADVERT_OFF_TIME     0x306 .\/source\/ti\/blestack\/profiles\/roles\/peripheral_broadcaster.h:#define GAPROLE_ADVERT_OFF_TIME     0x306  \/\/!&lt; Advertising Off Time for Limited advertisements (in milliseconds). Read\/Write. Size is uint16. Default is 30 seconds.<\/code><\/pre>\n<p>\u041e, \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u0443 \u043d\u0430\u0441 \u0436\u0435 \u0441\u0435\u043d\u0441\u043e\u0440, \u0437\u043d\u0430\u0447\u0438\u0442 \u0438\u0437 peripheral. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0432 \u0433\u0438\u0434\u0440\u0443:<\/p>\n<p><em>File=>Parse C source=>\u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u043f\u043b\u044e\u0441=>&#187;c:\\ti\\simplelink_cc2640r2_sdk_5_30_00_03\\source\\ti\\blestack\\profiles\\roles\\cc26xx\\peripheral.h&#187;=>Parse to program.<\/em><\/p>\n<p>\u0420\u0443\u0433\u043d\u0451\u0442\u0441\u044f \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e, \u043d\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f. \u0422\u044b\u043a\u0430\u0435\u043c \u0432 &#171;0x306&#187;, \u0436\u043c\u0451\u043c &#171;E&#187; \u0432\u0438\u0434\u0438\u043c GAPROLE_ADVERT_OFF_TIME &#8212; \u0434\u0432\u043e\u0439\u043d\u044b\u043c \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c. \u041d\u0438\u0436\u0435 \u0432\u0438\u0434\u0438\u043c 408\/400\/402&#8230; \u041c\u043e\u0436\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0441 \u043d\u0438\u043c, \u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u0437\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u044b.<\/p>\n<p>\u041f\u043e\u0438\u0449\u0435\u043c \u043d\u0430 \u0442\u0435\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441 GAPROLE_SCAN_RSP_DATA:<\/p>\n<pre><code class=\"bash\">$ find . -name '*.c' | xargs grep GAPROLE_SCAN_RSP_DATA .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/multi_role\/src\/app\/multi_role.c:    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/project_zero\/src\/app\/project_zero.c:  GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), scanRspData); .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/simple_broadcaster\/src\/app\/simple_broadcaster.c:    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof (scanRspData), .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/simple_np\/src\/app\/simple_np_gap.c:    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/simple_np\/src\/app\/simple_np_gap.c:        status = GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, len, pDataPtr); .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/simple_peripheral\/src\/app\/simple_peripheral.c:    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/simple_peripheral\/src\/app\/simple_peripheral_dbg.c:    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/simple_peripheral_oad_offchip\/src\/app\/simple_peripheral_oad_offchip.c:    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/simple_peripheral_oad_onchip\/src\/app\/simple_peripheral_oad_onchip.c:    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/simple_peripheral_oad_onchip\/src\/persistent_app\/oad_persistent_app.c:    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), .\/examples\/rtos\/CC2640R2_LAUNCHXL\/blestack\/simple_peripheral_secure_fw\/src\/app\/simple_peripheral_dbg.c:    GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData), <\/code><\/pre>\n<p>\u0427\u0442\u043e \u0443 \u043d\u0430\u0441 \u0442\u0430\u043c \u0432 simple_peripheral.c:<\/p>\n<pre><code class=\"cpp\">  \/\/ Setup the Peripheral GAPRole Profile. For more information see the User's   \/\/ Guide:   \/\/ http:\/\/software-dl.ti.com\/lprf\/sdg-latest\/html\/   {     \/\/ By setting this to zero, the device will go into the waiting state after     \/\/ being discoverable for 30.72 second, and will not being advertising again     \/\/ until re-enabled by the application     uint16_t advertOffTime = 0;      uint8_t enableUpdateRequest = DEFAULT_ENABLE_UPDATE_REQUEST;     uint16_t desiredMinInterval = DEFAULT_DESIRED_MIN_CONN_INTERVAL;     uint16_t desiredMaxInterval = DEFAULT_DESIRED_MAX_CONN_INTERVAL;     uint16_t desiredSlaveLatency = DEFAULT_DESIRED_SLAVE_LATENCY;     uint16_t desiredConnTimeout = DEFAULT_DESIRED_CONN_TIMEOUT;      GAPRole_SetParameter(GAPROLE_ADVERT_OFF_TIME, sizeof(uint16_t),                          &amp;advertOffTime);      GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, sizeof(scanRspData),                          scanRspData);     GAPRole_SetParameter(GAPROLE_ADVERT_DATA, sizeof(advertData), advertData);      GAPRole_SetParameter(GAPROLE_PARAM_UPDATE_ENABLE, sizeof(uint8_t),                          &amp;enableUpdateRequest);     GAPRole_SetParameter(GAPROLE_MIN_CONN_INTERVAL, sizeof(uint16_t),                          &amp;desiredMinInterval);     GAPRole_SetParameter(GAPROLE_MAX_CONN_INTERVAL, sizeof(uint16_t),                          &amp;desiredMaxInterval);     GAPRole_SetParameter(GAPROLE_SLAVE_LATENCY, sizeof(uint16_t),                          &amp;desiredSlaveLatency);     GAPRole_SetParameter(GAPROLE_TIMEOUT_MULTIPLIER, sizeof(uint16_t),                          &amp;desiredConnTimeout);   }<\/code><\/pre>\n<p>\u0425\u0430! 1-\u0432-1: GAPROLE_ADVERT_OFF_TIME, GAPROLE_SCAN_RSP_DATA, GAPROLE_ADVERT_DATA, GAPROLE_PARAM_UPDATE_ENABLE&#8230;<\/p>\n<p>\u041f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c FUN_0000363c => GAPRole_SetParameter, \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"cpp\">  \/\/ Set the Device Name characteristic in the GAP GATT Service   \/\/ For more information, see the section in the User's Guide:   \/\/ http:\/\/software-dl.ti.com\/lprf\/sdg-latest\/html   GGS_SetParameter(GGS_DEVICE_NAME_ATT, GAP_DEVICE_NAME_LEN, attDeviceName);    \/\/ Set GAP Parameters to set the advertising interval   \/\/ For more information, see the GAP section of the User's Guide:   \/\/ http:\/\/software-dl.ti.com\/lprf\/sdg-latest\/html   {     \/\/ Use the same interval for general and limited advertising.     \/\/ Note that only general advertising will occur based on the above configuration     uint16_t advInt = DEFAULT_ADVERTISING_INTERVAL;      GAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MIN, advInt);     GAP_SetParamValue(TGAP_LIM_DISC_ADV_INT_MAX, advInt);     GAP_SetParamValue(TGAP_GEN_DISC_ADV_INT_MIN, advInt);     GAP_SetParamValue(TGAP_GEN_DISC_ADV_INT_MAX, advInt);   }<\/code><\/pre>\n<p>\u0425\u043c\u043c&#8230; \u0423 \u043d\u0430\u0441 \u0441\u043b\u0435\u0434\u043e\u043c \u0437\u0430 \u043f\u0430\u0447\u043a\u043e\u0439 GAPRole_SetParameter \u0438\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u0432\u044b\u0437\u043e\u0432\u0430, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0435\u0433\u043e \u0432\u044b\u0437\u043e\u0432 GGS_SetParameter \u043d\u0435\u0442. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 &#8212; \u0435\u0451 \u0432\u044b\u0440\u0435\u0437\u0430\u043b\u0438 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u041d\u043e \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 &#8212; GAP_SetParamValue \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0434\u0432\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u0430 \u0443 \u043d\u0430\u0441 4:<\/p>\n<pre><code class=\"cpp\">  FUN_00005bf4(0x10,0xe165,6,0xa0);   FUN_00005bf4(0x10,0xe165,7,0xa0);   FUN_00005bf4(0x10,0xe165,8,0xa0);   FUN_00005bf4(0x10,0xe165,9,0xa0);<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u043d\u0438:<\/p>\n<pre><code class=\"bash\">$ find . -name '*.h' | xargs grep TGAP_LIM_DISC_ADV_INT_MAX .\/source\/ti\/blestack\/inc\/gap.h:#define TGAP_LIM_DISC_ADV_INT_MAX      7<\/code><\/pre>\n<p>\u0414\u0430, \u043e\u043d\u0438&#8230;. \u0410 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 GAP_SetParamValue, \u043c\u043e\u0436\u0435\u0442, \u044d\u0442\u043e \u043c\u0430\u043a\u0440\u043e\u0441?<\/p>\n<pre><code class=\"bash\">$ find . -name '*.h' | xargs grep GAP_SetParamValue .\/source\/ti\/ble5stack\/icall\/inc\/ble_dispatch_lite_idx.h:#define IDX_GAP_SetParamValue                            JT_INDEX(152) .\/source\/ti\/ble5stack\/icall\/inc\/icall_api_idx.h:#define IDX_GAP_SetParamValue                         GAP_SetParamValue .\/source\/ti\/ble5stack\/icall\/inc\/icall_ble_api.h:#define GAP_SetParamValue(...)                                                          (icall_directAPI(ICALL_SERVICE_CLASS_BLE, (uint32_t) IDX_GAP_SetParamValue , ##__VA_ARGS__)) .\/source\/ti\/ble5stack\/icall\/inc\/icall_ble_apimsg.h: * @see GAP_SetParamValue() .\/source\/ti\/ble5stack\/inc\/gap.h: * Parameters set via @ref GAP_SetParamValue .\/source\/ti\/ble5stack\/inc\/gap.h:extern bStatus_t GAP_SetParamValue(uint16_t paramID, uint16_t paramValue); .\/source\/ti\/ble5stack\/rom\/map_direct.h:#define MAP_GAP_SetParamValue                                        GAP_SetParamValue<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043e\u043d\u043e \u0447\u0442\u043e! \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0444\u043b\u0430\u0433\u043e\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0432\u044b\u0437\u043e\u0432 \u043b\u0438\u0431\u043e \u043f\u0440\u044f\u043c\u043e\u0439, \u043b\u0438\u0431\u043e \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u0436\u0430\u043c\u043f\u043e\u0432 (\u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c 152), \u043b\u0438\u0431\u043e \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043e \u043f\u0440\u044f\u043c\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443. \u0423\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e ICALL_SERVICE_CLASS_BLE == 0x10:<\/p>\n<pre><code class=\"bash\">$ find . -name '*.h' | xargs grep ICALL_SERVICE_CLASS_BLE ... .\/source\/ti\/blestack\/icall\/src\/inc\/icall.h:#define ICALL_SERVICE_CLASS_BLE            0x0010 .\/source\/ti\/blestack\/icall\/src\/inc\/icall.h:#define ICALL_SERVICE_CLASS_BLE_MSG        0x0050 .\/source\/ti\/blestack\/icall\/src\/inc\/icall.h:#define ICALL_SERVICE_CLASS_BLE_BOARD      0x0088 ...<\/code><\/pre>\n<p>\u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u0443\u0435\u043c FUN_00005bf4 \u0432 icall_directAPI, \u0430\u0434\u0440\u0435\u0441 0xe165 \u0432 GAP_SetParamValue. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">    GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t), &amp;pairMode);     GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &amp;mitm);     GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), &amp;ioCap);     GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &amp;bonding);     GAPBondMgr_SetParameter(GAPBOND_LRU_BOND_REPLACEMENT, sizeof(uint8_t), &amp;replaceBonds);<\/code><\/pre>\n<p>\u043a\u0430\u043a \u0440\u0430\u0437 408, 400, &#8230; \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c 0x3fb5 => GAPBondMgr_SetParameter.<\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0430\u043b\u044c\u0448\u0435, \u0432\u043f\u0440\u043e\u0447\u0435\u043c \u043d\u0435 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0422\u0430\u043a\u0438 \u043b\u0438\u0431\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439, \u043b\u0438\u0431\u043e \u0442\u0430\u043a\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0442\u0438\u043f\u0430 GSS \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u044b.<\/p>\n<p><em>\u0417\u0430\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u043f\u043e\u043b\u044f\u0445: \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u0432\u0430\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u043c. \u0412\u044b\u0448\u0435 \u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0432\u044b\u0432\u043e\u0434 strings, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u0435\u0449\u0438 &#8212; &#171;inputGyroRv&#187; \u0438 &#171;inputNormal&#187;. <\/em><a href=\"https:\/\/www.google.com\/search?q=inputGyroRv+inputNormal+site%3Agithub.com\" rel=\"noopener noreferrer nofollow\"><em>\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u043d\u0438\u043c \u043d\u0430 github<\/em><\/a><em> \u0434\u0430\u043b \u0441\u0445\u043e\u0434\u0443 <\/em><a href=\"https:\/\/github.com\/hcrest\/bno080-driver\/blob\/master\/sh2.c\" rel=\"noopener noreferrer nofollow\"><em>\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0432\u0435\u0449\u044c<\/em><\/a><em>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0435\u0449\u0435 \u0440\u0430\u0437\u043c\u0435\u0442\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u043d\u0441\u043e\u0440 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u043d\u043e\u0433 \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0444\u043a\u0443\u0441\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u043e\u0441\u044c.<\/em><\/p>\n<p>\u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u0436, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438. \u0418\u043d\u0430\u0447\u0435 \u0437\u0430\u0447\u0435\u043c \u043d\u0430\u043c \u044d\u0442\u043e \u0432\u0441\u0451?<\/p>\n<h2>\u0418\u0433\u0440\u0430\u0435\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u043e\u0439<\/h2>\n<p>\u0414\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430, \u043c\u044b \u0443\u0436\u0435 \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u043b\u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 &#171;KATVR&#187;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u043d\u043e\u043d\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430 &#171;KAT-F&#187; (\u0442\u0438\u043f\u0430 &#171;\u041d\u043e\u0433\u0438&#187;). \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u041a\u0430\u0436\u0434\u044b\u0439 \u0441\u0435\u043d\u0441\u043e\u0440 \u043f\u0440\u043e\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0442\u0438\u043f\u043e\u043c &#8212; \u043b\u0435\u0432\u044b\u0439 \u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u044b\u0439 &#8212; \u0445\u043e\u0440\u043e\u0448\u043e \u0431\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0435\u0431\u044f &#171;KAT-R&#187; \u0438\u043b\u0438 &#171;KAT-L&#187;! \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u043d\u0430\u0439\u0442\u0438 \u0433\u0434\u0435 \u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0435\u0433\u043e \u0442\u0438\u043f (\u043b\u0435\u0432\u044b\u0439-\u043f\u0440\u0430\u0432\u044b\u0439).<\/p>\n<p>\u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u043f\u0430\u0440\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0441\u0438\u0442 \u043d\u0430 USB, \u0438 \u043f\u0430\u043a\u0435\u0442\u044b 0x55\/0xAA. \u041f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u043d\u0438\u0437 \u043d\u0430\u0442\u044b\u043a\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043a\u0443\u0441\u043e\u043a:<\/p>\n<pre><code class=\"cpp\">    case 0xc:         cVar6 = *(char *)(puVar23 + 1);         pcVar26 = *(char **)(puVar23 + 2);         FUN_0000af16(&amp;DAT_200011c8,0,0x1f);         if ((*pcVar26 == 'U') &amp;&amp; (pcVar26[1] == -0x56)) {         DAT_200011cb = 0;         DAT_200011c8 = 0x55;         DAT_200011c9 = 0xaa;         cVar4 = (char)local_48;         cVar7 = DAT_200011c0;         if (cVar6 == '\\x01') { ....<\/code><\/pre>\n<p>\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 &#171;\u043f\u0430\u043a\u0435\u0442 \u043f\u043e USB&#187; \u0438 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u043d\u0435\u0433\u043e. WriteDeviceId \u044d\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 0x04:<\/p>\n<pre><code class=\"cpp\">        if (cVar6 == '\\x03') {             DAT_200011cc = '\\x03';             cVar4 = DAT_200011cc;             cVar7 = DAT_200011c1;             goto LAB_000009b8;         }         if (cVar6 == '\\x04') {             DAT_200011c1 = pcVar26[5];             PostMsg(7,0,0);             DAT_200011cd = 0;             DAT_200011cc = '\\x04';             FUN_0000fa20();             FUN_0000f8ec();             break;         }<\/code><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434 &#8212; DAT_200011c1 \u044d\u0442\u043e \u0438\u0441\u043a\u043e\u043c\u044b\u0439 ID \u0441\u0435\u043d\u0441\u043e\u0440\u0430, \u043e\u043d \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0432 ReadDeviceId (\u043a\u043e\u043c\u0430\u043d\u0434\u0430 0x03). \u041a\u0440\u043e\u0441\u0441-\u0440\u0435\u0444\u0435\u0440\u0435\u0441 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"cpp\">void FUN_0000f8ec(void) {   if (ParamDeviceId == '\\x03') {     DAT_20001132 = 5;   }   else {     DAT_20001132 = 4;   }   return; }<\/code><\/pre>\n<p>\u041a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430\u0436\u0434\u044b \u0438\u0437 Begin() &#8212; \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432) \u0438 \u043f\u043e\u0441\u043b\u0435 WriteDeviceId. \u0418\u0434\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0432\u0440\u0435\u0437\u043a\u0438!<\/p>\n<p>\u0418\u0437\u0443\u0447\u0438\u043c \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440:<\/p>\n<pre><code class=\"assembly\">                             *************************************************************                              *                           FUNCTION                                                        *************************************************************                              undefined  FUN_0000f8ec ()              undefined         r0:1           &lt;RETURN>                              FUN_0000f8ec                                    XREF[2]:     0000038c (c) , 000009a4 (c)            0000f8ec 04  49           ldr        r1,[DAT_0000f900 ]                               = 20001130h         0000f8ee 91  f8  91  00    ldrb.w     r0,[r1,#0x91 ]=>ParamDeviceId         0000f8f2 03  28           cmp        r0,#0x3         0000f8f4 14  bf           ite        ne         0000f8f6 04  20           mov.ne     r0,#0x4         0000f8f8 05  20           mov.eq     r0,#0x5         0000f8fa 88  70           strb       r0,[r1,#0x2 ]=>DAT_20001132         0000f8fc 70  47           bx         lr         0000f8fe c0              ??         C0h         0000f8ff 46              ??         46h    F                              DAT_0000f900                                    XREF[1]:     FUN_0000f8ec:0000f8ec (R)            0000f900 30  11  00  20    undefine   20001130h                                        ?  ->  20001130 <\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0440\u0443\u0437\u0438\u0442 \u0432 r1 \u0430\u0434\u0440\u0435\u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438\u0437 \u043d\u0435\u043f\u043e\u0434\u0430\u043b\u0451\u043a\u0443 \u043b\u0435\u0436\u0430\u0449\u0435\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b; \u0437\u0430\u0442\u0435\u043c \u0433\u0440\u0443\u0437\u0438\u0442 \u0432 r0 \u0431\u0430\u0439\u0442 \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u0430+\u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435. \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0431\u0430\u0439\u0442 \u0441 0x3 (\u043b\u0435\u0432\u0430\u044f \u043d\u043e\u0433\u0430), \u0438 \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <a href=\"https:\/\/community.arm.com\/arm-community-blogs\/b\/architectures-and-processors-blog\/posts\/condition-codes-3-conditional-execution-in-thumb-2\" rel=\"noopener noreferrer nofollow\">&#171;ite ne&#187;<\/a>.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432. \u0412 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u043c ARM \u0440\u0435\u0436\u0438\u043c\u0435 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u043d\u0430 \u043f\u0440\u0438 \u0444\u043b\u0430\u0433\u0430\u0445, \u0432 thumb \u0440\u0435\u0436\u0438\u043c\u0435 \u0432\u0441\u0451 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 &#8212; (I)f,(T)hen,(E)lse, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e &#171;IT&#187; (if-then, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0435\u0441\u043b\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u0435), ITT (if-then-then, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0432\u0435). \u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442 1 \u0434\u043e 4 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0432\u0441\u0435\u0433\u0434\u0430 then.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0434\u0432\u0430 mov \u0432 R0, \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u0435\u0441\u043b\u0438 R0 != 3, \u0432\u0442\u043e\u0440\u0430\u044f \u0435\u0441\u043b\u0438 R0 == 3.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0430\u0439\u0442 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0438 \u0438\u0434\u0451\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 lr. \u0422\u0430\u043a \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0442\u0440\u043e\u0433\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b r0 \u0438 r1 (\u043e\u043d\u0438 \u0436\u0435 &#8212; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439), \u0438\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430 (\u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435), \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c (bx lr + nop) \u043d\u0430 \u043e\u0434\u0438\u043d \u0434\u043b\u0438\u043d\u043d\u044b\u0439 jmp \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 ROMtoRAM \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0443 \u043d\u0430\u0441 \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u0443\u0441\u0442\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u0432\u0441\u0451 \u043d\u0443\u043b\u0438. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043e\u0442\u043c\u043e\u0442\u0430\u0435\u043c \u0434\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 (0x12e10) \u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0435\u043c \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u043f\u0438\u0441\u0430\u0442\u044c. \u041f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c &#171;KATVR&#187; \u0432 &#171;KAT-L&#187; \u0438\u043b\u0438 &#171;KAT-R&#187; \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c R0 \u0432 L \u0438\u043b\u0438 R, \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0443\u0434\u0430-\u043d\u0430\u0434\u043e. \u0410 \u043a\u0443\u0434\u0430? \u0421\u0442\u0440\u043e\u043a\u0430 &#171;KATVR&#187; \u043d\u0430\u0441 \u0434\u0432\u0430\u0436\u0434\u044b: \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 \u041f\u0417\u0423 \u0447\u0430\u0441\u0442\u0438, \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 \u041e\u0417\u0423 \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 \u0434\u043b\u044f \u0430\u043d\u043e\u043d\u0441\u0430:<\/p>\n<pre><code class=\"assembly\">                             DAT_200011a4                                    XREF[1]:     000000ee (*)            200011a4 06              ??         06h         200011a5 09              ??         09h         200011a6 4b              ??         4Bh    K         200011a7 41              ??         41h    A         200011a8 54              ??         54h    T         200011a9 56              ??         56h    V         200011aa 52              ??         52h    R         200011ab 05              ??         05h<\/code><\/pre>\n<p>\u0418\u0442\u043e\u0433\u043e, \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442:<\/p>\n<pre><code class=\"cpp\">  if(left) {     scanRsp[6] = 'L';   } else {     scanRsp[6] = 'R';   }   scanRsp[5] = '-'; \/\/ \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0442\u0447 \u0432 ROM, \u043c\u043e\u0436\u043d\u043e \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0443\u0442<\/code><\/pre>\n<p>\u041a \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 R0 \u0443 \u043d\u0430\u0441 4 \u0438\u043b\u0438 5 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u043e\u0433\u0438, \u0430 \u0432 R1 \u0443 \u043d\u0430\u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 20001130. \u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 20001130 \u0434\u043e 200011A9 &#8212; 0x79. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0443 \u043d\u0430\u0441 \u0435\u0449\u0435 \u0438 \u0444\u043b\u0430\u0433\u0438 \u0443\u0436\u0435 \u0441\u0442\u043e\u044f\u0442 \u0441 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435:<\/p>\n<pre><code class=\"assembly\">  ite ne   mov.ne r0,#'L'   mov.eq r0,#'R'   strb r0,[R1,#0x7A]   mov r0,#'-'   strb r0,[R1,#0x79]   bx lr<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u0432 \u0433\u0438\u0434\u0440\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043e\u0442 \u0440\u0435\u0436\u0438\u043c\u0430 (\u0435\u0441\u043b\u0438 \u0442\u0430\u043c \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438), \u0437\u0430\u0442\u0435\u043c \u0447\u0435\u0440\u0435\u0437 ctrl+shift+g \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043e\u043d\u0430 \u0440\u0443\u0433\u043d\u0451\u0442\u0441\u044f \u0447\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d. \u0412\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0432\u043e\u044e\u0435\u043c \u0441 \u043d\u0435\u0439 \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u043d\u043e \u0432\u0440\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f. \u041f\u0440\u0430\u0432\u0434\u0430 \u043d\u0430 &#171;<a href=\"http:\/\/mov.ne\" rel=\"noopener noreferrer nofollow\">mov.ne<\/a> r0,#&#8217;L'&#187; \u043e\u043d\u0430 \u043e\u0442\u043a\u0430\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c! \u041a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c, \u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f <a href=\"https:\/\/shell-storm.org\/online\/Online-Assembler-and-Disassembler\/?inst=b.w+%23-0xF7EC&amp;arch=arm-t&amp;as_format=hex#assembly\" rel=\"noopener noreferrer nofollow\">online assembler<\/a> \u0433\u0434\u0435 \u0432\u0432\u043e\u0434\u0438\u043b \u0438\u043d\u0441\u0442\u0443\u0440\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043b \u0431\u0430\u0439\u0442\u0438\u043a\u0438. &#171;mov r0, #&#8217;L'&#187; => &#171;4f f0 4c 00&#8243;&#8230; \u041d\u0435 \u043d\u0435, \u043d\u0430\u0434\u043e 2\u0445\u0431\u0430\u0439\u0442\u043d\u0443\u044e, &#171;movs r0, #&#8217;L'&#187; => &#171;4c 20&#187; &#8212; \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e. &#171;movs r0, #&#8217;R'&#187; => &#171;52 20&#187;. \u0418 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435&#8230;<\/p>\n<p>\u042d\u043c&#8230;. \u0427\u0442\u043e-\u0442\u043e \u0433\u0438\u0434\u0440\u0435 \u043f\u043e\u043f\u043b\u043e\u0445\u0435\u043b\u043e:<\/p>\n<pre><code class=\"assembly\">                             MoveFeetNumNew         00012e10 14  bf           ite        ne         00012e12 4c  20           mov.ne     r0,#0x4c         00012e14 52  20           mov.eq     r0,#0x52         00012e16 81  f8  7a  00    strb.eq.w  r0,[r1,#0x7a ]         00012e1a 81  f8  79  00    strb.eq.w  r0,[r1,#0x79 ]         00012e1e 70  47           bx.eq      lr<\/code><\/pre>\n<p>\u041d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443, \u043d\u043e \u0432 \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435 \u0437\u0430\u043b\u0438\u043f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0444\u043b\u0430\u0433\u043e\u0432. \u0416\u0430\u043b\u044c, \u043d\u043e, \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c. \u0417\u0430\u043b\u044c\u0435\u043c \u043f\u0430\u0442\u0447&#8230; \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \ud83d\ude41<\/p>\n<p>\u041d\u0430\u0434\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043d\u043e \u0435\u0449\u0435 \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c GAPRole_SetParameter(GAPROLE_SCAN_RSP_DATA, 0x10, &amp;scanRsp).<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u043e, \u0442\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 scanRsp \u0432 R2. \u041f\u043e\u043f\u0440\u0430\u0432\u0438\u043c \u043a\u043e\u0434:<\/p>\n<pre><code class=\"assembly\">  ite ne   mov.ne r0,#'L'   mov.eq r0,#'R'   adds.w r2,r1,#0x74   strb r0,[R2,#6]   movw r0,#0x308   movs r1,#0x10   b.w GAPRole_SetParameter<\/code><\/pre>\n<p>\u0412\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u0442\u0443\u0442 \u0433\u0438\u0434\u0440\u0435 \u0441\u043e\u0440\u0432\u0430\u043b\u043e \u043a\u0440\u044b\u0448\u0443, \u0434\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u043e\u0448\u043b\u0430 \u0441 \u0443\u043c\u0430. \u0422\u043a\u043d\u0451\u043c \u0432 &#171;b.w&#187; \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u0440\u0430\u0432\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u043c\u044b\u0448\u0438 \u0438 \u0447\u0435\u0440\u0435\u0437 &#171;modify instruction flow&#187; \u0441\u043c\u0435\u043d\u0438\u043c \u0435\u0451 \u043d\u0430 &#171;CALL_RETURN&#187;. \u0423\u0436\u0435 \u043b\u0443\u0447\u0448\u0435. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u043b\u0435\u0447\u0438\u0442\u044c \u0437\u0430\u043b\u0438\u043f\u0448\u0438\u0435 &#171;.eq&#187;, \u043c\u043e\u0436\u043d\u043e \u0442\u043a\u043d\u0443\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0432\u0443\u044e \u043a\u0440\u0438\u0432\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e (adds.eq.w) \u043f\u0440\u0430\u0432\u043e\u0439, \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c &#171;Clear Flow and Repair&#187;, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043e\u043f\u044f\u0442\u044c F12 &#8212; \u043a\u043e\u0434 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f (\u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435):<\/p>\n<pre><code class=\"assembly\">                             MoveFeetNumNew                                  XREF[1]:     MoveFeetNumSmt:0000f8fc (j)            00012e10 14  bf           ite        ne         00012e12 4c  20           mov.ne     r0,#0x4c         00012e14 52  20           mov.eq     r0,#0x52         00012e16 11  f1  74  02    adds.w     r2,r1,#0x74         00012e1a 90  71           strb       r0,[r2,#0x6 ]         00012e1c 40  f2  08  30    movw       r0,#0x308         00012e20 10  21           movs       r1,#0x10         00012e22 f0  f7  0b  bc    b.w        GAPRole_SetParameter                             undefined GAPRole_SetParameter()                              -- Flow Override: CALL_RETURN (CALL_TERMINATOR)<\/code><\/pre>\n<p>\u0414\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0442\u043e\u0436\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u043b\u0443\u0447\u0448\u0435:<\/p>\n<pre><code class=\"cpp\">void MoveFeetNumSmt(void) {   if (DeviceId == '\\x03') {     DAT_20001132 = 5;     UNK_200011aa = 0x52;   }   else {     DAT_20001132 = 4;     UNK_200011aa = 0x4c;   }   GAPRole_SetParameter(0x308,0x10);   return; }<\/code><\/pre>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u043e\u043d\u0430 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u0439 \u043f\u0440\u0430\u0432\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c Edit Function, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0442\u0438\u043f\u044b:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4fb\/110\/750\/4fb110750e54dd897025da27a0902fb5.png\" alt=\"\u041f\u0440\u0430\u0432\u0438\u043c \u0442\u0438\u043f\u044b\" title=\"\u041f\u0440\u0430\u0432\u0438\u043c \u0442\u0438\u043f\u044b\" width=\"875\" height=\"517\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4fb\/110\/750\/4fb110750e54dd897025da27a0902fb5.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0430\u0432\u0438\u043c \u0442\u0438\u043f\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u043e\u0434 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">void MoveFeetNumSmt(void) {   if (DeviceId == '\\x03') {     DAT_20001132 = 5;     UNK_200011aa = 0x52;   }   else {     DAT_20001132 = 4;     UNK_200011aa = 0x4c;   }   GAPRole_SetParameter(0x308,0x10,&amp;scanRspData);   return; }<\/code><\/pre>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u043e\u043f\u044f\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u0442\u0447 (File=>Export Program), &#171;fc.exe \/b .\\katvr_foot_orig.bin .\\katvr_foot.bin&#187; \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432 \u0441\u0435\u043d\u0441\u043e\u0440. \u0423\u0440\u0440\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! \ud83d\ude42 \u0412\u0438\u0434\u0438\u043c &#171;KAT-R&#187; \u0438 &#171;KAT-L&#187; \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0435 \u0432\u043e\u043a\u0440\u0443\u0433. \u041a\u0440\u0430\u0441\u043e\u0442\u0430.<\/p>\n<p>\u041f\u043e\u0438\u0433\u0440\u0430\u043b\u0438 &#8212; \u043f\u043e\u0440\u0430 \u0438 \u0434\u0435\u043b\u043e\u043c \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<h2>\u0420\u0430\u0437\u0433\u043e\u043d\u044f\u0435\u043c \u043d\u043e\u0433\u0438 \u043d\u0430 KatWalk C2 \u0434\u043e 133 \u0413\u0446<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0432 \u0447\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0441\u0435\u043d\u0441\u043e\u0440\u0430\u043c\u0438, \u043d\u0430\u0434\u043e \u0434\u0443\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u0435\u043d\u0441\u043e\u0440\u044b. \u0418\u0442\u0430\u043a, \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u0435\u043d\u0441\u043e\u0440\u044b \u043e\u0442\u0434\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 Notification. \u041f\u043e\u0439\u0434\u0451\u043c \u0438\u0441\u043a\u0430\u0442\u044c, \u0433\u0434\u0435 \u0436\u0435 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u0421\u043b\u0435\u0432\u0430 \u0432 &#171;Symbol tree&#187; \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u0432\u043e\u0434\u0438\u043c Notifi \u0438 \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 GATT_Noficiation. \u0421\u0441\u044b\u043b\u043e\u043a \u043d\u0435 \u0432\u0438\u0434\u043d\u043e. \u0417\u043d\u0430\u0447\u0438\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432, \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e 0x10010045 (\u0430\u0434\u0440\u0435\u0441+1, \u0438\u0431\u043e \u043a\u043e\u0434 \u0432 Thumb \u0440\u0435\u0436\u0438\u043c\u0435) \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043e\u0434\u043d\u0443 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0433\u0434\u0435 \u0438\u0434\u0451\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430, \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u0437\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">  _DAT_20001186 = 0x14;   _DAT_20001188 = (undefined *)thunk_EXT_FUN_10018404(DAT_20001142,0x1b,0x14,0,in_r3);   cVar1 = DAT_20000521;   if (_DAT_20001188 != (undefined *)0x0) {     _DAT_20001184 = 0x2e;     if (_DAT_20001146 == 0) {   ...   cVar1 = icall_directAPI(0x10,(int)&amp;GATT_Notification + 1,DAT_20001142,&amp;DAT_20001184,0);<\/code><\/pre>\n<p>0x2E &#8212; \u044d\u0442\u043e \u0436\u0435 \u043d\u0430\u0448 handle, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430, \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u043c\u0435\u0441\u0442\u043e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c, \u043a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"cpp\">void KatSendNotification() {   out = malloc(...);   if (out) {     if (packetNo == 0) {         out->_type = 0; \/\/ status packet         fill_charge_levels(out);     } else {         out->_type = 1; \/\/ data packet         if (!DATA_READY || !DATA_OK) {             out->_x = 0;             out->_y = 0;         } else {             DATA_READY = false;             out->_x = DATA_X;             out->_y = DATA_Y;         }         out->status = STATUS;     }     if (something) {         out[0] = 0; out[1] = 1; out[2] = 0; out[3] = 1; out[4] = 0; out[5] = 1;     }     attHandleValueNoti_t notification = { 0x2e, 0x14, out };     if (!GATT_Notification(0x2E, &amp;notification, 0)) { free(out); }     if (++packetNo == 500) {         packetNo = 0;     }   }<\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, \u043a\u0430\u0436\u0434\u044b\u0435 500 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430\u0440\u044f\u0434\u0430 (\u043f\u043b\u044e\u0441 \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0438 ID \u0441\u0435\u043d\u0441\u043e\u0440\u0430), \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0435. \u041f\u0440\u0438\u0447\u0435\u043c \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432\u044b (\u0438\u043b\u0438 \u0431\u044b\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u043c), \u0442\u043e \u043e\u0442\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0443\u043b\u0438. \u0415\u0449\u0435, \u0435\u0441\u043b\u0438 \u0441\u0442\u043e\u0438\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0444\u043b\u0430\u0433, \u0442\u043e \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u043f\u0435\u0440\u0435\u0442\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e 0-1-0-1-0-1.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u044d\u0442\u043e\u0442 GATT_Nofication \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0421\u0441\u044b\u043b\u043e\u043a \u043d\u0430 &#171;KatSendNotification&#187; (\u043a\u0430\u043a \u044f \u043d\u0430\u0437\u0432\u0430\u043b \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e) \u0434\u0432\u0435, \u0438 \u043e\u0431\u0435 \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430, \u043e\u0431\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439:<\/p>\n<pre><code class=\"cpp\">  while(!QueueEmpty(...)) {     Entry* event = QueueGet(...);     switch (event->id)     {         ...         case 4:             KatSendNotification();             ClockStop(...);             break;         case 6:             if (Flag1 == 1 || Flag2 == 1) {                 KatSendNotification();             }             break         ...     }   }<\/code><\/pre>\n<p>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u21164 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u0439\u043c\u0435\u0440\u043e\u043c, \u043d\u043e \u0442\u0430\u0439\u043c\u0435\u0440 \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d &#8212; \u0438 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0441\u0440\u0430\u0437\u0443 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u044d\u0442\u043e\u0442 \u0442\u0430\u0439\u043c\u0435\u0440 \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b.<\/p>\n<p>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u21166 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u043a\u043e\u043b\u043b\u0431\u044d\u043a\u0443 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f BLE, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0434\u0432\u0430 \u0444\u043b\u0430\u0433\u0430 \u0432\u0437\u0432\u0435\u0434\u0435\u043d\u044b (\u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 &#8212; \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e, \u0432\u0442\u043e\u0440\u043e\u0439 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e\u043d\u044f\u043b \u0441\u0445\u043e\u0434\u0443), \u043f\u0440\u0438\u0447\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e. \u041e\u043a\u0435\u0439, \u044d\u0442\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0442\u043e\u043a \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u043e\u043a\u0430 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043d\u043e, \u0432\u0440\u043e\u0434\u0435, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0441\u043f\u0440\u043e\u0441\u0438\u043b\u0438 &#8212; \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c. \u0427\u0442\u043e \u0436, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043d\u0430 \u043a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f? \u041a\u0440\u043e\u0441\u0441-\u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441 \u043d\u0430 DATA_OK \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043d\u0430\u0441 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">void ReadSensorData(...) {     do {         Semaphore_Pend(SensorSemaphore, -1);         Task_sleep(700);         GPIO_SET(..., 0);         SPI_Send(0x50);         Task_sleep(10);         char* out = &amp;SensorData;         for (int i = 0x0C; i; --i) {             *(out++) = SPI_Recv();         }         GPIO_SET(..., 1);         Task_sleep(0.1);         DATA_OK = 0;         if ((SensorData[0] &amp; 0x80 != 0) &amp;&amp; (SensorData[0] &amp; 0x20 != 0)) {             DATA_OK = 1;         }         DATA_READY = 1;         SensorReads++;         If (SensorReads > 99) {             \/\/ refresh something             SensorReads = 0;         }         if (SomeFlag == 0) {             Semaphore_Post(SensorSemaphore);         }     } while(true); }<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u0435\u043d\u0441\u043e\u0440\u0430 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 SomeFlag \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u0432\u0435\u0434\u0451\u043d. \u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 &#8212; \u044d\u0442\u043e\u0442 \u0444\u043b\u0430\u0433 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u0440\u0435\u0436\u0438\u043c \u0441\u043d\u0430. \u0421\u0435\u043c\u0430\u0444\u043e\u0440 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435 \u0438 \u0441\u0440\u0430\u0437\u0443 \u0432\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0430\u0442\u0447\u0438\u043a \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0435 \u0441\u043f\u0438\u043c, \u0441 \u043f\u0435\u0440\u0435\u0440\u044b\u0432\u0430\u043c\u0438 \u0432 700+10+13\u0431\u0430\u0439\u0442SPI + \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0435\u0449\u0435 \u0447\u0435\u0433\u043e-\u0442\u043e \u0440\u0430\u0437 \u0432 100 \u0447\u0442\u0435\u043d\u0438\u0439. SPI \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 4 \u043c\u0435\u0433\u0430\u0431\u043e\u0434. \u0415\u0434\u0438\u043d\u0438\u0446\u044b \u0441\u043d\u0430 \u0432 \u0434\u0435\u0441\u044f\u0442\u043a\u0430\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434. \u0422\u043e \u0435\u0441\u0442\u044c \u0441\u0435\u043d\u0441\u043e\u0440 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437 \u0432 ~7.11 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0438\u043b\u0438 \u043e\u043a\u043e\u043b\u043e 140-141 \u0413\u0446. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0435\u043d\u0441\u043e\u0440\u0430 \u043d\u0430 133\u0413\u0446. \u041e\u0434\u043d\u0430\u043a\u043e \u0436\u0435 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c.<\/p>\n<p>\u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 &#8212; \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b (\u0432\u0435\u0434\u0435\u0448\u044c \u0441\u0435\u0431\u0435 \u0440\u043e\u0432\u043d\u0435\u043d\u044c\u043a\u043e \u0441\u0435\u043d\u0441\u043e\u0440, \u0430 \u0442\u043e\u0447\u043a\u0430 \u0432 \u0433\u0435\u0439\u0442\u0432\u0435\u0435 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0441\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0446\u0435\u043d\u0442\u0440).<\/p>\n<p>\u041a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043c\u043e: \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u0436\u0434\u044b\u0435 ~140\u0413\u0446 \u0438 \u0447\u0442\u0435\u043d\u0438\u0438 133\u0413\u0446, \u043c\u044b \u0434\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0440\u044f\u0434\u043e\u043c, \u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u0430\u043a\u0435\u0442 \u0431\u044b\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d \u0432\u043e\u0442-\u0442\u043e\u043b\u044c\u043a\u043e-\u0447\u0442\u043e, \u0430 \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u044b\u0441\u043e\u043a\u0430. \u041c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0433\u043e\u043d\u043a\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439, \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0442.<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0435\u043d\u0441\u043e\u0440 \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u044c. \u041f\u0430\u043a\u0435\u0442\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e. \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438&#8230; \u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u044b\u0437\u043e\u0432 <code>Semaphore_Post<\/code> \u0438\u0437 <code>ReadSensorData<\/code> \u0432 <code>KatSendNotification<\/code>? \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u043a\u0430: ReadSensorData() \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, KatSendNotification \u0438\u0445 \u0437\u0430\u0431\u0435\u0440\u0451\u0442 &#8212; \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u043e\u043f\u044f\u0442\u044c. \u0418\u0434\u0435\u0430\u043b\u044c\u043d\u043e. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e KatSendNotification \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0438\u0437\u043d\u0443\u0442\u0440\u0438 ReadSensorData \u0443\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f. \u042f \u0431\u044b, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0447\u0443\u0442\u043e\u043a \u0435\u0435 \u0434\u0430\u0436\u0435 \u043f\u043e\u043d\u0438\u0437\u0438\u043b, \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u043a\u0435\u0442 \u0442\u043e\u0447\u043d\u043e \u0431\u044b\u043b \u0433\u043e\u0442\u043e\u0432. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u044b \u043a\u0430\u0436\u0434\u044b\u0435 86..133\u0413\u0446, \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043c\u0435\u0440\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0435 \u0442\u0430\u043a \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u043d, \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 &#8212; 5 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u0433\u043e\u0434\u044b \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u044e\u0442.<\/p>\n<p>\u0414\u043e\u0441\u0442\u0430\u043d\u0435\u043c \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0438\u043a \u0438 \u0441\u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u043f\u0430\u0442\u0447. \u0412\u043e-1\u0445 \u0441\u043d\u0438\u0437\u0438\u043c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443:<\/p>\n<pre><code class=\"assembly\">        000079d0 41  f6  58  31    movw       r1,#7000  # The delay =>         000079d0 41  f2  88  31    movw       r1,#5000<\/code><\/pre>\n<p>\u0412\u043e-2\u0445, \u0437\u0430\u043c\u043a\u043d\u0451\u043c \u0446\u0438\u043a\u043b \u0434\u043e \u0432\u044b\u0437\u043e\u0432\u0430 SensorSemaphore. \u0421\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0437\u0430\u043c\u043a\u043d\u0443\u0442\u044c \u0446\u0438\u043a\u043b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e: \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432 IF \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 jmp (bne) \u043d\u0430 \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430NOP\u0438\u0442\u044c\u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u043c\u043e\u0436\u043d\u043e \u0442\u0443\u043f\u043e \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u0441\u0435\u0433\u043e IF\u0430:<\/p>\n<pre><code class=\"assembly\">                             LAB_00007ab0                                    XREF[1]:     00007a54 (j)            00007ab0 28  78           ldrb       r0,[r5,#0x0 ]=>SleepState                        = 52h         00007ab2 00  28           cmp        r0,#0x0         00007ab4 98  d1           bne        LAB_000079e8         00007ab6 68  68           ldr        r0,[r5,#0x4 ]=>SensorReadSem         00007ab8 f9  f7  7e  fa    bl         Semaphore_post                                   undefined Semaphore_post()         00007abc 94  e7           b          LAB_000079e8  =>                               LAB_00007ab0                                    XREF[1]:     00007a54 (j)            00007ab0 9a  e7           b          LAB_000079e8<\/code><\/pre>\n<p>\u0418 \u0432-3\u0438\u0445, \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c <code>KatSendNotification<\/code>. \u0414\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0448\u043b\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443 \u0441 \u0440\u0435\u0430\u043a\u0446\u0438\u0435\u0439 \u043d\u0430 \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438 &#8212; \u0443\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u0432 \u043a\u043e\u043d\u0446\u0435 (\u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u043f\u0430\u0442\u0447\u0430, \u044f \u0432\u0437\u044f\u043b 00012e40). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u043a\u043e\u043d\u0446\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u0435\u043d\u044f\u0435\u043c return \u043d\u0430 jmp:<\/p>\n<pre><code class=\"assembly\">                             LAB_00006b14                                    XREF[1]:     00006a08 (j)            00006b14 f8  bd           pop        {r3,r4,r5,r6,r7,pc}         00006b16 c0              ??         C0h         00006b17 46              ??         46h    F =>                              LAB_00006b14                                    XREF[1]:     00006a08 (j)            00006b14 0c  f0  94  b9    b.w        KatSendNotificationTail<\/code><\/pre>\n<p>\u0418 \u043d\u0430 \u043d\u043e\u0432\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0438\u0437 <code>ReadSensorData<\/code>. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 ReadSensorData, \u044d\u0442\u043e \u0441\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0434\u043e \u043c\u0435\u0441\u0442\u0430 \u043f\u0435\u0440\u0435\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0441\u0435\u043c\u0430\u0444\u043e\u0440. \u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434, \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c\/\u0432\u044b\u0437\u0432\u0430\u0442\u044c Repair Flow \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0430\u0432\u043e\u043a &#8212; \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u0441\u0431\u0440\u043e\u0441\u0430, \u0432\u0441\u0451 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"assembly\">=>                              KatSendNotificationTail                         XREF[1]:     KatSendNotification:00006b14 (j)         00012e40 03  4d           ldr        r5,[->SleepState ]                               = 20001584         00012e42 28  78           ldrb       r0,[r5,#0x0 ]         00012e44 00  28           cmp        r0,#0x0         00012e46 02  d1           bne        LAB_00012e4e         00012e48 68  68           ldr        r0,[r5,#0x4 ]         00012e4a ee  f7  b5  f8    bl         Semaphore_post                                   undefined Semaphore_post()                              LAB_00012e4e                                    XREF[1]:     00012e46 (j)            00012e4e f8  bd           pop        {r3,r4,r5,r6,r7,pc}                              PTR_SleepState_00012e50                         XREF[1]:     00012e40 (R)            00012e50 84  15  00  20    addr       SleepState                                       = 52h<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/85f\/2cd\/9b9\/85f2cd9b956ce8bd10e2d3fa404df0f2.png\" alt=\"\u041f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u043b\u043e\u0441\u044c, \u043a\u0430\u043a \u043d\u0430\u0434\u043e\" title=\"\u041f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u043b\u043e\u0441\u044c, \u043a\u0430\u043a \u043d\u0430\u0434\u043e\" width=\"901\" height=\"391\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/85f\/2cd\/9b9\/85f2cd9b956ce8bd10e2d3fa404df0f2.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u043b\u043e\u0441\u044c, \u043a\u0430\u043a \u043d\u0430\u0434\u043e<\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0430\u043b\u0438\u0432\u043a\u0430 \u043f\u0430\u0442\u0447\u0430, \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435, \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0430, \u0440\u0435\u0441\u0438\u0432\u0435\u0440 \u043d\u0430 133\u0413\u0446 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e. \u0415\u0441\u043b\u0438 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0432\u0435\u0441\u0442\u0438, \u0432 \u0433\u0435\u0439\u0442\u0432\u0435\u0435 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438 \u043d\u0435 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u043e\u043b\u044c. \u0423\u0440\u0430!<\/p>\n<h2>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0430\u0433\u0438 (\u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u0431\u044b\u0442\u044b\u0439 \u0441\u043a\u0430\u043b\u044c\u043f\u0435\u043b\u044c)<\/h2>\n<p>\u042f \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u0432\u043e\u0442 <a href=\"https:\/\/www.youtube.com\/@UMaFullBodyVRGaming\" rel=\"noopener noreferrer nofollow\">Utopia Machina<\/a> (\u0434\u0430-\u0434\u0430, \u0435\u0449\u0435 \u0440\u0430\u0437 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043a\u0443\u0447\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f) \u0436\u0430\u043b\u043e\u0432\u0430\u043b\u0441\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u0435\u043d\u0441\u043e\u0440 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043b\u0438\u043f\u0430\u0435\u0442 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. &#171;\u0417\u0430\u043b\u0438\u043f\u0430\u0435\u0442&#187; \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043f\u0430\u0440\u0443 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432, \u0435\u0449\u0435 \u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430\u0440\u044f\u0434\u0430. \u0415\u0449\u0435 \u0436\u0430\u043b\u043e\u0432\u0430\u043b\u0441\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u043e\u0433. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c&#8230; \u041d\u043e \u043a\u0430\u043a-\u0442\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u0432\u0438\u0441\u0438\u0442 \u043d\u0430 \u0437\u0430\u0440\u044f\u0434\u043a\u0435, \u0430 \u0443 \u043d\u0435\u0433\u043e \u0431\u0435\u0437 \u0437\u0430\u0440\u044f\u0434\u043a\u0438. \u0412\u044b\u043a\u0440\u0443\u0442\u0438\u043b \u0441\u0435\u043d\u0441\u043e\u0440, \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043d\u0430 \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0448\u0435\u0432\u0435\u043b\u0438\u0432\u0430\u044f \u0447\u0442\u043e\u0431 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418&#8230; \u0414\u0430! \u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b!<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e, \u044f \u0447\u0435\u0440\u0435\u0437 Wireshark \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430 \u043f\u0430\u043a\u0435\u0442\u044b, \u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 \u043f\u0430\u043a\u0435\u0442\u0430\u0445 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0435\u043d\u0441\u043e\u0440\u0430 &#8212; \u0438\u0434\u0451\u0442 &#171;0 1 0 1 0 1&#187;. \u0425\u0432\u043e\u0441\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044b\u043b \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u0443\u0441\u043e\u0447\u0435 \u043a\u0432\u0430\u0440\u0442\u0435\u0440\u043d\u0438\u043e\u043d\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0438 \u043c\u0435\u043d\u044f\u043b\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0438\u0434\u0435\u0442\u044c.<\/p>\n<p>\u042d\u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0432\u043e\u0442 \u044d\u0442\u0430 \u043c\u0438\u043d\u0430 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0435\u0441\u0442\u044c \u0438 \u0432 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0435 \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u0432 \u043d\u043e\u0433 \u0438 \u0432 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">    if (something) {         out[0] = 0; out[1] = 1; out[2] = 0; out[3] = 1; out[4] = 0; out[5] = 1;     }<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0436\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442, \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u043b\u0430 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u043e\u0433 &#8212; \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b-\u0442\u043e \u043d\u0435 \u0437\u0430\u0442\u0438\u0440\u0430\u043b\u0438\u0441\u044c (\u0432 \u043d\u043e\u0433\u0430\u0445 \u043e\u043d\u0438 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u043f\u0430\u043a\u0435\u0442\u0430), \u0430 \u0432\u043e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0431\u0430\u0442\u0430\u0440\u0435\u0435 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0441\u0435\u043d\u0441\u043e\u0440\u0430 &#8212; \u0437\u0430\u0442\u0438\u0440\u0430\u043b\u0438\u0441\u044c.<\/p>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c &#8212; \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443? \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0444\u043b\u0430\u0433 &#171;somthing&#187; \u0442\u0440\u043e\u0433\u0430\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u0442\u0438\u043a\u0430\u044e\u0449\u0435\u0433\u043e \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443; \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0435\u043a\u0438\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0434\u043e\u0445\u043e\u0434\u0438\u043b \u0434\u043e 1800, \u0438 \u043d\u0435 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043b\u0441\u044f \u043f\u043e \u0434\u043e\u0440\u043e\u0433\u0435. \u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043b\u0441\u044f \u043e\u043d \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u043c \u0431\u0430\u0442\u0430\u0440\u0435\u0438. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u044f\u0434\u0430 \u0431\u0430\u0442\u0430\u0440\u0435\u0438 \u0438 \u0442\u044e\u043d\u0438\u043d\u0433\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c \u0441\u043d\u0430. \u042f \u043d\u0430\u0448\u0435\u043b \u0432 \u043e\u0431\u043e\u0438\u0445 \u0441\u0435\u043d\u0441\u043e\u0440\u0430\u0445 \u0445\u0432\u043e\u0441\u0442\u044b \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u043e USB.<\/p>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044d\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u043a\u0443\u0441\u043e\u043a \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0439 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d &#8212; \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0432\u044b\u0440\u0435\u0437\u0430\u0442\u044c.<\/p>\n<p>\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u043e\u0441\u0431\u0430\u043c\u0438 &#8212; \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435 if&#8217;\u0430, \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0442\u0438\u0440\u0430\u043d\u0438\u0435 nop&#8217;\u0430\u043c\u0438&#8230; \u042f \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430NOP\u0438\u043b \u0441\u0442\u0440\u043e\u043a\u0443, \u0433\u0434\u0435 \u0441\u0442\u0430\u0432\u0438\u043b\u043e\u0441\u044c &#171;something = 1&#187;.<\/p>\n<h2>\u0410 \u0447\u0442\u043e \u043d\u0435 \u0442\u0430\u043a<\/h2>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u043d\u0441\u043e\u0440\u044b \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u043e\u043c&#8230; \u041f\u043e\u0447\u0442\u0438. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 &#8212; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0441\u0435\u043d\u0441\u043e\u0440\u0430\u043c\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f (86\u0413\u0446..133\u0413\u0446) \u0430 \u043d\u0435 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 ~140\u0413\u0446.<\/p>\n<p>\u041e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0435\u043d\u0441\u043e\u0440 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0447\u0442\u0435\u043d\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 (\u0432 \u043f\u043e\u043f\u0443\u0433\u0430\u044f\u0445), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u043d\u0430\u0441\u0447\u0438\u0442\u0430\u043b \u0441 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u043d\u0441\u043e\u0440 \u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 86 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043a\u0430\u043a \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c &#8212; \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u043d\u043e, \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e, \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0430\u044f \u043d\u0430 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>\u041f\u0430\u0442\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u043d\u0441\u043e\u0440 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0440\u043e\u0441\u0430 &#8212; \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f (\u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 500\u0439 \u043f\u0430\u043a\u0435\u0442 + \u0447\u0430\u0441\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0430\u0434\u0438\u043e), \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435: \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 86 \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u043e\u0439 \u0434\u043e 163% \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c, \u0430 \u043d\u0430 133\u0413\u0446 \u0432\u0441\u0435\u0433\u043e 105%.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443? \u0417\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044d\u0442\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e (\u043a\u0430\u043a, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u0435\u043b\u0430\u0435\u0442 \u0433\u0435\u0439\u0442\u0432\u0435\u0439) &#8212; \u0442\u043e \u0438 \u0434\u0430 \u0438 \u043d\u0435\u0442. \u041d\u0435\u0442 &#8212; \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 133\u0413\u0446 \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u0430 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u043d\u0441\u043e\u0440\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u044b, \u0437\u0430\u0442\u043e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043e\u0449\u0443\u0442\u0438\u043c\u043e \u043d\u0438\u0436\u0435 (\u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043e\u0449\u0443\u0449\u0430\u0435\u0442\u0441\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0438\u0433\u0440\u0435 \u043d\u0430 120fps). \u0414\u0430 &#8212; \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u043d\u0441\u043e\u0440\u0430 \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u0430 \u0432\u0441\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0448\u0435 \u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0433\u0440\u044b &#8212; \u043f\u043e\u043d\u0438\u0436\u0430\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0431\u0435\u0433\u0430.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c? \u0414\u0430, \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f: \u043f\u0430\u0442\u0447 \u0433\u0435\u0439\u0442\u0432\u0435\u044f, \u043f\u0430\u0442\u0447\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u0430, \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0430\u0442\u0447 \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u0432&#8230; \u0415\u0441\u0442\u044c \u0433\u0434\u0435 \u0440\u0430\u0437\u0433\u0443\u043b\u044f\u0442\u044c\u0441\u044f. \u041d\u043e \u044d\u0442\u043e \u0442\u0435\u043c\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430.<\/p>\n<h2>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435<\/h2>\n<p>\u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 &#8212; \u0438\u0437\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0442 \u0433\u0435\u0439\u0442\u0432\u0435\u044f, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u043b\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0438\u0433\u0440 &#8212; \u0441\u0435\u0439\u0447\u0430\u0441, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f KAT SDK \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c Standalone \u0438\u0433\u0440\u044b, \u0442\u0430\u043a \u043a\u0430\u043a SDK \u0436\u0435\u0441\u0442\u043a\u043e \u043f\u0440\u0438\u0431\u0438\u0442 \u0433\u0432\u043e\u0437\u0434\u044f\u043c\u0438 \u043a \u0432\u0438\u043d\u0434\u0435 \u0438 \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c\u0443 \u043a \u043d\u0435\u043c\u0443. \u0410 \u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043a\u0430\u043a \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u043e\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0441\u0434\u0435\u043b\u0430\u043b \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0440\u0435\u0441\u0438\u0432\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c&#8230; \u0422\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e standalone \u0438\u0433\u0440\u044b &#8212; \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e \u0438\u0433\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 Utopia Machina. \u0422\u0430\u043a \u0447\u0442\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0435\u0440\u0438\u0438 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0438\u0442\u043e\u0433 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0439 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 &#8212; UE SDK \u0441 \u043f\u0440\u044f\u043c\u044b\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u0434\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0445\u043e\u0442\u044c \u043f\u043e\u0434 \u0432\u0438\u043d\u0434\u043e\u0439 \u0445\u043e\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u043d\u0430 Quest 2\/3 \ud83d\ude42 \u041d\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0439\u0442\u0435\u0441\u044c!<\/p>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<ul>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 1: &#171;\u0418\u0433\u0440\u0430\u0435\u043c \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439&#187; \u043d\u0430 [<a href=\"https:\/\/habr.com\/ru\/articles\/798029\/\" rel=\"noopener noreferrer nofollow\">Habr<\/a>], [<a href=\"https:\/\/medium.com\/@datacompboy\/playing-with-kat-walk-c2-part-1-playing-actually-3364c324e710?source=friends_link&amp;sk=5535c9f1c834b35af2ac1d282fd41826\" rel=\"noopener noreferrer nofollow\">Medium<\/a>] \u0438 [<a href=\"https:\/\/www.linkedin.com\/pulse\/playing-kat-walk-c2-part-1-actually-anton-fedorov-frtwe\/\" rel=\"noopener noreferrer nofollow\">LinkedIn<\/a>].<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 2: &#171;\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435&#187; \u043d\u0430 [<a href=\"https:\/\/habr.com\/ru\/articles\/799197\/\" rel=\"noopener noreferrer nofollow\">Habr<\/a>], [<a href=\"https:\/\/medium.com\/@datacompboy\/katwalk-c2-part-2-peeking-eavesdropping-sniffing-and-learning-how-to-communicate-with-unknown-bb390c089a00?source=friends_link&amp;sk=8ac5f9c1d23eb160ce2b48c1804ab65c\" rel=\"noopener noreferrer nofollow\">Medium<\/a>] \u0438 [<a href=\"https:\/\/www.linkedin.com\/pulse\/katwalk-c2-part-2-peeking-eavesdropping-sniffing-learning-fedorov-bcbme\" rel=\"noopener noreferrer nofollow\">LinkedIn<\/a>].<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 3: &#171;\u041e\u0442\u0440\u0435\u0437\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u043e\u0434&#187; \u043d\u0430 [<a href=\"https:\/\/habr.com\/ru\/articles\/802125\/\" rel=\"noopener noreferrer nofollow\">Habr<\/a>], [<a href=\"https:\/\/medium.com\/@datacompboy\/katwalk-c2-p-3-cutting-the-wire-987753f49da8?source=friends_link&amp;sk=a4e0e2d3f71be681bc206b1d9a3d307a\" rel=\"noopener noreferrer nofollow\">Medium<\/a>] \u0438 [<a href=\"https:\/\/www.linkedin.com\/pulse\/katwalk-c2-p3-cutting-wire-anton-fedorov-4abae\/\" rel=\"noopener noreferrer nofollow\">LinkedIn<\/a>].<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 4: &#171;\u0418\u0433\u0440\u0430\u0435\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u043e\u0439&#187; \u043d\u0430 [<a href=\"https:\/\/habr.com\/ru\/articles\/804327\/\" rel=\"noopener noreferrer nofollow\">Habr<\/a>], [<a href=\"https:\/\/medium.com\/@datacompboy\/katwalk-c2-p-4-playing-with-firmware-ccad00d9eeeb?source=friends_link&amp;sk=3b0779685140b65e84d667950f07f7d6\" rel=\"noopener noreferrer nofollow\">Medium<\/a>] \u0438 [<a href=\"https:\/\/www.linkedin.com\/pulse\/katwalk-c2-p4-playing-firmware-anton-fedorov-wirce\/\" rel=\"noopener noreferrer nofollow\">LinkedIn<\/a>].<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 5: &#171;\u041e\u0432\u0435\u0440\u043a\u043b\u043e\u043a\u0438\u043d\u0433 \u0438 \u0431\u0430\u0433\u0444\u0438\u043a\u0441\u0438\u043d\u0433&#187; \u043d\u0430 [<a href=\"https:\/\/habr.com\/ru\/articles\/805747\/\" rel=\"noopener noreferrer nofollow\">Habr<\/a>], [<a href=\"https:\/\/medium.com\/@datacompboy\/katwalk-c2-p-5-overclocking-and-bugfixing-0ff1fd853e49?source=friends_link&amp;sk=4f44bf29291c8c3ad1b2522c5fd2d3a9\" rel=\"noopener noreferrer nofollow\">Medium<\/a>] \u0438 [<a href=\"https:\/\/www.linkedin.com\/pulse\/katwalk-c2-p5-overclocking-bugfixing-how-use-ghidra-analyse-fedorov-5nome\/\" rel=\"noopener noreferrer nofollow\">LinkedIn<\/a>].<\/p>\n<\/li>\n<\/ul>\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\/805747\/\"> https:\/\/habr.com\/ru\/articles\/805747\/<\/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>&#171;\u0427\u0442\u043e \u0431 \u043e\u043d\u0438 \u043d\u0438 \u0434\u0435\u043b\u0430\u043b\u0438 &#8212; \u043d\u0435 \u0438\u0434\u0443\u0442 \u0434\u0435\u043b\u0430. \u0412\u0438\u0434\u0438\u043c\u043e \u0432 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0435 \u0431\u0430\u0433\u043e\u0432 \u0434\u043e\u0444\u0438\u0433\u0430&#187;. \u041a\u0430\u043a \u044f \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u043b \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 (\u0433\u0434\u0435 \u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f <a href=\"https:\/\/habr.com\/ru\/articles\/804327\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u0432<\/a>) &#8212; \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043f\u0440\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/798029\/\" rel=\"noopener noreferrer nofollow\">\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0434\u043b\u044f VR \u0438\u0433\u0440<\/a>, \u043a\u0430\u043a \u0441 <a href=\"https:\/\/habr.com\/ru\/articles\/799197\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/a> \u0438 \u043a\u0430\u043a \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/habr.com\/ru\/articles\/802125\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043e \u0435\u0435 \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u0432 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e<\/a>.<\/p>\n<p>\u0415\u0451 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0440\u0435\u0441\u0438\u0432\u0435\u0440 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u043d\u0441\u043e\u0440\u044b \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0432 86\u0413\u0446, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0433\u043d\u0430\u0442\u044c \u0434\u043e 133 \u0413\u0446, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043e\u0449\u0443\u0442\u0438\u043c\u043e \u043d\u0438\u0436\u0435 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438, \u043d\u043e \u0441\u0432\u044f\u0437\u044c \u0431\u044b\u043b\u0430 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0451\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u0435\u043d\u0441\u043e\u0440\u044b &#8212; \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0437\u0430 \u0438\u0433\u0440\u0430 <a href=\"https:\/\/ghidra-sre.org\/\" rel=\"noopener noreferrer nofollow\"><strong>ghidra_11.0_PUBLIC<\/strong><\/a> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0443 \u043c\u0435\u043d\u044f \u0432 <code>C:\\Games<\/code>, \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u043e\u0434\u043d\u0438\u043c \u0433\u043b\u0430\u0437\u043a\u043e\u043c \u0432 \u0441\u0430\u043c\u0443 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0438 \u043f\u043e\u043a\u043e\u0432\u044b\u0440\u044f\u0435\u043c\u0441\u044f \u0442\u0430\u043c \u0433\u0440\u044f\u0437\u043d\u044b\u043c\u0438 \u043f\u0430\u0442\u0447\u0438\u043a\u0430\u043c\u0438, \u0434\u0430 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c race condition \u043f\u043b\u044e\u0441 \u0432\u044b\u043a\u0438\u043d\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0445 \u0433\u043b\u044e\u043a\u043e\u0432. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0433\u043e\u0442\u043e\u0432\u0438\u043c\u0441\u044f \u043a \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044e. \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 &#8212; \u0432\u0441\u0451 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e.<\/p>\n<figure class=\"\">\n<div><figcaption>We need to go deeper&#8230; into Ghidra<\/figcaption><\/div>\n<\/figure>\n<h2>\u0413\u0438\u0434\u0440\u0430: \u043a\u0430\u043a \u043d\u0430\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0434\u0440\u0430\u043a\u043e\u043d\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u043e\u043c \u043f\u043e\u0434 ARM<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e IDA \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 ARM, \u0430 IDA Freeware \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 x86, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0440\u0443\u0433\u0438\u043c. \u042d\u0442\u0438\u043c \u0447\u0435\u043c-\u043d\u0438\u0431\u0443\u0434\u044c, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c <a href=\"https:\/\/ghidra-sre.org\/\" rel=\"noopener noreferrer nofollow\">Ghidra<\/a> &#8212; \u043d\u0430\u0448\u0443\u043c\u0435\u0432\u0448\u0438\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0432\u044b\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0432 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441 \u043c\u043e\u0449\u043d\u044b\u0439 \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440, \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u0412\u0441\u0451 \u043d\u0438\u043a\u0430\u043a \u0431\u044b\u043b\u043e \u043d\u0435 \u0434\u043e \u043d\u0435\u0433\u043e, \u0430 \u0442\u0443\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043f\u043e\u0432\u043e\u0434 \u043f\u043e\u0434\u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f.<\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0433\u0438\u0434\u0440\u0443 \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c (<code>C:\\Games<\/code>), \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 <code>C:\\Games\\ghidra_11.0_PUBLIC\\ghidraRun.bat<\/code>. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u0447\u0435\u0440\u0435\u0437 &#171;File=>Import File&#187; \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 Bin \u0444\u0430\u0439\u043b. \u0413\u0438\u0434\u0440\u0430 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b, \u043d\u043e \u0432\u043e\u0442 HEX \u043d\u0435 \u0443\u043c\u0435\u0435\u0442, \u0445\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438 \u0432 bin. \u0415\u0449\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0430\u043c\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0445\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c \u0447\u0442\u043e \u044d\u0442\u043e ARM, Cortex M3, little endian:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0412\u044b\u0431\u043e\u0440 \u044f\u0437\u044b\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0413\u0438\u0434\u0440\u0430 \u0441\u043f\u0440\u0430\u0432\u0448\u0438\u0432\u0430\u0435\u0442, \u043d\u0435 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u0438 \u0444\u0430\u0439\u043b, \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u0435\u043c\u0441\u044f, \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0447\u0438\u0441\u0442\u044b\u0439 \u043b\u0438\u0441\u0442!<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0447\u0438\u0441\u0442\u044b\u0439 \u043b\u0438\u0441\u0442<\/figcaption><\/div>\n<\/figure>\n<h3>\u0420\u0435\u0433\u0438\u043e\u043d\u044b \u043f\u0430\u043c\u044f\u0442\u0438<\/h3>\n<p>\u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0440\u0443\u043a\u0438, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u0430\u0440\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0430\u0448\u0435\u043b \u0433\u0434\u0435-\u0442\u043e <a href=\"https:\/\/software-dl.ti.com\/lprf\/simplelink_cc2640r2_latest\/docs\/blestack\/ble_user_guide\/html\/cc2640\/memory_management.html\" rel=\"noopener noreferrer nofollow\">\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0443 TI<\/a>:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0434\u0451\u043c \u0432 &#171;Windows => Memory Map&#187; \u0438 \u043f\u0440\u0430\u0432\u0438\u043c. \u0423\u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u043e\u043d \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0432\u043e &#171;flash&#187; \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 &#171;W&#187; (\u044d\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0433\u0438\u043e\u043d). \u0427\u0435\u0440\u0435\u0437 \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u043f\u043b\u044e\u0441 \u0432 \u043d\u0430\u0431\u043e\u0440\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c &#171;rom&#187; \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u0441 <strong>10000000<\/strong>, \u0434\u043b\u0438\u043d\u043d\u043e\u044e \u0432 <strong>0x20000<\/strong> (\u0442\u043e\u0447\u043d\u0435\u0435 \u0432 0x1CC00 \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e), \u0433\u0430\u043b\u043e\u0447\u043a\u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0432 <strong>R<\/strong> \u0438 <strong>X<\/strong> (\u0443\u0431\u0438\u0440\u0430\u0435\u043c <strong>W<\/strong>). \u0415\u0449\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0433\u0438\u043e\u043d &#171;ram&#187; \u0441 \u0430\u0434\u0440\u0435\u0441\u0430 <strong>20000000<\/strong>, \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 <strong>0x5000<\/strong>, <strong>R\/W<\/strong> \u043d\u043e \u043d\u0435 <strong>X<\/strong>.<\/p>\n<p>\u0421 \u043d\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0443 \u043d\u0430\u0441 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u0441\u0442\u0435\u043a, \u0432 RAM, 0x20004000, \u043a\u0430\u043a \u0438 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043a\u0430\u0440\u0442\u044b \u043f\u0430\u043c\u044f\u0442\u0438. \u0417\u0430\u0442\u0435\u043c \u0435\u0441\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0447\u043d\u0451\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 &#8212; \u0432\u0441\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u044c ROM, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442, \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0434\u0432\u0430 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043a\u0440\u0438\u0432\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f. \u041d\u0435 \u043f\u043e\u0445\u043e\u0436\u0438 \u043d\u0430 \u043f\u0440\u0430\u0432\u0434\u0443.<\/p>\n<p>\u041d\u043e \u0441 \u043a\u0430\u0440\u0442\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u044b \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u0435\u0449\u0435 \u0435\u0441\u0442\u044c &#171;Peripherals&#187; \u0440\u0435\u0433\u0438\u043e\u043d, \u0447\u0435\u0440\u0435\u0437 \u0447\u0442\u0435\u043d\u0438\u0435-\u0437\u0430\u043f\u0438\u0441\u044c \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0434\u0451\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0436\u0435\u043b\u0435\u0437\u0430. \u0421\u0430\u043c\u043e\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0435, \u0441\u043a\u0430\u0447\u0430\u0442\u044c <a href=\"https:\/\/github.com\/cmsis-svd\/cmsis-svd-data\" rel=\"noopener noreferrer nofollow\">CMSIS-SVD<\/a> \u043f\u0430\u043a\u0435\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432 \u043c\u0430\u0448\u0438\u043d\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c \u0432\u0438\u0434\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0436\u0435\u043b\u0435\u0437\u0430 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 ARM \u0447\u0438\u043f\u043e\u0432 \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u0410 \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c <a href=\"https:\/\/github.com\/leveldown-security\/SVD-Loader-Ghidra\" rel=\"noopener noreferrer nofollow\">SVD-Loader-Ghidra<\/a>, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0438\u0434\u0451\u043c \u0432 &#171;Window=>Script Manager&#187;, \u0436\u043c\u0451\u043c \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u044e \u0441\u043f\u0440\u0430\u0432\u0430 \u0438\u043a\u043e\u043d\u043a\u0443 (\u0442\u0440\u0438 \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u043e\u0441\u043e\u0447\u043a\u0438, \u043b\u0435\u0432\u0435\u0435 \u043a\u0440\u0435\u0441\u0442\u0438\u043a\u0430 \u0438 \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043f\u043b\u044e\u0441\u0438\u043a\u0430, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f &#171;Manage Script Directories&#187;), \u0433\u0434\u0435 \u0447\u0435\u0440\u0435\u0437 \u0437\u0435\u043b\u0451\u043d\u044b\u0439 \u043f\u043b\u044e\u0441\u0438\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043e \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 (<code>$USER_HOME\/Documents\/GitHub\/SVD-Loader-Ghidra<\/code> \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435).  \u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u0438 \u0432 \u0444\u0438\u043b\u044c\u0442\u0440 \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432\u0432\u043e\u0434\u0438\u043c SVD, \u0447\u0442\u043e\u0431 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0439\u0442\u0438 \u0435\u0433\u043e:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0441\u043a\u0440\u0438\u0442\u043f \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0432\u043e\u0439\u043d\u044b\u043c \u043a\u043b\u0438\u043a\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e, \u043e\u043d \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 SVD \u0444\u0430\u0439\u043b. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <code>...GitHub\\cmsis-svd-data\\data\\TexasInstruments\\CC26x0.svd<\/code>.<\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 0x40000000.<\/p>\n<h3>\u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e ROM<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u044b\u0440\u0443\u044e \u043f\u043e\u0440\u0442\u044f\u043d\u043a\u0443, \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u0438\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u0432\u0435\u0441 \u0437\u043e\u043b\u043e\u0442\u0430. \u0410 \u043f\u043e\u0442\u043e\u043c\u0443, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c SDK, \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c, \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f. \u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0435\u0436\u0430\u0442\u044c. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0438\u0445 \u043d\u0430\u0439\u0442\u0438 \ud83d\ude42<\/p>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439: 1001c901, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0432\u0441\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0432 \u043b\u0438\u043d\u0443\u043a\u0441, \u0438:<\/p>\n<pre><code class=\"bash\">$ cd \/mnt\/c\/ti\/simplelink_cc2640r2_sdk_5_30_00_03 $ find . -name '*map' | xargs grep -i '1001c90'  .\/kernel\/tirtos\/packages\/ti\/sysbios\/rom\/cortexm\/cc26xx\/r2\/golden\/CC26xx\/rtos_rom.map:                  1001c900    00000020     arm_m3_Hwi_asm_rom.obj (.text:ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I) .\/kernel\/tirtos\/packages\/ti\/sysbios\/rom\/cortexm\/cc26xx\/r2\/golden\/CC26xx\/rtos_rom.map:1001c901  ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I                              .\/kernel\/tirtos\/packages\/ti\/sysbios\/rom\/cortexm\/cc26xx\/r2\/golden\/CC26xx\/rtos_rom.map:1001c901  ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I       <\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e! \u041d\u0430\u0434\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c. \u0412 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u0445 \u0441 \u0433\u0438\u0434\u0440\u043e\u0439 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <code>ImportSymbolsScript.py<\/code>, \u043d\u043e \u0438\u0433\u0440\u044b \u0441 \u043d\u0438\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438. \u041f\u043e\u0434 \u0441\u0432\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u044f \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u043b \u0435\u0433\u043e \u0434\u043e <a href=\"https:\/\/github.com\/datacompboy\/ghidra-arm-scripts\/blob\/main\/ArmImportSymbolsScript.py\" rel=\"noopener noreferrer nofollow\">ArmImportSymbolsScript.py<\/a>. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f: \u0435\u0441\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b \u044d\u0442\u043e \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e \u0447\u0435\u0442\u043d\u043e\u0433\u043e \u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f dword, \u0447\u0442\u043e\u0431\u044b \u0430\u0434\u0440\u0435\u0441+1 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0442\u043e\u043c.<\/p>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0430\u043c \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0430\u0434\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442: &lt;\u0438\u043c\u044f> &lt;\u0430\u0434\u0440\u0435\u0441> &lt;\u0442\u0438\u043f f \u0438\u043b\u0438 \u043d\u0435\u0442>.<\/p>\n<p>\u0410 \u0435\u0449\u0435, \u043a\u0430\u0440\u0442\u0430 \u0445\u043e\u0442\u044c \u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0434\u043b\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0442\u043e, \u0447\u0442\u043e \u043d\u0438\u0436\u0435 1xxxxxxx &#8212; \u043d\u0435 \u0432\u0441\u0451 \u043f\u0440\u0430\u0432\u0434\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>00001a25  main<\/code> &#8212; \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 main.<\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 &#8212; \u043d\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u043a\u0430\u0440\u0442\u043e\u0439, \u0430 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u0438\u043a:<\/p>\n<pre><code class=\"bash\">$ cd \/mnt\/c\/ti\/simplelink_cc2640r2_sdk_5_30_00_03 $ mkdir symbols $ objdump -t .\/kernel\/tirtos\/packages\/ti\/sysbios\/rom\/cortexm\/cc26xx\/r2\/golden\/CC26xx\/CC2640R2F_rtos_rom_syms.out | perl -ne '@a=split;print \"$a[-1] $a[0] $a[2]\\n\" if $a[1] eq \"g\"' > symbols\/rom.txt<\/code><\/pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u044b\u043c \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u043e <code>ArmImportSymbolsScript.py<\/code> \u0432 Scripts Manager, \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u0444\u0430\u0439\u043b \u0438\u0437 <code>C:\\ti\\simplelink...\\scripts\\rom.txt<\/code>:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0423\u0436\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u043c\u044b\u0441\u043b<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"bash\">$ for k in source\/ti\/ble5stack\/rom\/ble_rom_releases\/cc26xx_r2\/Final_Release\/*symbols; do     objdump -t $k | perl -ne '@a=split;print \"$a[-1] $a[0] $a[2]\\n\" if $a[1] eq \"g\"' > symbols\/${k##*\/}.txt   done<\/code><\/pre>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c <code>ble_r2.symbols.txt<\/code> \u0438 <code>common_r2.symbols.txt<\/code>.<\/p>\n<h3>\u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 API SDK<\/h3>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u0432 \u043a\u0430\u0440\u0442\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u0441 \u0430\u0434\u0440\u0435\u0441\u0430 0x1000 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f &#171;TI RTOS ROM Jump Table&#187;. \u0415\u0441\u043b\u0438 \u0441\u0445\u043e\u0434\u0438\u043c \u0442\u0443\u0434\u0430, \u0443\u0432\u0438\u0434\u0438\u043c \u043a\u0443\u0447\u0443 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439. \u041d\u043e \u043d\u0435 \u0434\u0436\u0430\u043c\u043f\u043e\u0432&#8230; \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432 TI \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432 &#8212; &#171;ROM_Flash_JT&#187; &#8212; \u043e\u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043f\u043e 0x1000, \u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0435\u0451 \u043b\u0435\u0433\u043a\u043e: \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u0437 \u0442\u0435\u0445, \u0447\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0448\u043b\u0438 \u0432 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u0445 &#8212; \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <strong>HCI_bm_alloc<\/strong> &#8212; \u0438 \u043d\u0430\u0439\u0442\u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0435\u0451:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0422\u0430\u0431\u043b\u0438\u0447\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043e\u043d\u0430. \u041f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0432 &#171;ROM_Flash_JT&#187;. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0432 <code>rom_init.c<\/code> (\u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c<br \/><code>C:\\ti\\simplelink_cc2640r2_sdk_5_30_00_03\\source\\ti\\blestack\\rom\\r2\\rom_init.c<\/code>), \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043a\u0443\u0447\u0443 \u0438\u043c\u0451\u043d. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u042f \u043d\u0430\u043a\u0438\u0434\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442\u0438\u043a <a href=\"https:\/\/github.com\/datacompboy\/ghidra-arm-scripts\/blob\/main\/ROM_Flash_JT.py\" rel=\"noopener noreferrer nofollow\">ROM_Flash_JT<\/a> &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c rom_init.c, \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0435\u043c\u0441\u044f:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0415\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043c\u044b\u0441\u043b\u0430!<\/figcaption><\/div>\n<\/figure>\n<h3>\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 ROM2RAM<\/h3>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u043a\u043e\u0433\u0434\u0430 \u0432 \u043a\u043e\u0434\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430<\/p>\n<pre><code class=\"cpp\">const char * str = \"MyString\"; char * str2 = \"OtherString\";<\/code><\/pre>\n<p>\u0442\u043e <code>str<\/code> \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 ROM, \u0442\u043e <code>str2<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 RAM, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0435\u0451 \u043c\u0435\u043d\u044f\u0442\u044c. \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438 \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0443 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u0432 ROM. \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u043e \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 GCC \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0432 TI SDK (\u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c <a href=\"https:\/\/downloads.ti.com\/dsps\/dsps_public_sw\/sdo_sb\/targetcontent\/rtsc\/\" rel=\"noopener noreferrer nofollow\">XDC Tools<\/a>), \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u043e\u0434\u0430. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 <a href=\"https:\/\/github.com\/datacompboy\/ghidra-arm-scripts\/blob\/main\/arm-romtoram.py\" rel=\"noopener noreferrer nofollow\">arm-romtotram<\/a>, \u0437\u0430\u0442\u0435\u043c \u0438\u0434\u0451\u043c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 Reset:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0430\u043c\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0440\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>unpackRomToRam<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0437 \u043d\u0435\u0451 \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0438 \u043c\u0435\u0442\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>&#171;ROMtoRAMtable&#187; &#8212; \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u0430,<\/p>\n<\/li>\n<li>\n<p>&#171;ROMtoRAMtableEnd&#187; &#8212; \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u0430 (\u0433\u0438\u0434\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043c \u043c\u0435\u0442\u043a\u0443, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0434\u0432\u0430\u0436\u0434\u044b \u043a\u043b\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0430 \u043d\u0435\u0451, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043a\u043d\u043e\u043f\u043a\u043e\u0439 &#171;p&#187; \u0438 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 &#171;L&#187; \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043a\u0443 &#171;ROMtoRAMtableEnd&#187;),<\/p>\n<\/li>\n<li>\n<p>\u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430 &#8212; &#171;ROMtoRAM_Processors&#187;.<\/p>\n<\/li>\n<\/ul>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">void unpackRomToRam(void) {   byte **ppbVar1;   for (ppbVar1 = (byte **)&amp;ROMtoRAMtable; ppbVar1 &lt; &amp;ROMtoRAMtableEnd; ppbVar1 = ppbVar1 + 2) {     (*(code *)(&amp;ROMtoRAM_Processors)[**ppbVar1])(*ppbVar1 + 1,ppbVar1[1]);   }   xdc_runtime_Startup_exec__E();   return; }<\/code><\/pre>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0447\u0435\u0433\u043e-\u0442\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0435\u0433\u043e LZ (\u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0431\u0430\u0439\u0442 \u043a\u0430\u043a \u0435\u0441\u0442\u044c, \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c N \u0431\u0430\u0439\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 M \u0431\u0430\u0439\u0442 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0435), memcpy \u0438 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u043e\u043d\u0430. \u0421\u0430\u043c\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 rom2ram \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0440\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432 &#8212; \u0430\u0434\u0440\u0435\u0441 \u0432 ROM \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0449\u0438\u043a\u0430 \u0438 \u0430\u0434\u0440\u0435\u0441 \u0432 RAM \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043b\u0438 \u0432\u0441\u0435 \u0442\u0440\u0438 \u043c\u0435\u0442\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c &#171;arm-romtoram&#187; \u0441\u043a\u0440\u0438\u043f\u0442, \u0438 \u0431\u0443\u043b\u044c\u043a &#8212; \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e.<\/p>\n<h3>\u0410\u043d\u0430\u043b\u0438\u0437 \u043a\u043e\u0434\u0430<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u043e\u0434, \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0441\u044f\u0442 \u0432 SysTick \u0438 IRQ. \u042d\u0442\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438, \u0430 \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0431\u0440\u043e\u0441\u0438\u043c \u0438\u0437 \u0447\u0435\u0440\u0435\u0437 &#171;c&#187;, \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u0443\u0435\u043c SysTick \u0432 &#171;Begin&#187; \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u043a\u043e\u0434\u043e\u043c \u0447\u0435\u0440\u0435\u0437 F12, \u0437\u0430\u0442\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 &#171;f&#187;.<\/p>\n<p>\u041a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0435\u0433\u043e-\u0442\u043e:<\/p>\n<pre><code class=\"cpp\">  FUN_0000c9d0(&amp;DAT_20001130,&amp;DAT_20001150);   ti_sysbios_knl_Queue_construct(&amp;DAT_2000118c,0);   DAT_20001154 = &amp;DAT_2000118c;   FUN_0000cdfc(&amp;DAT_2000120c,&amp;LAB_000100e2+1,0,8);   FUN_0000cdfc(&amp;DAT_20001230,&amp;LAB_000100e2+1,3,4);   FUN_0000cdfc(&amp;DAT_20001254,&amp;LAB_000100e2+1,0,0xb);   FUN_0000cdfc(&amp;DAT_200011e8,&amp;LAB_000100e2+1,0,3);   DAT_20002038 = FUN_00009730(&amp;DAT_20002040,&amp;DAT_20002064);   if (DAT_20002038 == 0) {     do {                     \/* WARNING: Do nothing block with infinite loop *\/     } while( true );   }   FUN_00005bf4(0x10,0xe165,0x1f,6);   uVar20 = 0;   local_5c = 9;   local_5e = 8;   local_53 = 0;   local_56 = 0;   local_5a = 100;   local_58 = 1000;   FUN_0000363c(0x306,2,&amp;local_56);   FUN_0000363c(0x308,0x10,&amp;DAT_200011a4);   FUN_0000363c(0x307,7,&amp;DAT_20001174);   FUN_0000363c(0x310,1,&amp;local_53);   FUN_0000363c(0x311,2,&amp;local_5e);<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-372884","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372884","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=372884"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372884\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=372884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=372884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=372884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}