|
| Adding New AlgorithmsThe µVision environment allows you to define additional Flash programming algorithms for new or unsupported devices. Algorithms are implemented as a µVision project with functions to erase and program the Flash device. Additional special compiler and linker settings are required. Configuring New AlgorithmsFollow these steps to configure a new Flash Programming Algorithm. - Create a new, empty sub-folder in the \KEIL\ARM\FLASH\ folder.
- Copy the contents of an existing Flash algorithm (for example \KEIL\ARM\FLASH\LPC_IAP_256\ to this new folder. You will use this project as a template for new device.
- Rename the project file LPC_IAP_256.UV2 to represent the new Flash ROM device name. For example, 29F400.UV2. Then, open this new project with the µVision IDE.
- In the Project — Options for Target — Output dialog, replace all output names (i.e. LPC_IAP_256) with the new device name.
- Edit the FLASHPRG.C file and create the necessary algorithm code for the EraseChip, EraseBlock, and ProgramBlock functions. You may modify the Init and UnInit functions with whatever initialization and de-initialization code is required for the algorithm.
- Define the device parameters in the FlashDevice struct in the FLASHDEV.C file.
- Build the new Flash programming algorithm. The output file with the *.FLX extension contains the new programming algorithm. It is automatically copied to the appropriate folder by the project.
- In µVision, you may now use the Add button in the Configure Flash Download dialog to add this device (algorithm) to the µVision project.
Testing New AlgorithmsThe \KEIL\ARM\FLASH\LPC_IAP_256\TEST\ folder contains a project that allows you to test a new Flash Programming Algorithm. |
|