>100 Views
January 27, 18
スライド概要
2018/1/27 .NET Fringe Japan 2018 New Year Party発表資料。
SeeedKKの中の人。Microsoft MVP for Internet of Things。
TinyCLR OS on Wio LTE 2018/1/27 Takashi Matsuoka
Takashi Matsuoka 2017~ MVP for Windows Development Joined the Seeed K.K. Developing the Wio LTE for Arduino SORACOM User Group Japan SeeedJP User Group
TinyCLR OS Wio LTE Interoperability
EMBEDDED devices + MANAGED code
2007~ .NET Micro Framework GHI Electronics Secret Labs
2015~ .NET Micro Framework Interpreter 2015~ LLILLUM
2016~ TinyCLR OS https://youtu.be/yMGntUwPT1I
2017~ nanoFramework https://nanoframework.net/
TinyCLR OS
TinyCLR OS http://www.tinyclr.com/ 1. Running .NET on embedded devices 2. Subset of both the .NET Base Class Library API and the Windows UWP API 3. Modern Debugging 4. Developed and supported by GHI Electronics, LLC 5. Commercial and non-commercial use, under the Apache 2 license 6. Your own hardware
TinyCLR OS http://www.tinyclr.com/ http://docs.ghielectronics.com/tinyclr/downloads.html http://matsujirushi.hatenablog.jp/entry/2017/12/23/190243
2 Visual Studio Extension (.vsix) 4 Visual Studio 2017 3 NuGet Libraries (.nupkg) USB / Serial 1 Firmware (.bin) FEZ TinyCLR Config
DEMO
Notes 1. 最新のTinyCLR OS VS15.5とTinyCLR OS 0.6以前はNG <DisableHandlePackageFileConflicts>true</Disa bleHandlePackageFileConflicts> 2. アプリの自動起動 RUN_APP_PIN 3. アプリの消去 TinyCLR Config
Supported Devices • FEZCLR • G30 • G80 TinyCLR OS can run • G120 your own hardware! • G400 • Cerb • EMX • EmbeddedMaster • USBizi
TinyCLR OS on Wio LTE
Wio LTE JP Version https://qiita.com/matsujirushi/items/c51e6e3b71cd181c1fd9
FEZ • • • • STM32F401RET6 Cortex-M4 84MHz Flash 512KB RAM 96KB GHI Bootloader Config <- dfu-util TinyCLR Firmware <XMODEM .NET Application Wio LTE JP Version NUCLEO-F401RE • • • • STM32F401RET6 Cortex-M4 84MHz Flash 512KB RAM 96KB TinyCLR Firmware <Mbed drive • • • • • STM32F405RG Cortex-M4 168MHz Flash 1MB RAM 192KB with LTE module TinyCLR Firmware .NET Application .NET Application <dfu-util
Program.h using GHIElectronics.TinyCLR.Devices.Gpio; using System.Threading; namespace DigitalWrite { class Program { static void Main() { GpioPin pin = GpioController.GetDefault().OpenPin(38); pin.SetDriveMode(GpioPinDriveMode.Output); while (true) { pin.Write(GpioPinValue.High); pin.Write(GpioPinValue.Low); Thread.Sleep(10); } } } } 0.3usec. vs 135.8usec.
Interoperability
http://docs.ghielectronics.com/tinyclr/porting/native_interops.html
Create and merge C functions Register the interop assembly
Create and merge C functions Project Interop Assembly Code
Create and merge C functions Interop Assembly Code TinyCLR Firmware Interop Assembly Code
Register the interop assembly Managed Code TinyCLR Firmware Interop Assembly Code TinyCLR OS ApiProvider "Seeed.TinyCLR.WioLTE.Interop" Interop Assembly Code
DEMO?
Notes 1. Interop Assembly Codeの更新 元Projectを修正するとHashvalue?が変更 2. Memory Dumpは使えない 3. LTE通信は未だちょっと動く
まとめ • TinyCLR OS • EMBEDDED devices + MANAGED code • 動くものがここにある • Wio LTE • Arduino,Espruino,TinyCLR OSが動くデバイス • Interoperability • できる(けど苦労する)
Link • TinyCLR OS by GHI • TinyCLR OS Introduction by GHI • TinyCLR OS関連ブログ by matsujirushi • Wio LTEドキュメントガイド by matsujirushi • TinyCLR OS on Wio LTEリポジトリ by matsujirushi