LIBMEM QSPI Loader
I'm writing a libmem loader to a custom board with STM32H750 and QUADSPI. I just create a dummy driver, all functions just returning LIBMEM_STATUS_SUCCESS.
The problem is that main is never called. I change one GPIO to indicate that, but never changed. How libmem driver download works? After download (to AXISRAM), board is reset? Or Compiler jumps to "_start" address?
-
After downloading the flash loader it should start automatically.
Did you use the loader from the STM32 CPU Support Package as base for your loader?
You can also compare the code of my loader for Intel SoC here: https://github.com/Masmiseim36/IntelSoc/blob/master/targets/IntelSoC/init/loader.cpp. It is a completely different architecture, but the basics of how a loader is working should be the same.
-
„Yes, I use the same project. But I cant compile original loader in STM32 package.”
Why can’t you compile it, which error do you get?
I get a warning on each project (@Rowley, could you take a look), but otherwise it seems to be okay.
I Used the STM32 CPU Support Package in Version 3.40 (2022-09-15) and Crossworks 4.9.1
“I think it's not a problem with LIBMEM API use, because loader code do not run (main is not called).”
probably true, could you paste the target-log. when trying to use your loader. -
I solve the 'main' problem. I compile in another PC and start to working.
Now I can initialize and register QSPI driver.
I'm downloading code for RAM (0x30000000 address) and data for QSPI (0x90000000). My loader need to handle both regions or I can register only a 0x90000000 (QSPI) handler?
I'm not sure of what to put in project properties "Applicable loaders" and "Default loader". If I put "RAM", my erase/write functions are never called. When I put "Flash", they are called, but not work. I can download only one segment (3xxx or 9xxx).
-
Happy new year.
You can register multiple drivers for various memory regions in one loader application.
One could be for the integrated flash, another one for the external QSPI-Flash and a third one for the RAM area. Each one has its own read/write/erase/… functionality.
The drivers are identified by the libmem library based on the associated memory area
Please sign in to leave a comment.
Comments
8 comments