avr-hal-template icon indicating copy to clipboard operation
avr-hal-template copied to clipboard

Optionally generate boilerplate for UART console

Open Rahix opened this issue 2 years ago • 2 comments
trafficstars

I'm very unsure where we should go this route, but I want to at least raise the possibility.

This PR adds a new prompt during project generation which asks the user whether they want additional boilerplate for a UART console in their project. This can of course be extended for other devices like I2C, SPI, panic handlers, etc.

One one hand, it would make starting a new project a bit faster. On the other, it means additional effort to keep the template up-to-date and has the chance of people just enabling everything "because maybe I'll need it" and then leaving the code sitting in their project unused. Not sure if we want to enable that...

In any case, I think this PR needs to wait until https://github.com/cargo-generate/cargo-generate/issues/885 is resolved.

Rahix avatar May 03 '23 12:05 Rahix

On the one hand I agree that putting in too much lines of code is not neat, but on the other hand I think that it'd instantly solve issues like mine because it's a tested template?

I.e: https://github.com/Rahix/avr-hal/discussions/530

brainstorm avatar Apr 01 '24 05:04 brainstorm

For instance, I'm confused with the Usart+ufmt behavior on my Atmega2560, see this output in the commit message: brainstorm/embassy-as5600@a37b9b5

Please ask about this in the Discussions of avr-hal, then we can take a closer look.

Rahix avatar Apr 01 '24 06:04 Rahix