Skip to content

Commit 9edfb5d

Browse files
committed
add minutes of the first meeting
1 parent 45d599b commit 9edfb5d

File tree

2 files changed

+248
-3
lines changed

2 files changed

+248
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ a great choice for embedded development.
99

1010
## Roster
1111

12-
- [@dvc94ch][] (representative of the RISCV community)
13-
- [@dylanmckay][] (representative of the AVR community)
12+
- [@dvc94ch][] (all things RISCV)
13+
- [@dylanmckay][] (all things AVR)
1414
- [@hannobraun]
1515
- [@jamesmunns]
1616
- [@japaric][] (lead)
1717
- [@jcsoo]
18-
- [@pftbest][] (representative of the MSP430 community)
18+
- [@pftbest][] (all things MSP430)
1919
- [@thejpster]
2020

2121
[@dvc94ch]: https://github.com/dvc94ch

minutes/2018-02-20.md

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
# Agenda
2+
3+
- How to best market embedded Rust on the website?
4+
5+
- What needs to be done to get there? Tangible goals
6+
7+
- What can be accomplished this year? Mind these dates:
8+
- April - July. impl Period. "Little to no design or RFC work will happen during this time."
9+
- August 2. Epoch in beta. Material for the website should be turned in by this date.
10+
- September 13. The Epoch and the new website are released.
11+
12+
- rust-lang-nursery/embedded-wg: Re-use (migrate) rust-embedded/rfcs or create a new repo.
13+
14+
- IRC channel for meetings / coordination: re-use #rust-embedded or make a new one?
15+
16+
- Meeting time and format for next meetings
17+
18+
- Project ideas for the Increasing Rust's Reach program
19+
- cf. https://blog.rust-lang.org/2017/06/27/Increasing-Rusts-Reach.html
20+
21+
# Action items
22+
23+
- @japaric migrate rust-embedded/rfcs to rust-lang-nursery/
24+
- @japaric make everyone a collaborator
25+
- @japaric open issues for further discussion
26+
27+
---
28+
29+
# Notes
30+
31+
A few members shared their thoughts before the meeting
32+
33+
## japaric
34+
35+
Provide a consistent development experience for ARM Cortex-M, AVR, MSP430 and RISCV
36+
microcontrollers. This involves different levels:
37+
38+
- Same tooling: ~~Xargo~~ Cargo, IDE support (VS Code + RLS), `cargo flash`, `cargo debug`
39+
40+
- Same starting point: `*-rt` crates, Cargo templates, vanilla `main`, `memory.x` for memory layout.
41+
42+
- Large set of reusable crates: `embedded-hal` drivers, other utilities like binary serialization,
43+
framing, math, etc.
44+
45+
- Ports of multitasking models: RTFM (reactive + cooperative), Tokio-like (fully cooperative),
46+
threads (preemptive), etc.
47+
48+
Demo that Rust makes embedded development more correct (less bug hunting) and productive. This
49+
could be a walkthrough that involves building a non trivial application that involves a
50+
communication component and uses off the shelf crates from crates.io. The development could be done
51+
in an IDE showcasing debugging, auto completion and tracing / logging functionality.
52+
53+
Highlight production users and applications made by the community (hobbyists)
54+
55+
## jcsoo
56+
57+
What is it that we really want? At a broad level:
58+
59+
- To improve the absolute quality (functionality, safety, performance) of embedded software in the wild.
60+
- To improve the productivity of embedded software development teams, by reducing the tangible and intangible costs of achieving a level of quality.
61+
- To improve the experience for programmers developing for embedded systems.
62+
- To make embedded systems programming more accessible for people that are not already embedded systems developers.
63+
64+
### Competitors
65+
66+
- Vendor toolchains
67+
- Arduino
68+
- Mbed
69+
- Platform.io
70+
- AdaCore
71+
- C + Static Analysis + Valgrind + MISRA C
72+
- C++?
73+
74+
### What do existing toolchains provide, and what does Rust have / need?
75+
76+
- One-step install
77+
- Rustup
78+
- GCC Toolchain for GDB / LD (replace with LLD / LLDB in 2018?)
79+
- Xargo (integrate with Cargo in 2018?)
80+
- OpenOCD / Debugger Tools (future Bobbin-CLI development)
81+
- Rust Native Debugger Tools? (future Bobbin-CLI development)
82+
- Simplified project creation
83+
- Cargo Templates?
84+
- Integrated Development Environment
85+
- Single step build, deploy and debug (Bobbin-CLI)
86+
- Higher level system configuration / code generation tools like Processor Wizard / CubeMX
87+
- No exact equivalent, some of this can be replaced by Cargo and smart use of the type system.
88+
- System Definition Language as future extension to Bobbin-DSL?
89+
- Comprehensive HAL, BSP and Peripheral drivers
90+
- (Bobbin development has been focused on this, need to split out for early release)
91+
- Want peripheral drivers that can be used across multiple vendor MCUs
92+
- Prefer single crate per vendor MCU model, with vendor-common and arch-common crates as dependencies
93+
- Theoretically would like separate low-level and high-level crates per MCU but a big hassle
94+
- Board-level crates include specific configuration and board-level peripheral drivers
95+
- RTOS
96+
- IPC Primitives
97+
- Some in crates.io but want something curated and equivalent in quality to std
98+
- Cooperative and Preemptive Multitasking
99+
- Long term - common traits, multiple implementations?
100+
- Explicit Task Management vs. Futures
101+
- Learn from difficulties with Tokio + Futures - embedded devs would rather have less magic
102+
- Device Driver / Network Stack Architecture
103+
- Good progress on high level traits for I/O, need more implementation experience
104+
- Copy vs. Zero-Copy, Sync vs Async, different ownership models have different tradeoffs
105+
- Maybe look towards Linux / BSD driver APIs rather than traditional RTOS APIs
106+
- Stacks
107+
- USB
108+
- Bluetooth
109+
- Ethernet + TCP/IP
110+
- IoT protocols
111+
- Ideally, allow implementations of upper layers interoperate with lower level drivers. Need more implementation experience.
112+
- Specialized Libraries
113+
- DSP
114+
- Motor Control
115+
- Write Rust wrappers for existing libraries until native implementations show up
116+
- Advanced Tools
117+
- Advanced Tracing + Profiling
118+
- Make sure that Rust interoperates well with existing tools
119+
- Hardware Simulation / Emulation
120+
- Integrate with Unicorn for MCU emulation, maybe create Rust framework for peripheral emulation.
121+
122+
### Opportunities
123+
124+
- Encryption
125+
- Ensure that there is a curated ecosystem of no-std / no-allocator compatible crates
126+
- Robotics
127+
- Development teams are typically smaller and more agile, complexity high enough so that Rust is competing primarily against C++ / Python rather than C
128+
- Some areas (Autonomous Vehicle / Drones) have huge time-to-market concerns and younger teams that have been exposed to non-embedded systems development
129+
- IoT / Sensor Networks
130+
- Many IoT devices are too simple and cost constrained to be a good target (vendors don’t care about security issues and unwilling to innovate in firmware development)
131+
but there are more sophisticated devices that need to do analysis, particularly using deep learning
132+
- Safety-Critical / Mission-Critical
133+
- Long term goal, aim first at non-regulatory markets, leave hard-core until after further standardization
134+
- Focus especially on markets where embedded Linux is considered acceptable for deployment
135+
- Sandboxing / Application Distribution + Updates
136+
- Working on a #[no\_std], zero-allocation WASM interpreter
137+
138+
### Language and Tooling Improvements
139+
140+
- Fix Linking Issues
141+
- Improve panic / debug / fmt bloat
142+
- Building and deploying C libraries
143+
- How can we make building and deploying Rust code for use in C projects even easier?
144+
- Is it possible to build a cargo like tool that will download and install a C header file and pre-compiled .a file from the main cargo.io index? Can we make it just as easy as installing a header-only C / C++ library?
145+
- At least, better integration into existing build systems
146+
- Better c-like enum support ideas
147+
- #[repr(contiguous)] and #[repr(T, exhaustive)] to disallow gaps and incomplete enums
148+
- #[repr(T, exhaustive)] enables safe casting from T to enum
149+
- Numeric matches on c-like enums
150+
- discriminant-only enum items
151+
- enum Prescale { disabled=0, 1, 2, 3, 4, 5, 6, 7 }
152+
- ranges as enum items
153+
- enum Prescale { disabled=0, divider = 1…7 }
154+
- enum Nibble = { 0..16 }
155+
- matching on ranges
156+
157+
``` rust
158+
pub enum Hour { 0..24 }
159+
pub enum Minute { 0..60 }
160+
pub enum Second { 0..60 }
161+
162+
pub struct Time {
163+
h: Hour,
164+
m: Minute,
165+
s: Second
166+
}
167+
```
168+
169+
170+
- Bitfields
171+
- Pack c-like enums within structs
172+
- Focus on usefulness for HW, file format and network protocol developers rather than purely on C interop (which is broken for bitfields anyway)
173+
174+
``` rust
175+
pub struct Device {
176+
#[repr(u8)]
177+
control: struct {
178+
power: enum { off=0, on=1 }, // 1 bit
179+
mode: enum { Shake = 0, Shimmy = 1, Squirm = 2, _Reserved = 3 } // 2 bits
180+
speed: enum { 0..16 }, // 4 bits
181+
rotate: enum { ccw=0, cw=1 }, // 1 bit
182+
},
183+
#[repr(u16)]
184+
x_angle: enum { 0..360 }, // 16 bits
185+
#[repr(u16)]
186+
y_angle: enum { 0..360 }, // 16 bits
187+
}
188+
```
189+
190+
# Minutes
191+
192+
Consistent development experience
193+
194+
- Tooling
195+
- Starting point: e.g. cortex-m-rt
196+
- Re-usablbe crates: embedded-hal drivers
197+
- Multitasking models: RTFM, Tokio-like, threads
198+
199+
Customer profiles
200+
- early adopters: hobbyists, researchers, startups
201+
- regular firmware developers
202+
- safety critical market
203+
204+
Focus on the first group, make progress towards the second group
205+
206+
One step setup++
207+
208+
Make it quickly for experienced users to get started
209+
210+
Succesful approach in std Rust: replace one C component with a Rust one
211+
212+
Big part of the crates.io ecosystem is not available on no_std -- Portability WG?
213+
214+
Opportunity market: developers with domain specific knowledge (robotics, CV, etc.) may not be
215+
familiar with existing C frameworks and may want to look for other options
216+
217+
Traditional RTOS: threads, tasks over them, well defined interfaces for communication
218+
219+
Vendor SDKs: "rubbish", carry too much legacy (makefiles), huge installers
220+
221+
Building state machines for embedded systems? -- generators
222+
223+
website: who's the audience? beginners in embedded dev? seasoned developers?
224+
225+
how Rust compares to C, MicroPython, JS on micros? What are the advantages? tooling, etc.
226+
227+
embedded development on stable
228+
- compete against stable vendor provided toolchains
229+
- may not be achievable, but try to reduce breakage: run tests in rust-lang/rust
230+
231+
check for code size regressions
232+
233+
remove panic strings
234+
235+
OpenOCD doesn't support RISCV because of incomplete debug spec
236+
237+
One RISCV silicon implementation; Rust works on it but needs polish
238+
239+
## Increasing Rust's Reach
240+
241+
- Expanding the ecosystem. Join embedded-hal, writing examples
242+
243+
- CI for embedded
244+
245+
- CLI for testing (HIL?)

0 commit comments

Comments
 (0)