22
13 July 2016 An Incubator Project in the Apache Software Foundation http://mynewt.apache.org/

Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

13July2016

AnIncubator Project intheApacheSoftwareFoundation

http://mynewt.apache.org/

Page 2: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

OpenSourceOSforConstrainedIoT– MCU/Hardwareindependent– ARMCortex-M*,AVR,MIPS,more...

• RISC-V

http://mynewt.apache.org/

ApacheMynewt

Page 3: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

FirstreleaseofasuccessfulIoT product…

…nowmakethatrepeatable,please.

ProblemandContext

Page 4: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

Runtime: ConfidentialandProprietary(2016)

IoTisbeingdrivenbytheSystemonChip(SoC)ApacheMynewtaddresseseverythingneededforSoC development

MemoryFlash

Peripheral Security Radio

Compute

Characteristics

• CPU:48MHz-300MHz, Cortex-M• Radios:BLE,Wi-Fi,802.15.4(g)• Flash/RAM:512KB/64KB(today),

1MB/256KB(thisyear)• Size:3-12mm

Benefits

• Inexpensive• LowPower• Easytomanufacture

Power Time Sensing

ApacheMynewtis“Linux”fordevicesthatcannotrunLinux

Page 5: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

Runtime: ConfidentialandProprietary(2016)

RuntimewithMynewtModernizesDevelopmentforSoCs

WithoutRuntime

BuyRTOS

BuyNetStack

BuildBootloader

WriteFlashDrivers

DevelopLogging

SupportChip

ChooseCompiler

WithRuntime

ConnecttoRuntimeManagementService

ProvisionAWSenvironment

DevelopApplication

UseApacheMynewt

MFRGSupport

WriteGateway

DevelopSWUpdate

Development:Faster,Consistent,Repeatable.EscapeHWlock-in.

Page 6: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

OSGatewayCloud

• Discovery• Registration• Provisioning• Stats&Logging• ConfigurationManagement• CoreManagement• ImageUpgrade

AnotherView:InitialBluetoothLowEnergySystem

NewtMgrDeviceProvisioning

SoftwareUpgrade

FailureAnalysis

Runtime: ConfidentialandProprietary(2016)

Onlyend-to-endplatformbuiltatopFOSS;usage-basedcloud

Page 7: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

IPProviders

MCUVendors

Cloud Providers

End-Users

• LiberalApache2.0license• Individuals,notCorporations• Meritocracy• Strong licensingandIPpolicies• Longhistoryofworkingwithlarge

organizations:IBM,Oracle,Pivotal/EMC

• Manyyearsexperiencemanaginglarge,complexprojects:ApacheWebServer,Hadoop,Cassandra,Kafka,Subversion, etc.

WhytheASF?

ACommunityEffort

Community-driven OpenSource:BestWaytoMaintainHealthyUserEcosystem

Page 8: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

(today)• Bluetoothconnectedproducts

• Medical:everything• Consumer/Enterprise: locks,lights• Industrial

• Makers• Home• HardwareLabs• Clothing

(tomorrow)• BluetoothLowEnergy4.2à Bluetooth5• IndustrialWirelessSensorNetworks• Wi-FiProducts• WhoKnows?

• PowerOptimization

• Meshnetworking

• Security

• SensorAlgorithms

• ControlSystems

ScaleMakesProblems Interesting

ApacheMynewtUsers

Page 9: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

#commits

• 280,000linesofcode(March2016)

• InitialsupportforSimulator,NordicNRF51/52,STM32F3/4andArduino• Announced:ArduinoPrimo,ArduinoOtto

• Activecontributors,WeWantYou!ü http://mynewt.apache.org/

ProjectStatistics

Page 10: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

Makeiteasytofind, install3rd partylibraries

Maintainandre-usepackagesacrossmultiple

products

Managedebugandproduction build setups

Goals

Efficiency:useonlywhatyouneed

• Everythingisapackage.Eachpackagedescribes itsdependencies totherestoftheworld

• Acollection ofpackagesiscalledanapplication

• Thereareafewspecialpackages:BSPandProject.Projectcontainsmain() andBSPdefines linkerscriptandhardwarelayout

• TargetsareusedtocombineprojectsandBSP

• Packagescanbedistributed, upgradedandinstalledremotely

Description

BuildandPackageManagement

Composeacrossmultiple repos

Page 11: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

apache-mynewt-coreOSHALBSP

ProjectStructure(comingsoon)“core”brokenintoappropriatesub-projects

apache-mynewt-ble apache-mynewt-nffs apache-mynewt-sys

ASFInfrastructure: Governance,Licensing Rigor

github-sensor-apigithub-bsp1

github-bsp2

github-hal-implgithub-app1

github-network-impl

Github

• ASFgovernancestructure(PMCs)correspondswithsub-packagestructure• ASFrepositoriesclean,Apache2.0license• Userscanassembleprojectssourcedfrommultiplerepos

Composabilityacrossmultiple reposprovides flexibility

3rd PartyRepo(s)

github-app2

Page 12: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

ProvidequalitydriversformajorMCUplatforms

Designforcross-platform:well-definedAPIsforHAL,BSPand

drivers

Goals

Makeiteasytoaddboardspecificdefinitions

• BSPdefinition isprovidedin<app>/hw/bsp

• HALdefinitions areinhw/hal andcontainuniform, cross-platformAPIs

• MCUdefinitions areinhw/mcu andprovideimplementations forvariousMCUs• Hierarchyallowscode-reusewithin

MCUfamilies

• BSPsforcommondev kitsareavailableaspackages(e.g.,NordicnRF51/2DK)

• BSPsdependonMCUs

• BSP+MCUprovides implementation forHALAPIs

Description

BSPandHAL

ChipVendors:WeWantYou!

Page 13: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

• Pre-emptive,multi-taskingRTOS• Strict,priority-basedscheduling• Upto253differentpriority levels

• Ticklesskernel

• Powermanagement

• Resourceutilization tracking

• Built-intasks:• Idle• Sanity

Kernel

Page 14: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

• EventQueuesprovideamechanismfor“mostlysleeping”asynchronoustasks

• Wake-upon:• Messagefromanothertask• Timer• I/Ostatechange• Incomingpacket• Watchdog

• Performoperations:• Sendanalert• Respondtoarequest• Scheduleawakeup

• Gobacktosleep

EnergyEfficientEventModel

Page 15: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

Bootloader BootVars

Image2

Image 1

NFFS(User)

CB(User)

• BootloadercanbelocatedinROMorFlash• Options forinternalandexternalflashes

• Performs integritycheck andswapsimages• ImagescontainSHA-256hashandRSAsignature• NFFSoptional

• Providesalog-structured flashfilesystem designed forsmallflashes• CB(CircularBuffer)optional

• Provides implementationofflashcircularbuffer

EnergyEfficientEventModel

Page 16: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

WhatWe’reProtecting HowWeProtectIt

Bootloader • Firststagebootloader canoperatefromROMandverifysignature of secondstagebootloader

Images • AllimageshaveSHA-256 ofimagecontents• Images support signing withECCorRSA2048bit

signatures• Secondstagebootloader canverify imagesignature

Network Interfaces • Fullsupport for BLE4.2securityat1.0release,including link-layerandapp-layer

SystemSecurity

Page 17: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

• Inaddition tovariousMCUports:OS,HAL,FSandthemajorityofpackagescanrunonMac,Linux

• Developyourcodeonthehostandthenport totherealhardware

• Unittestframeworkisincorporatedtoallof thepackages:abilitytorununittestsonsimulatedenvironmentandrealhardware

• OSandlibrariesarefullyregressiontestedtoensureAPIcompatibilitybetweenreleases

SimulatorandTestFramework

Page 18: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

V0.8

April2016

V0.9

May2016

V0.10

June2016

V0.11

July2016

V1.0-b1

Aug2016

V1.0-GA

Oct2016

Highlights

v0.8: Firstrelease,BLE4.2,FFS,Kernel,Console,Shell,SecureBootv0.9: ExpandedHWsupportandHALv0.10: Wi-Fi&IPsupportv0.11: FullBluetoothSupport /Qualificationv1.0(GA) APIcompatibility,FullRegressionTesting

ApacheMynewtRoadmap

Page 19: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

THANKYOU

http://mynewt.apache.org/

MailingList:[email protected]

IRC:#mynewtonfreenode

Page 20: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

Mynewt Components/Composition MinRAM

MinROM/On-chipFlash

CoreOS kernel <1kB <6kB

Blinky application (incl.GPIO,HAL,console, shell) 17kB 23kB

Bootloader (incl.Newtron FlashFileSystem) 4.5kB 25kB

NimBLE stack(incl. bothperipheralandcentralroles,legacypairing) 4.5kB 69kB

BLE exampleapplication“bleprph” (incl.OS,radio,NimBLE) 15kB 99kB

RecommendedRAM/Flash32-64kB/256-512kB

Runtime: ConfidentialandProprietary(2016)

ImageSize

Page 21: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

BLEComponent BLEConfiguration Element Default(kB)

ElementSize(kB)

DefaultSize(kB)

Sizeforx# ofconnections

Host(.bss+.data) 3828

Host(runtimeRAMreqs)

HCIbuffer 3 64 204 Independent

Max #ofconcurrent connections 1 80 80 x*80

Max #ofservices 5 8 40 Independent

Max #ofconfig descriptors (peripheral) 1 4 4 (x+1)*3

Max#ofconcurrent GATTprocedures 2 40 80 Independent

Max.# oftotalATTattributes 36 32 1152 Independent

max_prep_entries (forpartial writes) 6 12 72 Independent

Max#ofL2CAPchannels (3 perconnection) 3 28 84 x*3

Max#concurrent L2CAPsignalling procedures 2 20 40 Independent

Max #concurrent SecurityManagerprocedures 1 360 360 Independent

Controller(BSS+data)

Max #ofconcurrent connections 1 416 416 x*416

#ofduplicatescanadvertisers 8 8 64 Independent

#ofscanresponseadvertisers 8 8 64 Independent

Whitelistsize 8 8 64 Independent

Resolvableprivateaddress list 4 40 160 Independent

RNG buffersize 32 1 32 Independent

RuntimeRAMrequirementforNimBLE withdefaults(includingsecurity):6744kBRuntime: ConfidentialandProprietary(2016)

RAMRequirementsforBLEApplications

Page 22: Wed930 riscv apachemynewt v1April 2016 V0.9 May 2016 V0.10 June 2016 V0.11 July 2016 V1.0-b1 Aug 2016 V1.0-GA Oct 2016 Highlights v0.8: First release, BLE 4.2, FFS, Kernel, Console,

DynamicPowerManager+Tickless OS

(Goal:toachievethemostpower-efficient

state)

MCUpowerstates,peripheralpower

consumption, constraintsonstatetransitions

(e.g.,“ChipCsupports 3sleepstateseachwithtransitiondelayTd

andenergyoverheadEo)

Timeout-basedsystempowerpolicies

(e.g.,“enactdeepestsleepstatewheneverpossible for

applicationA”)

Enable/DisableMCUperipherals

(e.g.,disableclockandpowerdomains forserialportsince

constraintshavebeenreleased”)

Runtime: ConfidentialandProprietary(2016)

PowerManagement