stm32-data icon indicating copy to clipboard operation
stm32-data copied to clipboard

Generating memory.x without embassy-stm32

Open peku33 opened this issue 9 months ago • 0 comments

Hi,

In my project I would like to use stm32_metapac directly, as my chip isn't supported by other stm32 pac crates (STM32C0 family). For now I'm not using async, so I don't need whole embassy project included. I really like stm32_metapac layout and I have good feelings about it.

I really like the idea of metadata exporting, so I came out with an idea that memory.x could be easily generated automatically. I started searching through the project and I found that it is done by child crate - embassy-stm32. I started digging and I've found that this was done here before: https://github.com/embassy-rs/stm32-data/commit/fad4bc0f2baac29ecebb5153d2997b649b71025f

Maybe there is a chance to have that functionality restored into stm32_metapac? This crate is the place where pac meets the cortex-m and cortex-m-rt (which consumes the file) so from my understanding the producer and the consumer should be as close as possible. This probably don't change much for embassy-stm32 users, the feature could simply be forwarded here.

I hope you can suggest me a way to go or maybe rethink the idea of memory.x generation here.

Thanks for awesome work with stm32-metapac! 🏆

peku33 avatar Mar 24 '25 22:03 peku33