定义编程算法 keil --------转载

KEIL下自定义编程flash算法

williamwanglei

于 2012-11-22 11:57:25 发布

6671
收藏 1
版权
对keil里没有的 FLASH,还可以自定义编程算法。方法也放到这里吧
Define FLASH Algorithms
The & MICRO;Vision environment allows you to define additional FLASH 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 FLASH PROGRAMMING 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 new DEVICE algorithms.
Re NAME the project file LPC_IAP_256.UV2 to represent the new FLASH ROM DEVICE NAME, for example: 29F400.UV2 and open this new project with the & MICRO;Vision IDE.
In the DIALOG Project - Options for Target - OUTPUT replace all OUTPUT 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 FLASH PROGRAMMING algorithm. The OUTPUT file with the extension *.FLX contains the new PROGRAMMING algorithm. Use the Add button in the Configure FLASH Download DIALOG to add this PROGRAMMING algorithm file to the & MICRO;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 to TEST 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 own FLASH PROGRAMMING algorithms with the GNU toolchain. However, you may use the existing FLASH PROGRAMMING algorithms.
————————————————
版权声明:本文为CSDN博主「williamwanglei」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/williamwanglei/article/details/8211614

posted @ 2022-03-04 14:56  xiaoheikkkk  阅读(115)  评论(0编辑  收藏  举报