{"id":377769,"date":"2024-06-01T15:07:45","date_gmt":"2024-06-01T15:07:45","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=377769"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=377769","title":{"rendered":"<span>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c .NET \u043d\u0430 RISC-V \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c IoT \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f Sipeed Lichee RV<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habrastorage.org\/webt\/9m\/27\/oc\/9m27oc58yccz39ivybixjwt4nqo.jpeg\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/9m\/27\/oc\/9m27oc58yccz39ivybixjwt4nqo.jpeg\" alt=\".NET nanoFramework Weatherstation\" data-src=\"https:\/\/habrastorage.org\/webt\/9m\/27\/oc\/9m27oc58yccz39ivybixjwt4nqo.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  \u0414\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c IoT \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 C# \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 ARM \u0438\u043b\u0438 x86. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 RISC-V \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b .NET \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0432 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0433\u043e\u0434\u0430 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 .NET 8.0 SDK, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 RISC-V \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u043f\u043e\u0434 \u041e\u0421 Debian\/Ubuntu. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 Sipeed Lichee RV \u043d\u0430 RISC-V \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 Allwinner D1 (\u044f\u0434\u0440\u043e Alibaba\/T-Head Xuantie C906 RISC-V). \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0441\u0442\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 .NET 8.0 SDK \u043d\u0430 Sipeed Lichee RV. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438 GPIO \u0438 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u043c BME280 \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u0440\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<a name=\"habracut\"><\/a><\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/font><\/h2>\n<p>  \u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043e \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b .NET \u0434\u043b\u044f RISC-V \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0432 2023 \u0433\u043e\u0434\u0443 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c <a href=\"https:\/\/github.com\/clamp03\">Dong-Heon Jung<\/a> \u0438\u0437 Samsung. \u0422\u043e\u0433\u0434\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 .NET \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c, \u0447\u0442\u043e \u043c\u043e\u0433\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c, \u044d\u0442\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u00abhelloworld\u00bb. \u0421\u0435\u0439\u0447\u0430\u0441 CoreCLR \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u0438\u0435 \u0432\u0435\u0449\u0438, \u043d\u043e \u043f\u043e\u043a\u0430 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u0412 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/84834\">\u043f\u043b\u0430\u043d\u044b \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a> \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 JIT \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f, \u0444\u0443\u043d\u043a\u0446\u0438\u0439 SIMD, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u044d\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0432\u0435\u0442\u043a\u0430 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/36748\">RISC-V support #36748<\/a>.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u0431\u0440\u0430\u0437\u0430<\/font><\/h2>\n<p>  \u0414\u043b\u044f <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/649327\/\">Sipeed Lichee RV<\/a> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u043e\u0442 \u041e\u043b\u0435\u0433\u0430, \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0432\u0435\u0434\u0443\u0449\u0438\u0445 \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Armbian. \u0412 <a href=\"https:\/\/forum.armbian.com\/topic\/21465-armbian-image-and-build-support-for-risc-v\/\">\u0432\u0435\u0442\u043a\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f<\/a> \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0440\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u043b\u0430\u0442\u0430\u0445 Nezha D1 \u0438 Lichee RV (Dock).<\/p>\n<ul>\n<li>\u0414\u043b\u044f \u043f\u043b\u0430\u0442\u044b Nezha D1 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f: HDMI, LAN, USB, \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 3.5 jack;<\/li>\n<li>\u0414\u043b\u044f \u043f\u043b\u0430\u0442\u044b Lichee RV Dock \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f: HDMI, WiFi, USB, USB-LAN.<\/li>\n<\/ul>\n<p>  \u041e\u0431\u0440\u0430\u0437\u044b \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e <a href=\"https:\/\/disk.yandex.ru\/d\/da8qJ8wyE1hhcQ\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>. \u0412\u0441\u0435 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u043d\u0430 \u043e\u0431\u0440\u0430\u0437\u0435\u00a0<a href=\"https:\/\/disk.yandex.ru\/d\/da8qJ8wyE1hhcQ\/Nezha_D1\/ArmbianTV\/20230930-current\">Armbian_23.09_Nezha_lunar_current_6.1.0.img.xz<\/a> \u043e\u0442 2023.09.30. \u041e\u0431\u0440\u0430\u0437 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430\u00a0<strong>Ubuntu 23.04 (lunar), \u044f\u0434\u0440\u043e Linux 6.1.0-rc3-d1.<\/strong><\/p>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f micro-SD \u043a\u0430\u0440\u0442\u0430 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 <a href=\"https:\/\/github.com\/balena-io\/etcher\/releases\">balenaEtcher<\/a>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u0440\u0430\u0437 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0443-\u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  <a href=\"https:\/\/devdotnet.org\/post\/armbian-linux-distributiv-dlya-otladochnyh-plat-na-arm\/\">Armbian<\/a> \u2014 \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Linux, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 ARM \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435, \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u043b\u0430\u0442 \u043e\u0433\u0440\u043e\u043c\u0435\u043d: Orange Pi, Banana Pi, Odroid, Olimex, Cubietruck, Roseapple Pi, Pine64, NanoPi \u0438 \u0434\u0440.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a <a href=\"https:\/\/www.armbian.com\/\">Armbian<\/a> \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 .NET 8.0 SDK \u043d\u0430 Sipeed Lichee RV<\/font><\/h2>\n<p>  \u0413\u043e\u0442\u043e\u0432\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 GitHub <a href=\"https:\/\/github.com\/dkurt\/dotnet_riscv\">dkurt\/dotnet_riscv<\/a>. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c SDK, \u0442\u0430\u043a \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e Runtime \u0441\u0440\u0435\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f AspNetCore \u0438 NETCore. \u0414\u043b\u044f RISC-V \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d RID: <strong>linux-riscv64<\/strong>.<\/p>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 <i>\/usr\/share\/dotnet<\/i>. \u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"bash\">$ export INSTALLPATH=\/usr\/share\/dotnet $ sudo apt-get update $ sudo apt-get install -y wget tar $ wget -O dotnet-sdk-riscv64.tar.gz \"https:\/\/github.com\/dkurt\/dotnet_riscv\/releases\/download\/v8.0.100\/dotnet-sdk-8.0.100-linux-riscv64.tar.gz\" $ sudo mkdir -p $INSTALLPATH $ sudo tar -xf dotnet-sdk-riscv64.tar.gz -C \"$INSTALLPATH\" --checkpoint=.100 $ rm dotnet-sdk-riscv64.tar.gz $ sudo ln -s $INSTALLPATH\/dotnet \/usr\/bin\/dotnet <\/code><\/pre>\n<p>  \u041f\u043e \u0438\u0442\u043e\u0433\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 SDK:<\/p>\n<pre><code class=\"bash\">root@nezha:~# dotnet --info .NET SDK:  Version:           8.0.100  Commit:            57efcf1350  Workload version:  8.0.100-manifests.6c33ef20  Runtime Environment:  OS Name:     ubuntu  OS Version:  23.04  OS Platform: Linux  RID:         linux-riscv64  Base Path:   \/usr\/share\/dotnet\/sdk\/8.0.100\/  .NET workloads installed:  Workload version: 8.0.100-manifests.6c33ef20 There are no installed workloads to display.  Host:   Version:      8.0.0   Architecture: riscv64   Commit:       5535e31a71  .NET SDKs installed:   8.0.100 [\/usr\/share\/dotnet\/sdk]  .NET runtimes installed:   Microsoft.AspNetCore.App 8.0.0 [\/usr\/share\/dotnet\/shared\/Microsoft.AspNetCore.App]   Microsoft.NETCore.App 8.0.0 [\/usr\/share\/dotnet\/shared\/Microsoft.NETCore.App]  ... <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f c \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <i>dotnet myapp.dll<\/i>.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/font><\/h2>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <strong>DotnetConsoleAppCoreCLRInfo<\/strong>.<\/p>\n<pre><code class=\"bash\">$ dotnet new console -n DotnetConsoleAppCoreCLRInfo <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 <i>DotnetConsoleAppCoreCLRInfo<\/i> \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u0434 \u0432 <i>Program.cs<\/i> \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<pre><code class=\"cs\">using System; using System.Runtime.InteropServices;  namespace DotnetConsoleAppCoreCLRInfo {   class Program   {     static void Main(string[] args)     {       \/\/Runtime Info       Console.WriteLine(\".NET console application!\");       bool isMono = typeof(object).Assembly.GetType(\"Mono.RuntimeStructs\") != null;       \/\/output       Console.WriteLine($\"Hello World {(isMono ? \"from Mono!\" : \"from CoreCLR!\")}\");       Console.WriteLine(typeof(object).Assembly.FullName);       Console.WriteLine(System.Reflection.Assembly.GetEntryAssembly ());       Console.WriteLine($\".NET version: {RuntimeInformation.FrameworkDescription}\");       Console.WriteLine($\"OS architecture: {RuntimeInformation.OSArchitecture}\");       Console.WriteLine($\"OS Id: {RuntimeInformation.RuntimeIdentifier}\");       Console.WriteLine(\"Successfully!\");        }   } } <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">$ dotnet run <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/gp\/la\/y9\/gplay9sbkpkpghjs7zh7hkwzyou.png\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/gp\/la\/y9\/gplay9sbkpkpghjs7zh7hkwzyou.png\" alt=\"dotnet risc-v lichee-rv\" data-src=\"https:\/\/habrastorage.org\/webt\/gp\/la\/y9\/gplay9sbkpkpghjs7zh7hkwzyou.png\"\/><\/a><br \/>  <em>\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f DotnetConsoleAppCoreCLRInfo<\/em><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u00abMono.RuntimeStructs\u00bb, Mono \u0438\u043b\u0438 CoreCLR. \u0415\u0449\u0435 \u0434\u043e \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f .NET \u043d\u0430 RISC-V \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u0434 Mono \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u041e\u0421 \u043f\u043e\u0432\u0435\u0440\u0445 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430 <a href=\"https:\/\/github.com\/riscv-software-src\/opensbi\">RISC-V Open Source Supervisor Binary Interface (OpenSBI)<\/a>. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0437\u0430\u043d\u044f\u043b ~8 \u043c\u0438\u043d\u0443\u0442. \u0415\u0441\u043b\u0438 \u043a\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 x86, \u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/github.com\/devdotnetorg\/dotnet-iot-samples\/tree\/master\/dotnet-iot-coreclr-info-riscv64\">dotnet-iot-coreclr-info-riscv64 \u043d\u0430 GitHub \u2014 .NET IoT Samples<\/a>.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438 GPIO<\/font><\/h2>\n<p>  \u041d\u0430 \u043d\u0435\u0441\u0443\u0449\u0435\u0439 Dock \u043f\u043b\u0430\u0442\u0435 \u0434\u043b\u044f Lichee RV \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u0440\u0430\u0437\u044a\u0435\u043c GPIO \u043d\u0430 40-pins \u0441 \u0448\u0430\u0433\u043e\u043c 2,54 \u043c\u043c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0440\u0430\u0437\u044a\u0435\u043c\u043e\u043c Raspberry Pi, \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043b\u0438\u043d\u0438\u0438 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043d\u0430 3.3V \u0438 5V, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b GND \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432\u044b\u0432\u043e\u0434\u0430\u043c \u043d\u0430 Raspberry Pi.<\/p>\n<ul>\n<li>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u043a \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0443 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u043b\u0438\u043d\u0438\u0438 <strong>144<\/strong>, \u043c\u0435\u0442\u043a\u0430\u00a0<strong>PE16<\/strong>.<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438 GPIO \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/devdotnet.org\/post\/rabota-s-gpio-v-linux-chast-6-biblioteka-libgpiod\/\">Libgpiod<\/a>. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Libgpiod \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438 GPIO \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u0437 .NET \u0441\u0440\u0435\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 Linux (Armbian). \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b ARM32, ARM64, RISC-V \u0438 x86. \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 GPIO \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 <a href=\"https:\/\/devdotnet.org\/post\/programmirovanie-na-python-i-ustanovka-docker-dlya-sipeed-lichee-rv-risc-v\/\">\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 Python \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker \u0434\u043b\u044f Sipeed Lichee RV RISC-V<\/a>.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <strong>Libgpiod<\/strong> \u0432\u0435\u0440\u0441\u0438\u0438 <strong>1.6.4<\/strong>, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 2.1.1. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 2.0 \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libgpiod \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 uAPI v2 GPIO \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u044f\u0434\u0440\u043e Linux 5.10. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u0432\u044b\u0437\u043e\u0432\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <a href=\"https:\/\/github.com\/dotnet\/iot\/commit\/3fb06eb5fefbea23306cd85d67bfcff7b987065b\">Commit Add libgpiodv2 support (#2184)<\/a> \u0443\u0436\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0430 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"https:\/\/github.com\/dotnet\/iot\">System.Device.Gpio<\/a>, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u044b\u0448\u0435\u043b \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libgpiod \u0438 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f x86\/ARM32\/ARM64\/RISC-V:<\/p>\n<pre><code class=\"bash\">$ sudo apt-get update $ sudo apt-get install -y curl $ curl -SL --output setup-libgpiod.sh https:\/\/raw.githubusercontent.com\/devdotnetorg\/docker-libgpiod\/dev\/setup-libgpiod.sh $ chmod +x setup-libgpiod.sh $ sudo .\/setup-libgpiod.sh <\/code><\/pre>\n<p>  \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u0437 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u043e\u0432 <i>(4) Installation from binaries<\/i>.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u00a0<strong>DotnetBlinkLEDApp<\/strong> \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u0434 \u0432 <i>Program.cs<\/i> \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<pre><code class=\"cs\">using System; using System.Device.Gpio; using System.Device.Gpio.Drivers; using System.Threading;  namespace DotnetBlinkLEDApp {   class Program   {     static void Main(string[] args)     {       \/*Blink an LED       *       https:\/\/docs.microsoft.com\/en-us\/dotnet\/iot\/tutorials\/blink-led       *       *\/       Console.WriteLine(\"Blinking LED.\");       \/\/for Linux       \/\/Board: Lichee RV.       \/\/https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/649327\/       \/\/Pin: PE16.       \/\/GPIOCHIP = 0, LED_PIN = 144       const int GPIOCHIP = 0;       const int LED_PIN = 144;       GpioController controller;       var drvGpio = new LibGpiodDriver(GPIOCHIP);       controller = new GpioController(PinNumberingScheme.Logical, drvGpio);       controller.OpenPin(LED_PIN, PinMode.Output);       controller.Write(LED_PIN,PinValue.Low);       bool ledOn = false;       const int count=5;       for(int i=1;i&lt;count;i++)       {         Console.WriteLine($\"Step: {i} of {count}\");         controller.Write(LED_PIN, ((ledOn) ? PinValue.High : PinValue.Low));         Console.WriteLine($\"LED: {((ledOn) ? \"High\" : \"Low\")}\");         Thread.Sleep(100);         ledOn = !ledOn;       }     }   } } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u043c\u0438\u0433\u0430\u0442\u044c, \u043d\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439, \u0447\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0438\u0437-\u0437\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b CoreCLR.<\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/github.com\/devdotnetorg\/dotnet-iot-samples\/tree\/master\/dotnet-iot-blink-riscv64\">dotnet-iot-blink-riscv64 \u043d\u0430 GitHub \u2014 .NET IoT Samples<\/a>.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 Bosh BME280<\/font><\/h2>\n<p>  \u0414\u0430\u0442\u0447\u0438\u043a <a href=\"https:\/\/devdotnet.org\/post\/rabota-s-gpio-v-linux-na-primere-banana-pi-bpi-m64-chast-5-device-tree-overlays-shina-i2c-podkyuchenie-datchikov-bosh-bmx\/\">BME280<\/a> \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Bosch Sensortec \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u0440\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c, \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u043d\u043e\u0435 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0448\u0438\u043d\u0435 I2C. \u0412 \u043e\u0431\u0440\u0430\u0437\u0435 \u0443\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0448\u0438\u043d\u0430 I2C. \u041a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0448\u0438\u043d\u044b I2C:<\/p>\n<ul>\n<li>\u041a\u043e\u043d\u0442\u0430\u043a\u0442 <strong>PB1<\/strong> \u2014 \u043b\u0438\u043d\u0438\u044f\u00a0<strong>SDA (Serial Data)<\/strong> \u2014 \u044d\u0442\u0430 \u043b\u0438\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0437\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li>\u041a\u043e\u043d\u0442\u0430\u043a\u0442 <strong>PB0<\/strong> \u2014 \u043b\u0438\u043d\u0438\u044f\u00a0<strong>SCL (Serial Clock)<\/strong> \u2014 \u044d\u0442\u0430 \u043b\u0438\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0448\u0438\u043d\u044b I2C \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">$ ls -l \/sys\/bus\/i2c\/devices\/i2c-* <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0448\u0438\u043d\u044b I2C:<\/p>\n<pre><code class=\"bash\">root@nezha:~# ls -l \/sys\/bus\/i2c\/devices\/i2c-* lrwxrwxrwx 1 root root 0 Jan  2  1970 \/sys\/bus\/i2c\/devices\/i2c-0 -> ..\/..\/..\/devices\/platform\/soc\/5500000.hdmi\/i2c-0 lrwxrwxrwx 1 root root 0 Jan  2  1970 \/sys\/bus\/i2c\/devices\/i2c-1 -> ..\/..\/..\/devices\/platform\/soc\/2502800.i2c\/i2c-1 <\/code><\/pre>\n<p>  \u0412 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e <i>\/sys\/bus\/i2c\/devices\/i2c-1<\/i>, \u0442\u043e \u0448\u0438\u043d\u0430 I2C \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b. \u041f\u0435\u0440\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u044d\u0442\u043e \u0448\u0438\u043d\u0430 I2C \u0432\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u0432\u044b\u0432\u043e\u0434\u0430 HDMI.<\/p>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 BME280 \u043f\u043e\u0441\u0442 <a href=\"https:\/\/devdotnet.org\/post\/dotnet-iot-chast-4-shina-i2c-podkluchenie-datchika-bme280\/\">.NET IoT. \u0427\u0430\u0441\u0442\u044c 4. \u0428\u0438\u043d\u0430 I2C, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 Bosh BME280<\/a>.<\/p>\n<p>  \u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c GPIO \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <strong>DotnetBME280App<\/strong> \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <i>Program.cs<\/i> \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/devdotnetorg\/dotnet-iot-samples\/tree\/master\/dotnet-iot-bme280\">dotnet-iot-bme280 \u043d\u0430 GitHub \u2014 .NET IoT Samples<\/a>. \u041d\u043e\u043c\u0435\u0440 \u0448\u0438\u043d\u044b I2C \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0436\u0435:<\/p>\n<pre><code class=\"cs\">const int busId = 1; <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/pf\/ty\/m5\/pftym5utfuin2i34ypduvncr21k.png\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/pf\/ty\/m5\/pftym5utfuin2i34ypduvncr21k.png\" alt=\"dotnet risc-v lichee-rv\" data-src=\"https:\/\/habrastorage.org\/webt\/pf\/ty\/m5\/pftym5utfuin2i34ypduvncr21k.png\"\/><\/a><br \/>  <em>\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f DotnetBME280App<\/em><\/p>\n<p>  \u0428\u0438\u043d\u0430 I2C \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u0438 \u0434\u0430\u0442\u0447\u0438\u043a BME280.<\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/github.com\/devdotnetorg\/dotnet-iot-samples\/tree\/master\/dotnet-iot-bme280-riscv64\">dotnet-iot-bme280-riscv64 \u043d\u0430 GitHub \u2014 .NET IoT Samples<\/a>.<\/p>\n<p>  \u0428\u0430\u0431\u043b\u043e\u043d\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f RISC-V \u0438 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u0430\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u0435\u0441\u0442\u044c \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=devdotnetorg.vscode-extension-dotnet-fastiot\">.NET FastIoT<\/a>, \u043f\u043e\u0441\u0442 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/597601\/\">\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 IoT \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 C# \u0434\u043b\u044f Raspberry Pi \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u0438\u043a\u043e\u0432, \u043d\u0430 Linux<\/a>.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0412\u044b\u0432\u043e\u0434<\/font><\/h2>\n<p>  \u0423\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 IoT \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f RISC-V \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438 GPIO \u0438 \u0448\u0438\u043d\u0430 I2C \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u0430\u043a\u0435\u0442\u044b NuGet \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0420\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c RISC-V \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e, \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 SDK \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 Commits.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0420\u0435\u0441\u0443\u0440\u0441\u044b<\/font><\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/36748\">RISC-V support Issue #36748 \u2014 GitHub dotnet\/runtime<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dkurt\/dotnet_riscv\">Build .NET SDK for RISC-V \u2014 GitHub dkurt\/dotnet_riscv<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Xinlong-Wu\/runtime\/tree\/riscv-jit-rv64\">.NET is a cross-platform runtime \u2014 GitHub Xinlong-Wu\/runtime<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/devdotnetorg\/dotnet-iot-samples\">.NET IoT Samples \u2014 GitHub devdotnetorg\/dotnet-iot-samples<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<h4><font color=\"#454cee\">\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0437\u0430\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u044d\u0442\u043e:<\/font>  <\/p>\n<ul>\n<li>\u27a4 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/688052\/\">\u041f\u0430\u0442\u0442\u0435\u0440\u043d \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 .NET nanoFramework \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432<\/a><\/li>\n<li>\u27a4 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/814349\/\">\u041f\u0438\u043b\u0438\u043c \u00ab\u0414\u0430\u043b\u043b\u0430\u0441\u00bb \u0438\u043b\u0438 \u00ab\u0428\u0430\u043f\u043a\u0430\u00bb \u0438 \u00ab\u041e\u043f\u0451\u043d\u043e\u043a\u00bb \u043d\u0430 \u043e\u0436\u0438\u0432\u0448\u0435\u043c SUN-4c IPC station<\/a><\/li>\n<li>\u27a4 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/812413\/\">\u0424\u0430\u043d\u0442\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a><\/li>\n<li>\u27a4 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/812311\/\">\u0410\u0432\u0442\u043e\u043c\u0430\u0448\u0438\u043d\u0438\u0441\u0442. \u041e\u0436\u0438\u0432\u043b\u044f\u0435\u043c \u00ab\u0430\u0432\u0442\u043e\u043f\u0438\u043b\u043e\u0442\u00bb \u0434\u043b\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u043a\u0438<\/a><\/li>\n<li>\u27a4 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/817111\/\">\u0422\u043e, \u0447\u0442\u043e \u043c\u0435\u0440\u0442\u0432\u043e, \u0443\u043c\u0435\u0440\u0435\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442. Battletech<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<blockquote><p><a href=\"https:\/\/t.me\/timewebru\"><b>\u041d\u043e\u0432\u043e\u0441\u0442\u0438, \u043e\u0431\u0437\u043e\u0440\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u044b \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Timeweb.Cloud \u2014 \u0432 \u043d\u0430\u0448\u0435\u043c Telegram-\u043a\u0430\u043d\u0430\u043b\u0435<\/b><\/a> <b>\u21a9<\/b><\/p><\/blockquote>\n<p>  <a href=\"https:\/\/timeweb.cloud\/?i=106909\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/b5\/pj\/of\/b5pjofdoxth14ro-rjsrn7sbmiy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/b5\/pj\/of\/b5pjofdoxth14ro-rjsrn7sbmiy.png\"\/><\/a><\/h4>\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\/817163\/\"> https:\/\/habr.com\/ru\/articles\/817163\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habrastorage.org\/webt\/9m\/27\/oc\/9m27oc58yccz39ivybixjwt4nqo.jpeg\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/9m\/27\/oc\/9m27oc58yccz39ivybixjwt4nqo.jpeg\" alt=\".NET nanoFramework Weatherstation\" data-src=\"https:\/\/habrastorage.org\/webt\/9m\/27\/oc\/9m27oc58yccz39ivybixjwt4nqo.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  \u0414\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c IoT \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 C# \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 ARM \u0438\u043b\u0438 x86. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 RISC-V \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b .NET \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0432 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0433\u043e\u0434\u0430 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 .NET 8.0 SDK, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 RISC-V \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u043f\u043e\u0434 \u041e\u0421 Debian\/Ubuntu. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 Sipeed Lichee RV \u043d\u0430 RISC-V \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 Allwinner D1 (\u044f\u0434\u0440\u043e Alibaba\/T-Head Xuantie C906 RISC-V). \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0441\u0442\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 .NET 8.0 SDK \u043d\u0430 Sipeed Lichee RV. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438 GPIO \u0438 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u043c BME280 \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u0440\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-377769","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/377769","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=377769"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/377769\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=377769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=377769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=377769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}