We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
Thank you, Westonsupermare Pier.
I finally solved the problem via this approach:
1. I write a PC program to convert the binary resource into ".c" source file. The binary data is organized as C-Array. 2. I create a uVision project and add the aforesaid ".c" file as the sole source. 3. I modified the generated scatter file, removing the execution relevant directives. Then a resource only ".axf" has been generated. 4. Because I have absolutely assigned the address in the ".c" file, it now could be downloaded into the external SPI flash via my modified ".FLM" algorithm.
It seems a quick and dirty solution. If anyone has better solutions please kindly post here.