Keil Logo

Adding New Algorithms

The µ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 Algorithms

Follow these steps to configure a new Flash Programming Algorithm.

  1. Create a new, empty sub-folder in the \KEIL\ARM\FLASH\ folder.
  2. 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.
  3. 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.
  4. In the Project — Options for Target — Output dialog, replace all output names (i.e. LPC_IAP_256) with the new device name.
  5. 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.
  6. Define the device parameters in the FlashDevice struct in the FLASHDEV.C file.
  7. 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.
  8. 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 Algorithms

The \KEIL\ARM\FLASH\LPC_IAP_256\TEST\ folder contains a project that allows you to test a new Flash Programming Algorithm.

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.