 | OCDS User's Guide |  |
|
|
| Programming AlgorithmsThe µ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 AlgorithmYou should perform the following steps to configure a new Flash Programming Algorithm: - Create a new empty sub-folder in Keil\C166\Flash.
- Copy the content of the sub-folder Keil\C166\Flash\Device to this new folder. This project is a template for new device algorithms.
- Rename the project file DEVICE.UV2 to represent the new Flash ROM device name, for example: 29F400.UV2 and open this new project with the µVision IDE.
- Set the device family (C167/ST10 compatible or XC16x/Super10 compatible) for the new programming algorithm as current target with Project — Targets, Groups, Files....
- Edit the file FlashDev.C and define the function code for 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 as explained at the end of the file FlashDev.C.
- Build the new Flash programming algorithm. The output file with the extension *.FLS (for C167/ST10 compatible devices) or *.FLX (for XC16x/Super10 compatible devices) contains the new programming algorithm. Use the Add button in the Configure Flash Download dialog to add this programming algorithm file to the µVision project of the target application.
|
|