embassy-rs / embassy

Modern embedded framework, using Rust and async.
https://embassy.dev
Apache License 2.0
4.84k stars 653 forks source link

Examples should have a "different chip" checklist #3076

Open jamesmunns opened 3 weeks ago

jamesmunns commented 3 weeks ago

It would be good to have a checklist in the source file of every example, to ensure people trying to use examples for different chips/boards know what they need to do. This is a VERY common question in chat, which means likely even more people who never show up in chat have the same issue.

I think having this in-code would be very helpful (from the stm32f4 blinky example):

// This example is written for the stm32f429-nucleo, with a stm32f429zi chip.
//
// If you are using a different board or chip, make sure you update the following:
//
// * [ ] Update .cargo/config.toml with the correct `probe-rs run --chip STM32F429ZITx` chip name
// * [ ] Update Cargo.toml to have the correct `embassy-stm32` feature, it is currently `stm32f429zi`
// * [ ] If your board has a special clock or power configuration, make sure that it is set up
//       appropriately. If you are unsure, please drop by the Embassy Matrix chat for support.
let p = embassy_stm32::init(Default::default());
info!("Hello World!");

This is a bit tedious to write out, but I think it will be helpful to reduce the amount of frustration from new users.

jamesmunns commented 3 weeks ago

If we do want to do this, here's a tracking list of all example kinds that need this: