stm32-rs / stm32h7xx-hal

Peripheral access API for STM32H7 series microcontrollers
BSD Zero Clause License
224 stars 102 forks source link

Add more description for examples #212

Open ost-ing opened 3 years ago

ost-ing commented 3 years ago

I think it would be useful for people attempting to get various examples working to have description of the board that the example was originally written for at the top of the example.

In my case, I'm attempting to get SDMMC working and so I'm copying the example but it doesn't work for me. Knowing what board the example was originally written for can give clarity for people.

@richardeoin which board was the sdmmc example written for?

Thanks

richardeoin commented 3 years ago

I'd definitely support anything to make the examples more accessible! And adding board descriptions would be a nice improvement, although I think some examples can still be valuable without necessarily applying to a specific dev board. For the sdmmc example, I think it was written for a STM32H747I-DISCO

robamu commented 3 years ago

I think its a general problem that these examples are board specific in many cases. Also, its tricky to get started without any of the additional helper files like openocd files which make the workflow similar to what is taught in the embedded rust book. Making the examples board specific helps a lot, but would require a different folder structure.

Maybe it would also be useful so specify how to use the examples the way it was done here or here . This includes writing down all depencies. I just copied the utilities folder and the blinky.rs script into my example project which is set up for convenient cargo run flashing but I still get dependencies error.

UPDATE: Getting the blinky to work this way was more complicated than expected. I had to add some depencies, features and other custom code to get the ITM logger to work for my specific STM32H743ZI Nucleo board

robamu commented 3 years ago

See #272 for an improvement suggestion for the README