Trying to write an ST-Link QPSI driver for serial NOR device
Does anyone have a decent recipe for creating the ST-Link compatible driver for an SPI NOR device? Using the examples in STM32 ST-Link utility I have been able to create and debug the needed routines to intialize, erase, write, and read my flash in a stand-alone environment created by CubeMX. It has a main() that I just used to call and debug the SPI routines. I am really struggling with how to create the driver that will work with the ST-Link utility. My MCU is an STM32H7 device and the closest example code was for an F7 device. The very limited instructions say to just plunk their example code into the Projects director of your target device, and compile!
The practice, especially with changing MCU cores is yielding layes and layers of errors that involve somewhat blindly copying over driver/include/startup files from other H7-based projects. I'm sure I could work through eventually, but seems much harder and error prone than it should be. Does anyone have a recipe for how to create these drivers with more detail than the one line "it is easy to port to other MCUs" instructions that come with the example drivers? I can't find anything in official ST documentation with any more detail, and it seems strange I can't find anything with searches here.
My preferred toolchain is Atollic (or CubeIDE), but I also have IAR available too.
Thanks in advance.
will
