HI Kamil, While you're welcome to use DMA, it's not required for an initial port of a board. Often DMA is a later addition once the proof of concept works and a more-performant system is desired. Using interrupts for the UART would be totally fine. Thanks, Branden Ghena Northwestern University On Mon, Nov 10, 2025 at 6:06 AM Kamil Duljas via Devel < devel@lists.tockos.org> wrote:
Hi, regarding the port to the STM32L476RG — work in progress :) I’m wondering about UART transmission. I noticed that some boards (e.g. Nucleo, Discovery) use interrupts, while others use DMA as well. Should I use UART with DMA, or is DMA optional at this stage?
Kamil
pon., 3 lis 2025 o 16:10 Leon Schuermann <leon@is.currently.online> napisał(a):
I'm excited seeing the progress made on this port!
Kamil Duljas via Devel <devel@lists.tockos.org> writes:
I noticed that GPIO code for F3 F4 and L4 is 80-90% the same. maybe we could extract it as a common part like stm32x ? I guess it could be done for many pheripherials.
Yes! In general, avoiding such code duplication is desirable, and there should be plenty of existing examples in the `chips/` folder, like `nrf5x` or `stmf4xx`.
However, Tock has some particular (and somewhat implicit) conventions when it comes to code-sharing for multiple targets. For instance, we generally discourage conditional compilation by means of Cargo features (`#[cfg(...)]`) in our code, as that makes code harder to test.
For a new target, I think it could be good to first get a chip and board crate merged (which perhaps duplicates some code that is not completely identical and thus trivially sharable between chips), and then split out that common infrastructure in a follow-up PR. This way you won't risk de-railing the PR to add the board over discussions on how to organize that shared infrastructure.
-Leon
-- Pozdrawiam, Kamil Duljas