From 76f3ad1b22d892118eafefcbf939b4c88217f039 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 27 Aug 2018 12:52:02 +0200 Subject: [PATCH] remove the newsletters directory --- newsletters/2018-03-15.md | 83 ------- newsletters/2018-03-29.md | 218 ----------------- newsletters/2018-04-14.md | 71 ------ newsletters/2018-04-28.md | 75 ------ .../2018-05-13-the-path-towards-stable.md | 221 ------------------ newsletters/2018-05-15.md | 113 --------- newsletters/2018-05-28.md | 109 --------- newsletters/2018-07-15.md | 76 ------ newsletters/2018-07-29.md | 101 -------- newsletters/2018-08-12.md | 60 ----- .../2018-08-2x-psa-cortex-m-breakage.md | 146 ------------ 11 files changed, 1273 deletions(-) delete mode 100644 newsletters/2018-03-15.md delete mode 100644 newsletters/2018-03-29.md delete mode 100644 newsletters/2018-04-14.md delete mode 100644 newsletters/2018-04-28.md delete mode 100644 newsletters/2018-05-13-the-path-towards-stable.md delete mode 100644 newsletters/2018-05-15.md delete mode 100644 newsletters/2018-05-28.md delete mode 100644 newsletters/2018-07-15.md delete mode 100644 newsletters/2018-07-29.md delete mode 100644 newsletters/2018-08-12.md delete mode 100644 newsletters/2018-08-2x-psa-cortex-m-breakage.md diff --git a/newsletters/2018-03-15.md b/newsletters/2018-03-15.md deleted file mode 100644 index 4b40d6ae..00000000 --- a/newsletters/2018-03-15.md +++ /dev/null @@ -1,83 +0,0 @@ -# The Embedded Working Group Newsletter - 1 - -> 2018-03-15 - -This is the first newsletter of the [Embedded WG]! We will be releasing this newsletter on a bi-weekly basis, and we are looking to highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help! - -If you want to mention something in [the next newsletter], make sure to leave a comment on the issue! - -## Highlights - -* [Tock-OS] has released the [1.0 of their kernel], gotten the Rust Userspace library back in order, and are working on a [new register interface] -* [Emilgardis], [jamesmunns] and [ryankurte] have become collaborators of the [svd] and [svd2rust] projects. -* [hannobraun], [ilya-epifanov], [thejpster], [therealprof] have become collaborators of the [embedded-hal] project. -* [dvc94ch] has created the [riscv-rust] organization for all your embedded RISCV needs! -* [dylanmckay] has begun [rebasing][avr-rust-rebase] the avr-rust/rust fork onto a recent rust-lang/rust version, bringing in LLVM 6.0 support. - -## Embedded Projects - -If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to mention it on the tracking issue for [the next newsletter], we would love to show it off! - -### `embedded-hal` drivers - -This is a list of recently released drivers that are part of the [Weekly Driver Initiative]. There are currently 5 Released Drivers, 14 WIP Drivers, and lots of TODOs! - -* [pcein] has [released][pcein-blog] the third weekly driver for the [`adc-mcp3008`], an 8-channel 10-bit ADC. -* [japaric] has [released][enc-blog] the fourth weekly driver for the [`enc28j60`], an Ethernet controller with SPI interface. -* [dbrgn] has [released][mcp-blog] the fifth weekly driver for the [`mcp3425`], a 16-bit ADC with I2C interface. - -## Thanks - -* Thanks to everyone who has been commenting on the [Embedded WG Issues], especially for the [Embedded Rust Book] tracking issue! -* [varkor] has fixed a [long standing LLVM bug][gh41315], that artificially increased the binary size of Rust programs, and backported the patch to rustc. -* LLD is now being shipped with the Rust toolchain. [FenrirWolf] [patched Xargo][xargo-lld] so that Xargo users can make use of it too. - -## Help Wanted - -If you have an embedded project that could use contributors or maintainers, leave a comment for [the next newsletter]! - -* We are [pretty close][cortex-m-rt-lld] to being able to use LLD to link Rust programs compiled for ARM Cortex-M but there are some [LLD bugs][lld-issues] that still need to be fixed. Help reporting these bugs upstream would be greatly appreciated! -* Incremental compilation is in the roadmap for this year but it doesn't work with `no_std` binaries due to an [old rustc bug][gh18807] related to linking. Help us fix it! There's a proposed solution [here]. -* We want to explore stabilizing some assembly operations in core as an alternative to the unstable asm! macro. We would love some help identifying the assembly operations that need to be provided this way as some can be implemented in external assembly files without losing -semantics. Details in issue [#63]. - -[#63]: https://github.com/rust-lang-nursery/embedded-wg/issues/63 -[1.0 of their kernel]: https://www.tockos.org/blog/2018/talking-tock-35/ -[`adc-mcp3008`]: https://crates.io/crates/adc-mcp3008 -[`enc28j60`]: https://crates.io/crates/enc28j60 -[`mcp3425`]: https://crates.io/crates/mcp3425 -[avr-rust-rebase]: https://github.com/avr-rust/rust/pull/91 -[cortex-m-rt-lld]: https://github.com/japaric/cortex-m-rt/issues/53 -[dbrgn]: https://github.com/dbrgn -[dvc94ch]: https://github.com/dvc94ch -[dylanmckay]: https://github.com/dylanmckay -[Embedded Rust Book]: https://github.com/rust-lang-nursery/embedded-wg/issues/56 -[Embedded WG Issues]: https://github.com/rust-lang-nursery/embedded-wg/issues -[Embedded WG]: https://github.com/rust-lang-nursery/embedded-wg -[embedded-hal]: https://github.com/japaric/embedded-hal -[Emilgardis]: https://github.com/Emilgardis -[enc-blog]: http://blog.japaric.io/wd-4-enc28j60/ -[FenrirWolf]: https://github.com/FenrirWolf -[gh18807]: https://github.com/rust-lang/rust/issues/18807 -[gh41315]: https://github.com/rust-lang/rust/issues/41315 -[hannobraun]: https://github.com/hannobraun -[here]: https://github.com/rust-lang/rust/issues/47074#issuecomment-354588718 -[ilya-epifanov]: https://github.com/ilya-epifanov -[jamesmunns]: https://github.com/jamesmunns -[japaric]: https://github.com/japaric -[lld-issues]: https://github.com/japaric/cortex-m-rt/issues/53#issuecomment-371972935 -[mcp-blog]: https://blog.dbrgn.ch/2018/3/13/rust-mcp3425-driver/ -[new register interface]: https://www.tockos.org/blog/2018/talking-tock-36/ -[pcein]: https://github.com/pcein -[pcein-blog]: http://pramode.in/2018/02/24/an-introduction-to-writing-embedded-hal-based-drivers-in-rust/ -[riscv-rust]: https://github.com/riscv-rust -[ryankurte]: https://github.com/ryankurte -[svd2rust]: https://github.com/japaric/svd2rust -[svd]: https://github.com/japaric/svd -[the next newsletter]: https://github.com/rust-lang-nursery/embedded-wg/issues/65 -[thejpster]: https://github.com/thejpster -[therealprof]: https://github.com/therealprof -[Tock-OS]: https://github.com/helena-project/tock -[varkor]: https://github.com/varkor -[Weekly Driver Initiative]: https://github.com/rust-lang-nursery/embedded-wg/issues/39 -[xargo-lld]: https://github.com/japaric/xargo/pull/200 \ No newline at end of file diff --git a/newsletters/2018-03-29.md b/newsletters/2018-03-29.md deleted file mode 100644 index a1aff247..00000000 --- a/newsletters/2018-03-29.md +++ /dev/null @@ -1,218 +0,0 @@ -# The Embedded Working Group Newsletter - 2 - -> 2018-03-29 - -This is the second bi-weekly newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help! - -If you want to mention something in [the next newsletter], make sure to leave a comment on the issue. - -[the next newsletter]: https://github.com/rust-lang-nursery/embedded-wg/issues/72 -[Embedded WG]: https://github.com/rust-lang-nursery/embedded-wg - -## Highlights - -* [dbrgn] has kicked off an investigation on how to [mock embedded-hal] to make testing sensors easier -* [emilgardis] and [ryankurte] are busy [refactoring] the [svd-parser] crate -* [japaric], [hannobraun], and [jamesmunns] from the [Embedded WG] attended the 2018 Rust All Hands in Berlin, working on our goal to make [stable embedded rust development] possible in 2018. See the bottom of this post for more details! - -[japaric]: https://github.com/japaric -[hannobraun]: https://github.com/hannobraun -[jamesmunns]: https://github.com/jamesmunns -[mock embedded-hal]: https://github.com/rust-lang-nursery/embedded-wg/issues/70 -[stable embedded rust development]: https://github.com/rust-lang-nursery/embedded-wg/issues/42 -[refactoring]: https://github.com/japaric/svd/issues/46 -[svd-parser]: https://github.com/japaric/svd -[ryankurte]: https://github.com/ryankurte -[emilgardis]: https://github.com/Emilgardis - -## Embedded Projects - -If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to mention it on the tracking issue for [the next newsletter], we would love to show it off! - -### `embedded-hal` drivers - -This is a list of recently released drivers that are part of the [Weekly Driver Initiative]. There are currently 5 Released Drivers, 14 WIP Drivers, and lots of TODOs! - -* [danielgallagher0] has released their [hts221] humidity and temperature sensor driver -* [MrBuddyCasino] has released their I2C based [mcp9808] temperature sensor driver -* [Ilya Epifanov] has released their I2C based [si5351] CMOS clock generator driver, check out the [si5351 docs] for more info -* [Edwin Amsler] is working on their [axp209] PMIC driver -* [dbrgn] is working on their Sensirion [sgp30] low-power gas sensor driver -* [pcein] has started work on their [pcd8544] for SPI based LCD controllers used in displays like the Nokia 5110 -* [nordmoen] is working on their driver for the [hc-sr04] ultrasonic distance sensor - -[Weekly Driver Initiative]: https://github.com/rust-lang-nursery/embedded-wg/issues/39 -[danielgallagher0]: https://github.com/danielgallagher0 -[hts221]: https://medium.com/@pdanielgallagher/hts221-humidity-and-temperature-sensor-88056ea9e5fa -[MrBuddyCasino]: https://github.com/MrBuddyCasino -[mcp9808]: https://crates.io/crates/mcp9808 -[Ilya Epifanov]: https://github.com/ilya-epifanov -[si5351]: https://github.com/ilya-epifanov/si5351 -[si5351 docs]: https://docs.rs/si5351/0.1.5/si5351/ -[Edwin Amsler]: https://github.com/RandomInsano -[axp209]: https://github.com/RandomInsano/axp209-rs -[pcein]: https://github.com/pcein -[pcd8544]: https://github.com/pcein/pcd8544 -[dbrgn]: https://github.com/dbrgn -[sgp30]: https://github.com/dbrgn/sgp30-rs -[nordmoen]: https://github.com/nordmoen -[hc-sr04]: https://github.com/nordmoen/hc-sr04 - -### `embedded-hal` Board/Chip Support Crates - -* [DoumanAsh] has started work on their [stm32l4x6-hal] chip support crate - -[DoumanAsh]: https://github.com/DoumanAsh -[stm32l4x6-hal]: https://github.com/DoumanAsh/stm32l4x6_hal - -## Thanks - -* Thanks to all of the Rust Team and Working Group members who took time at the All Hands to tackle some important Embedded Issues -* Thanks to [Alex Chrichton] who pushed a fix to a [linker issue] mentioned in our [last newsletter] - -[Alex Chrichton]: https://github.com/alexcrichton -[linker issue]: https://github.com/rust-lang/rust/pull/49316 -[last newsletter]: https://github.com/rust-lang-nursery/embedded-wg/blob/master/newsletters/2018-03-15.md - -## Help Wanted - -* [Simon Sapin] posted some working code for the [DS3234] SPI RTC, and is looking for someone to turn it into a maintained crate! - -[Simon Sapin]: https://github.com/SimonSapin -[DS3234]: https://github.com/rust-lang-nursery/embedded-wg/issues/39#issuecomment-375262785 - -If you have an embedded project that could use contributors or maintainers, leave a comment for [the next newsletter]! - -# Special Feature: The Embedded WG at the 2018 Rust All Hands - -This week 15 or so Rust teams/working groups met for the Rust All Hands event in Berlin. Some members of the embedded WG were present and we had a chance to talk to the compiler, core and infra teams. - -These are the highlights of our talks. - -## Embedded Rust on stable - -We had previously identified 3 unstable features / issues that tie embedded development to the nightly channel in https://github.com/japaric/stable-embedded-rust. We talked to the other Rust teams about the possibility of addressing these issues in time for the 2018 edition release and the conclusion was that they thought that the timeline was possible. These are the 3 unstable features we are referring to: - -### Unstable Feature #1: `xargo` - -We'll ship a rust-std component (pre-compiled `core`+`compiler-builtins`) for the `thumb*` and `msp430` targets. This removes the need for `xargo` so people will be able to do something like the following to cross compile to ARM Cortex-M: - -```bash -rustup target add thumb7m-none-eabi -cargo build --target thumbv7m-none-eabi -``` - -**Tracking issue**: [rust-lang/rust#49382]. - -[rust-lang/rust#49382]: https://github.com/rust-lang/rust/issues/49382 - -### Unstable Feature #2: `compiler-builtins` - -`extern crate compiler_builtins` is unstable to directly use. The fix we have decided on is to inject that as part of the prelude you get from `#![no_std]`. - -So, today `#![no_std]` expands to something like this: - -``` rust -#![no_std] -extern crate core; -``` - -With our change the expansion will run like this: - -``` rust -#![no_std] -extern crate core; - -// but this doesn't #![feature(compiler_builtins_lib)] -extern crate compiler_builtins; -``` - -In the future we might want to merge `compiler-builtins` into `core` but that requires more effort and can still be done if we do the `#![no_std]` prelude approach right now. - -**Tracking issue:** [rust-lang/rust#49380] - -[rust-lang/rust#49380]: https://github.com/rust-lang/rust/issues/49380 - -### Unstable Feature #3: `panic_fmt` - -There's an accepted RFC (#2070) for a stable mechanism to select the behavior of `panic!` in `no_std` context, and there's a know issue where the arguments of `panic_fmt` are kept in the binary even when they are unused by the `panic_fmt` implementation (cf. [rust-lang/embedded-wg#41]). - -[rust-lang/embedded-wg#41]: https://github.com/rust-lang-nursery/embedded-wg/issues/41 - -The main concern here was whether we'll be able to fix the binary size problem with the accepted design or if we'll need some new design. The compiler team thinks that this can be fixed with the existing design using MIR only rlibs but it's unlikely this will get fixed in time for the edition release. [nagisa] will likely propose an alternate solution that involves having Cargo select the panic provider crate. - -[nagisa]: https://github.com/nagisa - -## Non critical unstable features - -There are some other unstable features that don't prevent you from doing embedded development, however they come up often when doing no-std development. We had a chat with people on the compiler team about them. - -### Unstable Feature #4: `const fn` - -This feature has been proposed for stabilization (cf. [rust-lang/rust#24111]). - -[rust-lang/rust#24111]: https://github.com/rust-lang/rust/issues/24111#issuecomment-376649804 - -### Unstable Feature #5: `asm!` - -**Background**: Some assembly operations can be implemented as external assembly files that are then called into using FFI; other ops though do need to be inlined into the function from which they are called to prevent losing semantics. Using external assembly file can be done on the stable channel. The second type of operation requires the unstable `asm!` macro. - -The compiler team is not 100% sure on whether they want to stabilize inline assembly for the edition release. The embedded WG has proposed an alternative proposal: expose *some* assembly operations that need to be inlined as "Rust intrinsics" -- in a similar fashion to how SIMD is being implemented; these intrinsics would be in the `core::asm::$ARCH` module and they could either be implemented by lowering to a LLVM intrinsic or using inline assembly. For example: - -``` rust -pub mod asm { - pub mod arm { - #[inline(always)] - pub fn cpsid() { - unsafe { - asm!("cpsid i" ::: "memory" : "volatile"); - } - } - } -} -``` - -These would be stable APIs with an unstable implementation. If LLVM assembler syntax changes, the implementations of these functions would have to be updated. - -The embedded WG will submit an RFC proposing the `asm` module and that will include a list of assembly operations that (a) are common and (b) need to be inlined for different architectures. - -### Unstable Feature #6: `#[used]` - -This experimental feature has been in the compiler for a while and it's required in some scenarios when using LTO to prevent the compiler from dead-stripping some function / `static` that needs to be in the final binary. - -We'll try to get it stabilized by the edition release but it's not a high priority feature. - -## Stability of the Embedded Targets - -We don't only want to make embedded Rust possible on stable; we also want to make sure the embedded targets don't regress. So we are going to add tests to rust-lang/rust CI to make sure regression block PRs from landing. - -That effectively will make some of the embedded targets into the tier 1 platform. The core team is fine with adding the `thumb*` targets (ARM Cortex-M) to tier 1. Less maintained, still in development and not fully mature targets like AVR, MSP430 and RISCV will become tier 2 -- they'll be tested but won't block PRs and rust-std binaries will be produced but it's not guaranteed there will be binaries available for all nightly / beta / stable releases. - -We'll open an issue to discuss with the infra team the exact tests we want to add and track progress on that, but have already told them about the kind of tests we want to add and they thought those kind of tests are possible to implement. The kind of tests we discussed were: - -- It compiles and links -- Runs the cross compiled binary in QEMU doesn't crash and exits with exit code 0. -- Tracking the binary size of a program compiled with `-Os` / `-Oz` and notify someone or fail the build if the size changes by +/- 5-10% or something. - -## LLVM backends that are not yet in rustc - -There are two embedded LLVM backends that have not yet been enabled in rustc for different reasons: AVR and RISCV. - -In the case of AVR the main reason is that some LLVM codegen bugs prevent you from building core for AVR. These bugs are related to 128-bit integers and formatting floats. The libs team discussed this some time ago and they decided they are fine with landing arch specific `#[cfg]` attributes to remove 128-bit integers and other things like float APIs. - -In the case of RISCV the LLVM backend is currently under active development and our current version of LLVM doesn't fully support RISCV. We would have to backport several patches to make RISCV work on our LLVM version. The core team feels OK with backporting those patches as long as they have already landed in upstream LLVM, and are not still under review. - -## Tooling - -Getting tooling for e.g. binary inspection (e.g. `objdump`) can be hard on some platforms (e.g. Windows) specially for architecture which currently are not too widely used (e.g. RISCV). We can improve the situation here by shipping llvm tools with the Rust toolchain -- with one set of those tools you can inspect all the architectures that Rust supports. These are the thoughts of the core / infra team regarding this: - -- We put these tools in the sysroot and have them always shipped with the Rust toolchain so no `rustup component add` required -- this is already the case with `lld`. It might not be possible to provide these tools on all platforms but it's very likely they'll be available on tier 1 platforms. -- We do *not* add these tools to the user `$PATH`. Instead some Cargo subcommand will be created by the embedded WG (e.g. `cargo objdump`) and that subcommand will look for `llvm-objdump` in the sysroot and do the right thing. -- We make no guarantees about the semantics and interface of these tools being preserved over time (e.g. CLI changes, user facing output format changes, etc.). - -### The Embedded Rust Book - -We decided on an initial audience for the embedded book; we will be targeting people that know some embedded stuff *and* some Rust. The main reason for this is that if someone knows one and not the -other then they can go and read existing Rust documentation or the Discovery book and then read the embedded book. For more details check [rust-lang-nursery/embedded-wg#56]. - -[rust-lang-nursery/embedded-wg#56]: https://github.com/rust-lang-nursery/embedded-wg/issues/56 diff --git a/newsletters/2018-04-14.md b/newsletters/2018-04-14.md deleted file mode 100644 index cdc79dfe..00000000 --- a/newsletters/2018-04-14.md +++ /dev/null @@ -1,71 +0,0 @@ -# The Embedded Working Group Newsletter - 3 - -> 2018-04-14 - -This is the third bi-weekly newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help! - -If you want to mention something in [the next newsletter], make sure to leave a comment on the issue. - -[the next newsletter]: https://github.com/rust-lang-nursery/embedded-wg/issues/84 -[Embedded WG]: https://github.com/rust-lang-nursery/embedded-wg - -## Highlights - -* Crates for the Embedded Rust Ecosystem are now being tracked in the [Awesome Embedded Rust] repository -* Progress has been made as part of the [Embedded Rust on Stable] initiative, including: - * `extern crate compiler_builtins` is [now included in the no_std prelude] - * [xargo no longer needed] for ARM Cortex-M development -* We also made some progress on simplifying the embedded development setup: You can now link Embedded Rust programs [using lld] -* [Wilfried] kicked off a blog series about [using embedded rust] -* [Andre Richter] is writing a tutorial for using Rust to write [bare metal Raspberry Pi 3] applications -* The Embedonomicon and the Embedded Rust Books are [now kept] in the [Embedded WG] repository, and pull requests are welcome! - -[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust -[Embedded Rust on Stable]: https://github.com/rust-lang-nursery/embedded-wg/issues/42 -[now included in the no_std prelude]: https://users.rust-lang.org/t/psa-breaking-change-extern-crate-compiler-builtins-is-now-included-in-no-std-crates/16704 -[xargo no longer needed]: https://users.rust-lang.org/t/psa-you-no-longer-need-xargo-to-do-arm-cortex-m-development/16703 -[using lld]: https://users.rust-lang.org/t/cortex-m-rt-v0-4-0-now-you-can-link-arm-cortex-m-programs-using-lld/16751 -[Wilfried]: https://github.com/ithinuel -[using embedded rust]: http://ithinuel.me/embedded-rust-why/ -[Andre Richter]: https://github.com/andre-richter -[bare metal Raspberry Pi 3]: https://github.com/andre-richter/rust-raspi3-tutorial -[now kept]: https://github.com/rust-lang-nursery/embedded-wg/pull/78 - -## Embedded Projects - -If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to mention it on the tracking issue for [the next newsletter], we would love to show it off! - -* [japaric] released an initial version of [cargo-binutils], which will allow you to use LLVM's binutils (like `nm`, `size`, `objcopy`, etc.) in the format `cargo objcopy` (once [issue 49584] has landed) -* [myeisha] released the first version of their [thumb2-stack-size] tool, which helps determine the maximum stack size used in embedded code - -[japaric]: https://github.com/japaric -[cargo-binutils]: https://github.com/japaric/cargo-binutils -[issue 49584]: https://github.com/rust-lang/rust/issues/49584 -[myeisha]: https://github.com/myeisha -[thumb2-stack-size]: https://crates.io/crates/thumb2-stack-size - -### `embedded-hal` Ecosystem Crates - -As part of the [Weekly Driver Initiative], crates that are part of the `embedded-hal` ecosystem are now tracked in the [Awesome Embedded Rust] repository. Here is a current snapshot of what is available there: - -| Type | Status | Count | -| :--- | :----- | :---- | -| [Device Crates] | released | 13 | -| [HAL Impl Crates] | released | 10 | -| [Driver Crates Released] | released | 7 | -| [Driver Crates WIP] | WIP | 26 | - -[Weekly Driver Initiative]: https://github.com/rust-lang-nursery/embedded-wg/issues/39 -[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates -[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates -[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates -[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip - -## Help Wanted - -* We need help working on [RFC2070], stabilizing usage of custom Panic behavior. [nagisa] is willing to mentor! -* If you use inline assembly in your Embedded Rust programs, help us capture what assembly operations are [used most often] so we can stabilize them as intrinsics - -[RFC2070]: https://github.com/rust-lang/rust/issues/44489#issuecomment-381324623 -[nagisa]: https://github.com/nagisa -[used most often]: https://github.com/rust-lang-nursery/embedded-wg/issues/63#issue-305114817 diff --git a/newsletters/2018-04-28.md b/newsletters/2018-04-28.md deleted file mode 100644 index 960ffb74..00000000 --- a/newsletters/2018-04-28.md +++ /dev/null @@ -1,75 +0,0 @@ -# The Embedded Working Group Newsletter - 4 - -> 2018-04-28 - -This is the fourth bi-weekly newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help! - -If you want to mention something in [the next newsletter], make sure to leave a comment on the issue. - -[the next newsletter]: https://github.com/rust-lang-nursery/embedded-wg/issues/93 -[Embedded WG]: https://github.com/rust-lang-nursery/embedded-wg - -## Highlights - -* The [Embedded WG] IRC meetings are now explicitly public, and the agendas for the next meeting can be found in the [WG Issues], like [this issue] for the next meeting -* [David] shared his utility [`Form`], which takes a single `lib.rs` (like those created by `svd2rust` or `bindgen`), and splits it into structured modules. Check out the [`nrf52`] Chip Support Crate as an example, and try it out for your generated projects! -* [astro] shared [`managed`], A library that provides a way to logically own objects, whether or not heap allocation is available - -[WG Issues]: https://github.com/rust-lang-nursery/embedded-wg/issues -[this issue]: https://github.com/rust-lang-nursery/embedded-wg/issues/91 -[David]: https://github.com/djmcgill -[`Form`]: https://github.com/djmcgill/form -[`nrf52`]: https://github.com/jamesmunns/nrf52/tree/master/src -[astro]: https://github.com/astro -[`managed`]: https://crates.io/crates/managed - - -## Embedded Projects - -If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to mention it on the tracking issue for [the next newsletter], we would love to show it off! - -* [Daniel] started work on [`bluetooth-hci`], an abstraction layer for HCI based Bluetooth Controllers, and is using it in his [`bluenrg`] crate for STMicro's BlueNRG RF modules -* [cr1901] shared his [`AT2XT`] project, an adapter that allows use of low cost PS2 keyboards with older computers that expect (now very expensive) XT keyboards. The firmware for this project is based on `rtfm`, and runs on an `msp430` microcontroller. Check out the [short blurb] by [cr1901] summarizing the project -* [hannobraun] released v0.3 of his [`lpc82x`] Chip Support Crate for NXP's LPC82x family of microcontrollers, as well as v0.1 of [`lpc82x-hal`]. Check out the [lpc82x-hal announcement] here! -* [japaric] released v0.3.1 of [`heapless`] which now contains fixed capacity implementations of `HashMap` and `HashSet` that work on `no_std`, do not require an allocator, and use `u32` hashes (instead of the default `u64`). - -[`AT2XT`]: https://github.com/cr1901/AT2XT -[cr1901]: https://github.com/cr1901 -[japaric]: https://github.com/japaric -[`heapless`]: https://crates.io/crates/heapless -[Daniel]: https://github.com/danielgallagher0 -[`bluetooth-hci`]: https://github.com/danielgallagher0/bluetooth-hci -[`bluenrg`]: https://github.com/danielgallagher0/bluenrg -[hannobraun]: https://github.com/hannobraun -[`lpc82x`]: https://crates.io/crates/lpc82x -[`lpc82x-hal`]: https://crates.io/crates/lpc82x-hal -[lpc82x-hal announcement]: https://users.rust-lang.org/t/lpc82x-hal-0-1-hardware-abstraction-layer-for-nxp-lpc82x-mcus/17116 -[short blurb]: https://github.com/rust-lang-nursery/embedded-wg/pull/94#issuecomment-385172043 - -### `embedded-hal` Ecosystem Crates - -As part of the [Weekly Driver Initiative], crates that are part of the `embedded-hal` ecosystem are now tracked in the [Awesome Embedded Rust] repository. Here is a current snapshot of what is available there: - -| Type | Status | Count | -| :--- | :----- | :---- | -| [Device Crates] | released | 12 | -| [HAL Impl Crates] | released | 10 | -| [Board Support Crates] | released | 6 | -| [Driver Crates Released] | released | 7 | -| [Driver Crates WIP] | WIP | 27 | - -[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust -[Weekly Driver Initiative]: https://github.com/rust-lang-nursery/embedded-wg/issues/39 -[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates -[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates -[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates -[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates -[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip - -## Help Wanted - -* The [Embedded WG] is looking for contributors for the [Rustfest Impl Period]. If you will be attending RustFest in Paris, let us know! -* Progress is being made towards [Stable Embedded Rust], try out the current preview, and we would love some feedback! - -[Stable Embedded Rust]: https://github.com/rust-lang-nursery/embedded-wg/issues/42#issuecomment-384524779 -[Rustfest Impl Period]: https://github.com/rust-lang-nursery/embedded-wg/issues/90 diff --git a/newsletters/2018-05-13-the-path-towards-stable.md b/newsletters/2018-05-13-the-path-towards-stable.md deleted file mode 100644 index ec1231fc..00000000 --- a/newsletters/2018-05-13-the-path-towards-stable.md +++ /dev/null @@ -1,221 +0,0 @@ -# Cortex-M library development now possible on beta and the path towards stable embedded Rust - -> 2018-05-13 - -> **TL;DR** -> -> * 1.27 = embedded (Cortex-M) *library* development on stable -> * 1.28 or 1.29 = embedded (Cortex-M) *application* development on stable -> * We are making breaking changes in the ecosystem in order to move towards development on the -> stable channel -> * If you are a crate maintainer / author, make sure you test your crates with the new versions of -> `cortex-m` (and similar) on the current `beta` release of Rust -> * If the latest version of a dependency doesn't compile on `beta`, file an issue and/or ping us on -> the #rust-embedded IRC channel -> * Thanks for your patience! - -We are happy to announce that *library* development for the Cortex-M targets is now possible on the -beta channel! :tada: - -For example, to cross compile a library crate for the Cortex-M3 you would run these commands: - -``` console -$ # switch to the beta channel -$ rustup default beta - -$ # install the rust-std component (pre-compiled core) for the target -$ rustup target add thumbv7m-none-eabi - -$ # get some source to build -$ cargo clone cortex-m --vers 0.5.0 && cd cortex-m - -$ # then It Just Works -$ cargo build --target thumbv7m-none-eabi -``` - -What about embedded *application* development? There is just a single unstable feature that prevents -us from building a `no_std` binary on stable: the `panic_fmt` lang item. This unstable feature will -soon be removed in favor of the `#[panic_implementation]` feature ([implementation PR]), which is -slated for stabilization in time for the edition release (we are hoping to stabilize it as early as -1.28 but we'll see). - -[implementation PR]: https://github.com/rust-lang/rust/pull/50338 - -## Making the Cortex-M ecosystem work on stable - -"`no_std` binaries are *possible* on stable" is very different from "*my* embedded application -builds on stable". The later requires all the dependencies to also compile on stable. So we are -starting to migrate the Cortex-M ecosystem to work on stable. All the crates listed below are now -compiling on the beta channel. - -Legend: `crate-name` - link to CHANGELOG - link to stabilization PR - ~removed unstable features~ - -- [`cortex-m-quickstart`][c0] - [CHANGELOG][ch0] - [PR][p0] - -[c0]: https://docs.rs/cortex-m-quickstart/~0.3 -[ch0]: https://github.com/japaric/cortex-m-quickstart/blob/master/CHANGELOG.md#v030---2018-05-12 -[p0]: https://github.com/japaric/cortex-m-quickstart/pull/29 - -- [`cortex-m-rt`][c1] - [CHANGELOG][ch1] - [PR][p1] - ~asm!~ ~core_intrinsics~ ~global_asm!~ - ~lang_items~ ~linkage~ ~naked_functions~ ~used~ - -[c1]: https://crates.io/crates/cortex-m-rt/0.5.0 -[ch1]: https://github.com/japaric/cortex-m-rt/blob/master/CHANGELOG.md#v050---2018-05-12 -[p1]: https://github.com/japaric/cortex-m-rt/pull/69 - -- [`cortex-m-semihosting`][c2] - [CHANGELOG][ch2] - [PR][p2] - -[c2]: https://crates.io/crates/cortex-m-semihosting/0.3.0 -[ch2]: https://github.com/japaric/cortex-m-semihosting/blob/master/CHANGELOG.md#v030---2018-05-10 -[p2]: https://github.com/japaric/cortex-m-semihosting/pull/16 - -- [`cortex-m`][c3] - [CHANGELOG][ch3] - [PR][p3] - ~asm!~ ~const_fn~ - -[c3]: https://crates.io/crates/cortex-m/0.5.0 -[ch3]: https://github.com/japaric/cortex-m/blob/master/CHANGELOG.md#v050---2018-05-11 -[p3]: https://github.com/japaric/cortex-m/pull/88 - -- [`embedded-hal`][c4] - [CHANGELOG][ch4] - [PR][p4] - ~never_type~ - -[c4]: https://crates.io/crates/embedded-hal/0.2.0 -[ch4]: https://github.com/japaric/embedded-hal/blob/master/CHANGELOG.md#v020---2018-05-12 -[p4]: https://github.com/japaric/embedded-hal/pull/80 - -- [`f3`][c5] - [CHANGELOG][ch5] - [PR][p5] - -[c5]: https://crates.io/crates/f3/0.6.0 -[ch5]: https://github.com/japaric/f3/blob/master/CHANGELOG.md#v060---2018-05-12 -[p5]: https://github.com/japaric/f3/pull/93 - -- [`l3gd20`][c6] - [CHANGELOG][ch6] - [PR][p6] - ~Unsized~ - -[c6]: https://crates.io/crates/l3gd20/0.2.0 -[ch6]: https://github.com/japaric/l3gd20/blob/master/CHANGELOG.md#v020---2018-05-12 -[p6]: https://github.com/japaric/l3gd20/pull/4 - -- [`lsm303dlhc`][c7] - [CHANGELOG][ch7] - [PR][p7] - ~Unsized~ - -[c7]: https://crates.io/crates/lsm303dlhc/0.2.0 -[ch7]: https://github.com/japaric/lsm303dlhc/blob/master/CHANGELOG.md#v020---2018-05-12 -[p7]: https://github.com/japaric/lsm303dlhc/pull/4 - -- [`stm32f103xx`][c8] - [CHANGELOG][ch8] - [PR][p8] - ~const_fn~ ~global_asm!~ ~try_from~ - ~use_extern_macros~ ~used~ - -[c8]: https://crates.io/crates/stm32f103xx/0.10.0 -[ch8]: https://github.com/japaric/stm32f103xx/blob/master/CHANGELOG.md#v0100---2018-05-12 -[p8]: https://github.com/japaric/stm32f103xx/pull/24 - -- [`stm32f30x-hal`][c9] - [CHANGELOG][ch9] - [PR][p9] - ~never_type~ - -[c9]: https://crates.io/crates/stm32f30x-hal/0.2.0 -[ch9]: https://github.com/japaric/stm32f30x-hal/blob/master/CHANGELOG.md#v020---2018-05-12 -[p9]: https://github.com/japaric/stm32f30x-hal/pull/25 - -- [`stm32f30x`][c10] - [CHANGELOG][ch10] - [PR][p10] - ~const_fn~ ~global_asm!~ ~try_from~ - ~use_extern_macros~ ~used~ - -[c10]: https://crates.io/crates/stm32f30x/0.7.0 -[ch10]: https://github.com/japaric/stm32f30x/blob/master/CHANGELOG.md#v070---2018-05-12 -[p10]: https://github.com/japaric/stm32f30x/pull/16 - -- [`svd2rust`][c11] (output of) - [CHANGELOG][ch11] - [PR][p11] - ~const_fn~ ~global_asm!~ - ~try_from~ ~use_extern_macros~ ~used~ - -[c11]: https://crates.io/crates/svd2rust/0.13.0 -[ch11]: https://github.com/japaric/svd2rust/blob/master/CHANGELOG.md#v0130---2018-05-12 -[p11]: https://github.com/japaric/svd2rust/pull/203 - -There's a lot of breaking changes there but the most visible one is `cortex-m-rt` because it changes -how applications are structured. Check the [`cortex-m-quickstart`][c0] template for instructions on -how to set up an embedded application using the latest versions of everything. - -There are still a lot of crates that will need to be updated to work on beta. Among the more general -purpose ones we have [`heapless`] and [`cortex-m-rtfm`], which needs to be update to work with -`cortex-m-rt` v0.5.0. - -[`heapless`]: https://crates.io/crates/heapless -[`cortex-m-rtfm`]: https://crates.io/crates/cortex-m-rtfm - -### How you can help us - -Try to compile your Cortex-M crate using the beta channel! If your crate is an application the build -will certainly fail, but check if all the dependencies, excluding the [panic handler crate][phc], -compile on beta. If any dependency doesn't compile on the beta channel let the author know, but -first check if there's a new version of the crate that already compiles on the beta channel. And if -you feel up to the task you could even send a PR to the dependency to make it compile on beta -- the -list of stabilization PRs in the previous section may give you a clue on how to move the crate to -beta. - -If you are the author of a Cortex-M device crate, a crate generated using `svd2rust`, moving it to -stable only requires regenerating it using `svd2rust` v0.13.0. Do note that the generation process -[has changed] for the Cortex-M target; also make sure you bump the minor version when you publish a -new version. - -[has changed]: https://docs.rs/svd2rust/0.13.0/svd2rust/#usage - -If you are the author of a driver crate or a HAL implementation, please update your crate to use -v0.2.0 of `embedded-hal` and test that it builds on beta. Make sure you bump the minor version when -you publish a new version of your crate -- bumping the version of the `embedded-hal` dependency is a -breaking change (drivers that depend on `embedded-hal` v0.1.0 can't be used with HAL implementation -crates that depend on `embedded-hal` v0.2.0). - -If you are porting an application to the newest `cortex-m-*` crates you may hit these errors: - -- "error: requires `start` lang_item" on binary crates. You need to switch from the standard `main` - interface to `#![no_main]` + `entry!`. Use the [examples][qse] in the quickstart template as a - reference. - -[qse]: https://docs.rs/cortex-m-quickstart/0.3.0/cortex_m_quickstart/examples/_0_minimal/index.html - -- "error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple - variants". `const fn` is not a stable feature so it's not used in the API by default. The - `cortex-m` provides a `"const-fn"` feature to opt into this unstable feature and expose `const` - functions in the API; other dependencies should / probably provide a similar feature. - -## What does this all mean for you? - -To those of you who have been doing embedded development on nightly: things will get *much easier* -from now on. We have reduced the number of unstable features in core crates of the Cortex-M -ecosystem to **zero**. Although you will have to continue to use nightly for application development -you can expect zero breakage from these crates when updating the nightly compiler. There is one -expected breakage coming soon though: `panic_fmt` will be removed as announced above. This will -break the [panic handler crates][phc]; however, the breakage will be isolated to those crates and -the fix will consist of simply updating the dependency version. - -[phc]: https://crates.io/keywords/panic-impl - -To those of you who have been meaning to dive into embedded Rust development: we'll soon be done -with our "embedded Rust on stable" tasks and we'll move our focus to documenting the embedded -development process, tooling and ecosystem. The [embedded Rust book][book] will become the resource -to get started on embedded Rust, but it doesn't quite exist right now. - -[book]: https://github.com/rust-lang-nursery/embedded-wg/blob/master/books/embedded-rust-book/README.md - -## What about architectures other than ARM Cortex-M? - -The path carved for ARM Cortex-M can be followed by the other architectures (ARM Cortex-R, AVR, -MSP430, RISCV, etc.). Each architecture presents its own extra set of challenges though: - -- MSP430 being the second oldest embedded / `no_std` target is the closest one to make it to stable - (as a tier 2 target) by the edition release. The main blocker is that `extern "msp430-interrupt"` - is not available on stable but I think that may be possible to work around using external C / - assembly files + FFI. - -- Both AVR and RISCV are blocked from being included in the Rust compiler due to either the - immaturity of the LLVM backend or LLVM backend bugs. Not many (embedded) Rust developers can also - hack LLVM backends so we are short handed on the AVR front; OTOH, the RISCV is being actively - developed by third parties so it's probably just a matter of time before we add it to rustc. - -- ARM Cortex-R LLVM backend is probably in good shape due to the similarities between its - instruction set and the ARM Cortex-M instruction set, so adding the target to the compiler should - be straightforward. However, the crate ecosystem is nonexistent at this point so there's a lot of - work to be done on that front. - ---- - -This work is part of the [embedded WG][ewg] effort towards [making embedded development possible on -the stable channel][stable]. (We are almost done! :tada:) - -[ewg]: https://github.com/rust-lang-nursery/embedded-wg -[stable]: https://github.com/rust-lang-nursery/embedded-wg diff --git a/newsletters/2018-05-15.md b/newsletters/2018-05-15.md deleted file mode 100644 index 1a5ce5ad..00000000 --- a/newsletters/2018-05-15.md +++ /dev/null @@ -1,113 +0,0 @@ -# The Embedded Working Group Newsletter - 5 - -> 2018-05-15 - -This is the fifth bi-weekly newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help! - -If you want to mention something in [the next newsletter], make sure to leave a comment on the issue. - -[the next newsletter]: https://github.com/rust-lang-nursery/embedded-wg/issues/98 -[Embedded WG]: https://github.com/rust-lang-nursery/embedded-wg - -## Highlights - -* We had a bonus Embedded-WG Newsletter this week about the [path forward] towards stable Embedded Rust, and what you can do as a crate maintainer to help with the effort! -* The Tock-OS project posted about their [MMIO Registers], contrasting them to crates generated by `svd2rust` -* There were a couple of great posts about developing with Rust on Embedded targets from [219 Design] and [nercury] -* If Game Boy Advance development with Rust sounds interesting to you, make sure you check out the [rusty-TONC] and [stdgba] projects - -[path forward]: https://users.rust-lang.org/t/cortex-m-library-development-now-possible-on-beta-and-the-path-towards-stable-embedded-rust/17420 -[MMIO Registers]: https://www.tockos.org/blog/2018/mmio-registers/ - -[219 Design]: https://www.219design.com/rust-on-the-stmicro-nucleo/ -[nercury]: https://nercury.github.io/rust/embedded/experiments/2018/04/29/rust-embedded-01-discovery-vl-flipping-bits.html - -[rusty-TONC]: https://github.com/tbelaire/rusty-TONC -[stdgba]: https://github.com/jkarns275/stdgba - -## Embedded Projects - -If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to mention it on the tracking issue for [the next newsletter], we would love to show it off! - -* [Kjetil Kjeka] shared their crate [uX] pronounced as "unsigned X" for working with non standard integer types (like `u7`, `u63`, etc) which act like the built in unsigned integer types -* [Adam Greig] shared two crates: - * [stm32-rs], a tool for cleaning up Chip Support Crates for STM32 microcontrollers and making it easier to work between multiple devices - * [blethrs], an ethernet bootloader for STM32F4 chips, using the [smoltcp] networking stack -* [James Waples] released a driver for [ssd1306] based OLED displays, read the [announcement blog] for more info -* [John Scarrott] released a Chip Support Crate for the [nRF52840] chip from Nordic Semiconductor -* [Kerem] posted a new Chip Support Crate for the Nordic Semiconductor nRF51, and joined development of the existing [nrf51-hal] HAL Impl Crate -* [Teo Röijezon] released a combo of a [stm32f0x0] Chip Support Crate, as well as a [stm32f0x0-hal] HAL Impl Crate -* [Rahul Thakoor] shipped a driver crate for [mma7660fc] based 3-axis accelerometers. Check out the [mma7660fc blog] announcement -* [whitequark] shared their [log_buffer] crate for storing UTF-8 text in a ring buffer, and accessing it as `&str`s -* [Michael] shared [proptest], a tool for performing Property Based Testing, which now has no_std support thanks to a PR from [Zack Pierce] -* [theJPster] has been working on [Monotron] - a small 8-bit style home computer with a ROM written in Rust - ready for his talk at [RustFest]. For this, he's been working on crates for [generating VGA video], [decoding PS/2 keyboard scancodes] and [interactive text-based menu systems]. - -[Kjetil Kjeka]: https://github.com/kjetilkjeka -[uX]: https://crates.io/crates/ux - -[Adam Greig]: https://github.com/adamgreig -[stm32-rs]: https://github.com/adamgreig/stm32-rs -[blethrs]: https://github.com/AirborneEngineering/blethrs -[smoltcp]: https://github.com/m-labs/smoltcp - -[James Waples]: https://github.com/jamwaffles -[ssd1306]: https://crates.io/crates/ssd1306 -[announcement blog]: https://wapl.es/electronics/rust/2018/04/30/ssd1306-driver.html - -[John Scarrott]: https://github.com/jscarrott -[nRF52840]: https://crates.io/crates/nrf52840 - -[Kerem]: https://github.com/krk -[nrf51-hal]: https://crates.io/crates/nrf51-hal - -[Teo Röijezon]: https://github.com/teozkr -[stm32f0x0]: https://crates.io/crates/stm32f0x0 -[stm32f0x0-hal]: https://crates.io/crates/stm32f0x0-hal - -[Rahul Thakoor]: https://github.com/rahul-thakoor -[mma7660fc]: https://crates.io/crates/mma7660fc -[mma7660fc blog]: https://rahul-thakoor.github.io/an-i2c-rust-driver-for-mma7660fc-based-3-axis-digital-accelerometer/ - -[whitequark]: https://github.com/whitequark -[log_buffer]: https://github.com/whitequark/rust-log_buffer - -[Michael]: https://github.com/memoryruins -[proptest]: https://github.com/AltSysrq/proptest -[Zack Pierce]: https://github.com/ZackPierce - -[theJPster]: https://github.com/thejpster -[Monotron]: https://github.com/thejpster/monotron -[RustFest]: https://paris.rustfest.eu/ -[generating VGA video]: https://github.com/thejpster/vga-framebuffer-rs -[decoding PS/2 keyboard scancodes]: https://github.com/thejpster/pc-keyboard -[interactive text-based menu systems]: https://github.com/thejpster/menu - - -### `embedded-hal` Ecosystem Crates - -As part of the [Weekly Driver Initiative], crates that are part of the `embedded-hal` ecosystem are now tracked in the [Awesome Embedded Rust] repository. Here is a current snapshot of what is available there: - -| Type | Status | Count | -| :--- | :----- | :---- | -| [Device Crates] | released | 12 | -| [HAL Impl Crates] | released | 10 | -| [Board Support Crates] | released | 6 | -| [Driver Crates Released] | released | 9 | -| [Driver Crates WIP] | WIP | 29 | - -[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust -[Weekly Driver Initiative]: https://github.com/rust-lang-nursery/embedded-wg/issues/39 -[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates -[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates -[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates -[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates -[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip - -## Help Wanted - -* Make sure to check out the [path forward] post, and report any issues you find! -* Raspberry Fields is a festival of digital making, centered around the Raspberry Pi. It's taking place on Saturday 30 June and Sunday 1 July, in Cambridge, England. [theJPster] would love to set up a Rust stall, to talk to everyone about the advantages Rust offers and how they can get in to Rust on the Raspberry Pi. But to make that work, he needs your help! If you're interested, contact [@therealjpster] on Twitter or email . -* Some members of the embedded WG will attend the [RustFest] impl days in two weeks. If you want to make Rust awesome for embedded development come help us! We have [tasks with mentors and some hardware to give away!][impl-days]. Let us know if you are interested in helping out by commenting on that issue. - -[@therealjpster]: https://twitter.com/therealjpster -[impl-days]: https://github.com/rust-lang-nursery/embedded-wg/issues/90#issuecomment-389321129 diff --git a/newsletters/2018-05-28.md b/newsletters/2018-05-28.md deleted file mode 100644 index dd213e92..00000000 --- a/newsletters/2018-05-28.md +++ /dev/null @@ -1,109 +0,0 @@ -# The Embedded Working Group Newsletter - 6 - -> 2018-07-01 - -This is the sixth newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help! - -This newsletter covers the past ~6 weeks. - -If you want to mention something in [the next newsletter], make sure to leave a comment on the issue. - -[the next newsletter]: https://github.com/rust-lang-nursery/embedded-wg/issues/103 -[Embedded WG]: https://github.com/rust-lang-nursery/embedded-wg - -## Highlights - -* [Jacob Creedon] gave an introduction talk about using Rust with embedded systems at the [Teardown Conference] in Portland, check out [Jacob's Slides] or the [Video of Jacob's Talk] -* The [Embedded WG]'s own [theJPster] talked about the [Monotron] at [RustFest Paris], you can see [JP's Slides], or check out the [Video of JP's Talk] -* [Jorge Aparicio], [Vadzim Dambrouski] and [Hanno Braun] from the embedded WG also attended RustFest Paris and the following impl days. They worked towards embedded Rust on stable, better embedded Rust tooling and better MSP430 support; gave away some hardware; and chatted with lots of people interested in embedded Rust. -* The `#[panic_implementation]` feature has [landed][panic-impl-pr] and has been proposed for stabilization ([FCP merge][panic-impl-fcp]). This feature lets you define the behavior of `panic!` in `#[no_std]` context and it's the final piece for making embedded Rust development possible on the stable channel. :tada: -* The [Discovery] book has been updated to work with the [preview of stable embedded Rust]. -* A new [`llvm-tools` rustup component] is now available on recent nightly releases. It contains LLVM tools to inspect Rust binaries regardless of their target architecture. One set of tools for ARM Cortex-M, MSP430, x86_64 and other architectures! - -[theJPster]: https://github.com/thejpster -[Monotron]: https://github.com/thejpster/monotron -[RustFest Paris]: https://paris.rustfest.eu/ -[JP's Slides]: http://railwayelectronics.blogspot.co.uk/2018/05/talking-about-monotron-at-rustfest.html -[Video of JP's Talk]: https://media.ccc.de/v/rustfest18-11-monotron_making_a_80s_style_computer_with_a_20_dev_kit - -[Jacob Creedon]: https://github.com/jcreedon -[Jacob's Slides]: http://github.jcreedon.com/static/EmbeddedWithRustSlidesTeardown2018.pdf -[Video of Jacob's Talk]: http://youtu.be/g25xsK3HKkE -[Teardown Conference]: https://www.crowdsupply.com/teardown/portland-2018 - -[Jorge Aparicio]: https://github.com/japaric -[Vadzim Dambrouski]: https://github.com/pftbest -[Hanno Braun]: https://github.com/hannobraun - -[panic-impl-pr]: https://github.com/rust-lang/rust/pull/50338 -[panic-impl-fcp]: https://github.com/rust-lang/rust/issues/44489#issuecomment-398965878 - -[Discovery]: https://github.com/japaric/discovery -[preview of stable embedded Rust]: https://users.rust-lang.org/t/cortex-m-library-development-now-possible-on-beta-and-the-path-towards-stable-embedded-rust/17420 - -[`llvm-tools` rustup component]: https://internals.rust-lang.org/t/llvm-tools-a-new-rustup-component-for-binary-inspection-objdump-nm-size-and-profiling-prota/7830 - -## Embedded Projects - -If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to mention it on the tracking issue for [the next newsletter], we would love to show it off! - -* [rudihorn] shared [light-cli], a lightweight, no_std, and heapless CLI tool -* [Paolo Teti] shared [ti-hercules-bsp], a board support package for Texas Instruments TMS570 MCUs, used by safety critical industries such as automotive and aerospace -* [Marcel Buesing] posted their driver crate for the [bme680] environmental sensor -* [Roy Smeding] is working on support for the [stm32f334] chip from STMicro -* The [Embedded WG]'s own [Jonathan Soo] announced his project, [Bobbin SDK], a set of tools to make it easier to share code between different chips from the same or different vendors -* [Eitan Mosenkis] did [a major update] of their [esp-rs] script which produces a project to compile Rust code for the ESP8266 via the [mrustc] Rust to C compiler. -* [Hanno Braun] released v0.2 of [lpc82x-hal], which includes a radical simplification of the API, allowing for stronger compile-time state guarantees. Check out the [lpc82x-hal announcement] for more info! - -[rudihorn]: https://github.com/rudihorn -[light-cli]: https://github.com/rudihorn/light-cli - -[Paolo Teti]: https://github.com/paoloteti -[ti-hercules-bsp]: https://github.com/paoloteti/ti-hercules-bsp - -[Marcel Buesing]: https://github.com/marcelbuesing -[bme680]: https://github.com/marcelbuesing/bme680 - -[Jonathan Soo]: https://github.com/jcsoo -[Bobbin SDK]: http://www.bobbin.io/blog/post/bobbin_sdk_richer_hardware/ - -[Roy Smeding]: https://github.com/roysmeding -[stm32f334]: https://github.com/roysmeding/stm32f334/ - -[Eitan Mosenkis]: https://github.com/emosenkis -[a major update]: https://users.rust-lang.org/t/rust-on-esp8266/12933/8 -[esp-rs]: https://github.com/emosenkis/esp-rs -[mrustc]: https://github.com/thepowersgang/mrustc - -[lpc82x-hal]: https://github.com/braun-robotics/rust-lpc82x-hal -[lpc82x-hal announcement]: https://users.rust-lang.org/t/lpc82x-hal-0-2-rust-on-lpc82x-microcontrollers/18144 - -### `embedded-hal` Ecosystem Crates - -As part of the [Weekly Driver Initiative], crates that are part of the `embedded-hal` ecosystem are now tracked in the [Awesome Embedded Rust] repository. Here is a current snapshot of what is available there: - -| Type | Status | Count | -| :--- | :----- | :---- | -| [Device Crates] | released | 14 | -| [HAL Impl Crates] | released | 11 | -| [Board Support Crates] | released | 6 | -| [Driver Crates Released] | released | 9 | -| [Driver Crates WIP] | WIP | 30 | - -[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust -[Weekly Driver Initiative]: https://github.com/rust-lang-nursery/embedded-wg/issues/39 -[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates -[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates -[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates -[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates -[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip - -## Help Wanted - -* We are seeking [input about the user interface] the [`cargo-binutils`] subcommands should expose. These subcommands provide access to the LLVM tools provided by the `llvm-tools` rustup component mentioned above. -* Are you using embedded Rust in production? We are [collecting commercial testimonials] about embedded Rust for the webpage the embedded WG will have on the revamped rust-lang.org website. Even if you can't give details about the product you are building we would still love to hear from you! - -[input about the user interface]: https://github.com/japaric/cargo-binutils/issues -[`cargo-binutils`]: https://github.com/japaric/cargo-binutils - -[collecting commercial testimonials]: https://github.com/rust-lang-nursery/embedded-wg/issues/108 diff --git a/newsletters/2018-07-15.md b/newsletters/2018-07-15.md deleted file mode 100644 index a5088f77..00000000 --- a/newsletters/2018-07-15.md +++ /dev/null @@ -1,76 +0,0 @@ -# The Embedded Working Group Newsletter - 7 - -> 2018-07-15 - -This is the seventh newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help! - -If you want to mention something in [the next newsletter], make sure to leave a comment on the issue. - -[the next newsletter]: https://github.com/rust-lang-nursery/embedded-wg/issues/121 -[Embedded WG]: https://github.com/rust-lang-nursery/embedded-wg - -## Highlights - -* We have launched the [Embedded WG Twitter]! We'll be publishing things like our newsletter here, so go ahead and follow to stay up to date. If you have something you're working on and want to share, feel free to @ us so we can retweet it! -* Work started on [porting] MUSL's `libm` (for math functions like `sin`, `cos`, etc.) has started, and already has [26 of 32 functions] ported! This crate will hopefully be included in the `core` of Rust, so it can be used by `no_std` targets such as embedded or wasm. -* The Atomic\*.{load,store} API is [now available] for the thumbv6m and msp430 targets. - -[Embedded WG Twitter]: https://twitter.com/rustembedded -[26 of 32 functions]: https://github.com/japaric/libm/issues?q=is%3Aopen+is%3Aissue+milestone%3Awasm -[porting]: https://github.com/japaric/libm -[now available]: https://github.com/rust-lang/rust/pull/51953 - -## Embedded Projects - -If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to mention it on the tracking issue for [the next newsletter], we would love to show it off! - -* This week we have two Multirotor Flight Controller projects starting in Rust! They are both based on the [stm32f3] family of chips from STMicro. - * [Emil Fresk] posted [on Twitter] about his project [TrustFlight], which is an open source, Rust based software library for controlling the [TrustFlight HW] he designed. - * [Josh Mcguigan] announced in his [Blog Post] that he is planning to develop a firmware package for the [BetaFPV F3], which is an off the shelf flight controller -* We also have two projects aiming to make use of Rust on the Raspberry Pi a little easier: - * [Adam Gausmann] shared his [Rustberry] project [on Reddit], which includes register maps and an I/O library for the Raspberry Pi - * [Rahul Thakoor] shared his [rust_gpiozero] crate [on Medium], which is based on the Python library of similar name. He has also started writing [a series of tutorials] for developers new to working with physical hardware. - - -[stm32f3]: https://github.com/japaric/stm32f30x-hal -[Emil Fresk]: https://github.com/korken89 -[on Twitter]: https://twitter.com/korken89/status/1016975023930830848 -[TrustFlight]: https://github.com/korken89/trustflight_firmware -[TrustFlight HW]: https://github.com/korken89/trustflight_hardware -[Josh Mcguigan]: https://github.com/JoshMcguigan -[Blog Post]: https://www.joshmcguigan.com/blog/betafpv-drone-flight-controller-hello-rust/ -[BetaFPV F3]: https://betafpv.com/products/beta75-bnf-tiny-whoop-quadcopter - -[Adam Gausmann]: https://gitlab.com/AGausmann -[Rustberry]: https://gitlab.com/AGausmann/rustberry -[on Reddit]: https://www.reddit.com/r/rust/comments/8x1ayd/calling_all_raspberry_pi_owners_rustberry_010_has/ -[Rahul Thakoor]: https://github.com/rahul-thakoor -[rust_gpiozero]: https://github.com/rahul-thakoor/rust_gpiozero -[on Medium]: https://medium.com/@rahulthakoor/physical-computing-with-rust-on-raspberry-pi-a7b6f34261a6 -[a series of tutorials]: https://rahul-thakoor.github.io/physical-computing-rust/ - -### `embedded-hal` Ecosystem Crates - -As part of the [Weekly Driver Initiative], crates that are part of the `embedded-hal` ecosystem are now tracked in the [Awesome Embedded Rust] repository. Here is a current snapshot of what is available there: - -| Type | Status | Count | Diff | -| :--- | :----- | :---- | :--- | -| [Device Crates] | released | 14 | 0 | -| [HAL Impl Crates] | released | 11 | 0 | -| [Board Support Crates] | released | 6 | 0 | -| [Driver Crates Released] | released | 9 | 0 | -| [Driver Crates WIP] | WIP | 30 | 0 | - -[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust -[Weekly Driver Initiative]: https://github.com/rust-lang-nursery/embedded-wg/issues/39 -[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates -[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates -[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates -[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates -[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip - -## Help Wanted - -* Help contribute to development of [Rust's libm] to get math functions built in to `core` for `no_std` targets! - -[Rust's libm]: https://github.com/japaric/libm diff --git a/newsletters/2018-07-29.md b/newsletters/2018-07-29.md deleted file mode 100644 index ef3faf97..00000000 --- a/newsletters/2018-07-29.md +++ /dev/null @@ -1,101 +0,0 @@ -# The Embedded Working Group Newsletter - 8 - -> 2018-07-29 - -This is the eighth newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help! - -If you want to mention something in [the next newsletter], make sure to leave a comment on the issue. - -[the next newsletter]: https://github.com/rust-lang-nursery/embedded-wg/issues/134 -[Embedded WG]: https://github.com/rust-lang-nursery/embedded-wg - -## Highlights - -* [libm], the `no_std` port of MUSL's math library led by [japaric] has finished its' first release! It can now be used by embedded (or `wasm`!) targets that need support for math functions. -* [droogmic] is working on [microrust], a port of [japaric]'s Discovery book for the BBC MicroBit, based on the Nordic nRF51 -* [Hideki Sekine] and [Vaishali Thakkar] have landed initial support for an [Embedded CI Harness] in the [`rust-lang/rust`] repo as part of the [Increasing Rust's Reach] project. This opens the door for tests that will help prevent regressions in `rustc` and `cargo` for ARM Cortex-M targets -* [CMSIS intrinsics] for ARM Cortex processors have landed in [stdsimd]. Check out the [the docs] in nightly soon for info, thanks to [Paolo Teti] and [japaric]! -* [Ashley Williams] released [cargo-generate], a CLI tool for generating Cargo projects from a template, reducing the need to manually write boilerplate code. If you write some embedded templates, [let us know]! - -†: The CMSIS intrinsics will show up in the docs after the next successful nightly build (after 2018-07-30) - -[japaric]: https://github.com/japaric -[libm]: https://github.com/japaric/libm#libm - -[droogmic]: https://github.com/droogmic -[microrust]: https://droogmic.github.io/microrust - -[Embedded CI Harness]: https://github.com/rust-lang/rust/pull/52465 -[Increasing Rust's Reach]: http://reach.rust-lang.org/ -[Hideki Sekine]: https://github.com/sekineh -[Vaishali Thakkar]: https://github.com/nerdyvaishali -[`rust-lang/rust`]: https://github.com/rust-lang/rust - -[Ashley Williams]: https://github.com/ashleygwilliams -[cargo-generate]: https://crates.io/crates/cargo-generate -[her tweet]: https://twitter.com/ag_dubs/status/1022191996293865472 -[let us know]: https://twitter.com/rustembedded - -[CMSIS intrinsics]: https://github.com/rust-lang-nursery/stdsimd/pull/518 -[stdsimd]: https://github.com/rust-lang-nursery/stdsimd -[the docs]: https://doc.rust-lang.org/nightly/core/arch/arm/index.html -[Paolo Teti]: https://github.com/paoloteti - -## Embedded Projects - -If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to mention it on the tracking issue for [the next newsletter], we would love to show it off! - -* [David McGillicuddy] has released his crate, [eight-segment], an `embedded-hal` driver for displaying digits on 8 segment displays like the HDSP H-101 -* [James Waples] announced the newest release of his [embedded-graphics] library [in a tweet]. This version fixes some small issues, as well as provides functionality to save memory -* [Mart Roosmaa] released [bolos-rs], a 3rd party Rust SDK for the Ledger Nano cryptocurrency wallet. Check out his [Medium post] for more info! -* The [cc1101] crate can now recieve radio packets! Check out [the reddit post] by [Daniel Svensson], as well as [his blog post] for more info - -[cc1101]: https://crates.io/crates/cc1101 -[the reddit post]: https://www.reddit.com/r/rust/comments/8zk03w/cc1101_crate_can_now_receive_radio_packets/ -[Daniel Svensson]: https://github.com/dsvensson -[his blog post]: https://dsvensson.github.io/posts/2018-07-13-Electrosmog-trapping-with-CC1101.html#article - -[David McGillicuddy]: https://github.com/djmcgill -[eight-segment]: https://crates.io/crates/eight-segment - -[James Waples]: https://github.com/jamwaffles -[in a tweet]: https://twitter.com/jam_waffles/status/1022837939041132545 -[embedded-graphics]: https://crates.io/crates/embedded-graphics - -[Mart Roosmaa]: https://github.com/roosmaa -[Medium post]: https://medium.com/@roosmaa/bringing-rust-to-ledger-hardware-wallet-ccf1356a7de1 -[bolos-rs]: https://github.com/roosmaa/bolos-rs - - -### `embedded-hal` Ecosystem Crates - -As part of the [Weekly Driver Initiative], crates that are part of the `embedded-hal` ecosystem are now tracked in the [Awesome Embedded Rust] repository. Here is a current snapshot of what is available there: - -| Type | Status | Count | Diff | -| :--- | :----- | :---- | :--- | -| [Device Crates] | released | 14 | 0 | -| [HAL Impl Crates] | released | 11 | 0 | -| [Board Support Crates] | released | 8 | +2 | -| [Driver Crates Released] | released | 11 | +2 | -| [Driver Crates WIP] | WIP | 35 | +5 | -| [no-std crates] | released | 12 | +12 | - -[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust -[Weekly Driver Initiative]: https://github.com/rust-lang-nursery/embedded-wg/issues/39 -[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates -[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates -[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates -[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates -[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip -[no-std crates]: https://github.com/rust-embedded/awesome-embedded-rust#no-std-crates - -## Help Wanted - -* The Embedded-WG is looking for someone to write an [RFC for ARM Intrinsics] to get them stabilized -* [Jonathan Pallant] is looking for ideas to implement for the Monotron project. Check out the [monotron blog post] for more details! -* The [libm] project is looking for help with [refactoring] in order to better support chips without hardware double-floating-point support - -[Jonathan Pallant]: https://github.com/thejpster -[RFC for ARM Intrinsics]: https://github.com/rust-lang-nursery/embedded-wg/issues/63#issuecomment-408509178 -[monotron blog post]: http://railwayelectronics.blogspot.com/2018/07/where-next-for-monotron.html -[refactoring]: https://github.com/japaric/libm/milestone/3 \ No newline at end of file diff --git a/newsletters/2018-08-12.md b/newsletters/2018-08-12.md deleted file mode 100644 index 9ab6e1c9..00000000 --- a/newsletters/2018-08-12.md +++ /dev/null @@ -1,60 +0,0 @@ -# The Embedded Working Group Newsletter - 9 - -> 2018-08-12 - -This is the ninth newsletter of the [Embedded WG] where we highlight new progress, celebrate cool projects, thank the community, and advertise projects that need help! - -If you want to mention something in [the next newsletter], make sure to leave a comment on the issue. - -[the next newsletter]: https://github.com/rust-embedded/wg/issues/164 -[Embedded WG]: https://github.com/rust-embedded/wg - -## Highlights - -* The Embedded Working Group has moved! You can find our new coordination repo at [rust-embedded/wg] on GitHub, and crates maintained by the working group in the [rust-embedded] organization -* The Embedded Working Group has grown! We are now 18 people grouped in the following 6 teams to allow for better focus on these topics: - * The **Cortex-M** team develops and maintains the core of the Cortex-M crate ecosystem - * The **HAL team** develops and maintains crates that ease the development of Hardware Abstraction Layers, Board Support Crates and drivers - * The **MS430 team** develops and maintains the core of the MSP430 crate ecosystem - * The **RISCV team** develops and maintains the core of the RISCV crate ecosystem - * The **Resources team** develops, maintains and curates resources on embedded Rust - * The **Tools team** maintains and develops core embedded tools - -[rust-embedded/wg]: https://github.com/rust-embedded/wg -[rust-embedded]: https://github.com/rust-embedded - -## Embedded Projects - -If you have an embedded project or blog post you would like to have featured in the Embedded WG Newsletter, make sure to mention it on the tracking issue for [the next newsletter], we would love to show it off! - -* [rust-lang/rust#52787] has landed, adding support in `nightly` for the RISC-V architecture as a bare-metal target! - -[rust-lang/rust#52787]: https://github.com/rust-lang/rust/pull/52787 - -### `embedded-hal` Ecosystem Crates - -As part of the [Weekly Driver Initiative], crates that are part of the `embedded-hal` ecosystem are now tracked in the [Awesome Embedded Rust] repository. Here is a current snapshot of what is available there: - -| Type | Status | Count | Diff | -| :--- | :----- | :---- | :--- | -| [Device Crates] | released | 14 | 0 | -| [HAL Impl Crates] | released | 11 | 0 | -| [Board Support Crates] | released | 9 | +1 | -| [Driver Crates Released] | released | 11 | 0 | -| [Driver Crates WIP] | WIP | 38 | +3 | -| [no-std crates] | released | 12 | 0 | - -[Awesome Embedded Rust]: https://github.com/rust-embedded/awesome-embedded-rust -[Weekly Driver Initiative]: https://github.com/rust-lang-nursery/embedded-wg/issues/39 -[Device Crates]: https://github.com/rust-embedded/awesome-embedded-rust#device-crates -[HAL Impl Crates]: https://github.com/rust-embedded/awesome-embedded-rust#hal-implementation-crates -[Board Support Crates]: https://github.com/rust-embedded/awesome-embedded-rust#board-support-crates -[Driver Crates Released]: https://github.com/rust-embedded/awesome-embedded-rust#driver-crates -[Driver Crates WIP]: https://github.com/rust-embedded/awesome-embedded-rust#wip -[no-std crates]: https://github.com/rust-embedded/awesome-embedded-rust#no-std-crates - -## Help Wanted - -* We're considering changing to LLD as the default linker for `thumb` targets. Check out the RFC at [rust-embedded/wg#160], and let us know what you think - -[rust-embedded/wg#160]: https://github.com/rust-embedded/wg/issues/160 diff --git a/newsletters/2018-08-2x-psa-cortex-m-breakage.md b/newsletters/2018-08-2x-psa-cortex-m-breakage.md deleted file mode 100644 index e5e27ce7..00000000 --- a/newsletters/2018-08-2x-psa-cortex-m-breakage.md +++ /dev/null @@ -1,146 +0,0 @@ -> PSA: building binaries and cdylibs for the ARM Cortex-M architecture will break with today's nightly - -The default linker for the 4 ARM Cortex-M targets listed below has changed from -`arm-none-eabi-gcc` to `rust-lld` in the latest nightly. - -- `thumbv6m-none-eabi` -- `thumbv7m-none-eabi` -- `thumbv7em-none-eabi` -- `thumbv7em-none-eabihf` - -This will break the builds of *binaries* and *cdylibs* that were using the -old default linker (`arm-none-eabi-gcc`) *and* additionally pass extra flags to -the linker using any of these rustc flags: `-C link-arg`, `-C link-args`, `-Z -pre-link-arg` or `-Z pre-link-args`. Building libraries (`rlib`s and -`staticlib`s) is not affected by this change. - -This change won't affect stable users when it reaches the 1.30 release because, -as of 1.28, it's not possible to build binaries or cdylibs for those targets on -the stable channel. Building libraries for those targets is possible on stable -but it's not affected by this change. - -### Rationale - -This breaking change was intentional. - -We, the [embedded WG], wanted to reduce the number of external tools required to -build embedded programs for the ARM Cortex-M architecture. By switching the -default linker to the LLD linker that's shipped with the Rust toolchain the user -no longer needs to install an ARM linker (like `arm-none-eabi-gcc` or -`arm-none-eabi-ld`) to build Rust programs. - -[embedded WG]: https://github.com/rust-embedded/wg - -Before landing this change we first [consulted] with the community if they -thought this breaking change was worth it. We received over 20 positive responses -representing the Cortex-M team (part of the embedded WG), the Tock OS project, -the embed-rs organization and independent developers. - -The consensus was that it was worth to make the default configuration more self -contained and that if we were to make the change it had to be made before it -became possible to build binaries on stable otherwise it wouldn't be possible -to make this change without breaking stable builds. - -[consulted]: https://github.com/rust-embedded/wg/issues/160 - -### How to fix your build - -If you are affected by this change you'll observe a linker error with a message -similar to one shown below: - -``` console -$ # these are the custom linker flags of the project -$ cat .cargo/config -``` - -``` toml -[target.thumbv7m-none-eabi] -runner = 'arm-none-eabi-gdb' -rustflags = [ - "-C", "link-arg=-Wl,-Tlink.x", - "-C", "link-arg=-nostartfiles", -] - -[build] -target = "thumbv7m-none-eabi" -``` - -``` -$ cargo build -error: linking with `rust-lld` failed: exit code: 1 - | - = note: "rust-lld" "-flavor" "gnu" (..) - = note: rust-lld: error: unknown argument: -Wl,-Tlink.x - rust-lld: error: unknown argument: -nostartfiles -``` - -There are two ways to fix the problem. - -#### Option A: switch back to GCC - -The easiest way is to switch back to using `arm-none-eabi-gcc` as the linker. To -do so pass the flag `-C linker=arm-none-eabi-gcc` to rustc. In the above example -you can do that in the `.cargo/config` file. - -``` console -$ # these are the custom linker flags of the project -$ cat .cargo/config -``` - -``` toml -[target.thumbv7m-none-eabi] -runner = 'arm-none-eabi-gdb' -rustflags = [ - "-C", "linker=arm-none-eabi-gcc", # ADDED - "-C", "link-arg=-Wl,-Tlink.x", - "-C", "link-arg=-nostartfiles", -] - -[build] -target = "thumbv7m-none-eabi" -``` - -``` -$ cargo build && echo It works now -It works now -``` - -#### Option B: tweak the additional linker arguments - -The other option is to tweak the additional linker arguments so they'll be -accepted by LLD. In the above example the `-nostartfiles` flag can be dropped -because that's the default behavior of LLD, and the flags prefixed by `-Wl,` -will have to lose their prefix. - -``` console -$ # these are the custom linker flags of the project -$ cat .cargo/config -``` - -``` toml -[target.thumbv7m-none-eabi] -runner = 'arm-none-eabi-gdb' -rustflags = [ - "-C", "link-arg=-Tlink.x", # CHANGED -# "-C", "link-arg=-nostartfiles", # REMOVED -] - -[build] -target = "thumbv7m-none-eabi" -``` - -``` console -$ cargo build && echo It works now -It works now -``` - -With this approach your build will no longer depend on an external linker. - -#### Should I prefer option A or B? - -If you are linking to a system installed C library like `newlib-arm-none-eabi` -then you should continue to use GCC. The default library search path of -`arm-none-eabi-gcc` includes the path to those libraries. - -If you are not linking to any C code then you should prefer LLD then you won't -need to install the `arm-none-eabi` toolchain.