This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Flash Plug-in Usage

I am new to the Flash Plug in feature. I have found that in the .\Keil\ARM\Flash, there are a lot ".FLM" and ".FLX" files. It turns out they are flash plugins. I would like to use the tool to write my SPI Flash which connects to the SPI1 of a STM32F105 CPU. By the way, what is the differences between the ".FLM" and ".FLX"? I have noticed they are all renamed ELF files.

I modified the official STM32F10x_M25P64 project to suit my hardware. The "STM32F10X_W25Q32.FLM" has been successfully generated and copied into the Flash folder.

Question 1: I have noticed that the external Flash could be assigned an address. In my case, the 4M external Flash occupies the space from 0xc000000. Then how to store content in this space? I figure it only could save resource, since the STM32F10x CPU could not execute code from SPI Flash. Am I right?

Question 2:If I just want to save a ".hex" file(with address in it) or a ".bin" file(without address) into this region, how to do it?

Maybe there already exists well document to these questions. If someone could give me a hint, it would be very helpful.

Parents
  • The SPI FLASH won't have an address directly accessible by the STM32, but you can specify a virtual range in which it lives, and have your flashing code understand that range/region associates with the SPI FLASH's internal address space. You use the scatter file to define and direct resources into this virtual space as the linker creates the output .ELF(AXF) and .HEX

    You'll want to make sure you access this content indirectly.

    You could also create data for this region outside the linker, for example a tool you create for generating resource or file system images that can be downloaded into the SPI memory.

    The plug-in needs RAM to be loaded into, and RAM space for the data it is being asked to deliver to FLASH. If your RAM needs are higher, you can adjust the settings, often parts within the family have less RAM, so generally it's better to go with, and code for, the most conservative numbers.

Reply
  • The SPI FLASH won't have an address directly accessible by the STM32, but you can specify a virtual range in which it lives, and have your flashing code understand that range/region associates with the SPI FLASH's internal address space. You use the scatter file to define and direct resources into this virtual space as the linker creates the output .ELF(AXF) and .HEX

    You'll want to make sure you access this content indirectly.

    You could also create data for this region outside the linker, for example a tool you create for generating resource or file system images that can be downloaded into the SPI memory.

    The plug-in needs RAM to be loaded into, and RAM space for the data it is being asked to deliver to FLASH. If your RAM needs are higher, you can adjust the settings, often parts within the family have less RAM, so generally it's better to go with, and code for, the most conservative numbers.

Children