I would like to write FMC SDRAM initialisation sequence so that I can put a frame buffer into SDRAM. I need a buffer that can fit pixels for 480x272 RGB888, so 382KB in length. MCU has only 320K of internal RAM, but there's an external SDRAM with 8MB of addressable memory that currently just sits there doing nothing.
There is an STM32CubeIDE example with C implementation and I'm wondering is translating C code line-by-line, function-by-function a good approach ?
Eventually managed to do it. Here's the project on GitHub.
I used SVD2Swift tool to generate register descriptions and vaguely translated C code for FMC and SDRAM initialisation from STM32CubeIDE examples into Swift.
Result is that now much larger ARGB8888 screen buffer can be placed into SDRAM.
Really appreciate updates to sourcekit-lsp that happened since original post
I build using SPM and as a result have really convenient code completions in VS Code