KEIL下自定义编程flash算法

来源:互联网 发布:淘宝店铺三个月 编辑:程序博客网 时间:2024/06/06 08:40
对keil里没有的FLASH,还可以自定义编程算法。方法也放到这里吧
Define FLASH Algorithms
The ΜVision environment allows you to define additionalFLASH PROGRAMMING algorithms. For example an algorithm for an off-chip FLASH ROM that is connected via the BUS of the XC16x DEVICE.

Define a New FLASHPROGRAMMING Algorithm
You should perform the following steps to configure a new FLASH PROGRAMMING Algorithm:

Create a new empty sub-folder in ..\ARM\FLASH.
Copy the content of an existing FLASH algorithm (for example ..\ARM\FLASH\LPC_IAP_256) to this new folder as a template for newDEVICE algorithms.
ReNAME the project file LPC_IAP_256.UV2 to represent the newFLASH ROM DEVICE NAME, for example: 29F400.UV2 and open this new project with the ΜVision IDE.
In the DIALOG Project - Options for Target -OUTPUT replace allOUTPUT NAMEs (i.e. LPC_IAP_256) to the new DEVICE NAME.
Edit the file FLASHPrg.C and define the function code for EraseChip, EraseBlock and ProgramBlock. The Init and UnInit function allows you to write initializations and de-initialization code required for the algorithm.
Define the DEVICE parameters in the struct FLASHDevice in the file FLASHDev.C.
Build the new FLASHPROGRAMMING algorithm. TheOUTPUT file with the extension *.FLX contains the newPROGRAMMING algorithm. Use the Add button in the ConfigureFLASH DownloadDIALOG to add thisPROGRAMMING algorithm file to the ΜVision project of the target application.
TEST a New FLASH PROGRAMMING Algorithm
The folder ..\ARM\FLASH\LPC_IAP_256\TEST contains a project that allows you toTEST a new FLASH PROGRAMMING Algorithm.

Note

At this point in time, the generation of new FLASH PROGRAMMING algorithms requires the ARM ADS development tools. It is not possible to generate ownFLASH PROGRAMMING algorithms with the GNU toolchain. However, you may use the existingFLASH PROGRAMMING algorithms.
原创粉丝点击