Codewarior 10.x includes a pretty flexible flash programmer. Included with the standard install of the tool is a long list of common flash devices. However, if you're creating a new custom board, with a very new technology flash device it may be necessary to add a new device to the Codewarrior flash programmer.
Documentation on exactly how to do this exists in the CW install at:
..\CW PA v10.x\PA\PA_Tools\FlashToolKit\Documentation
I've attached it for your convenience.
Adding a flash device involves modifying a few XML configuration files within the CW install tree. There are really only a few different algorithms used for flash, so as long as the new device uses one of the existing ones (i.e. Intel or AMD) it's very straightforward, and the new XML file will be used just to describe the Manufacturer ID code and sector map.
Flash configuration files are located in:
..\CW PA v10.x\PA\bin\plugins\support\Products\ProductData\FPDevices.mwpdb\FP
In this directory we see a list of currently supported flash devices (one XML file per device)
In order to add a new device we need the following information from the device datasheet:
As an example, I am going to show how to add a Micron / Numonyx PC28F00AP30BF flash device. According to the datasheet:
I create a new file named:
..\CW PA v10.x\PA\bin\plugins\support\Products\ProductData\FPDevices.mwpdb\FP\PC28F00AP30BF.xml
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<device-file>
<device>
<version>0.1</version>
<content>
<name>PC28F00AP30BF</name>
<manufacturerid>0x89</manufacturerid>
<chiperase>TRUE</chiperase>
<sectors>
<sectorcount>4</sectorcount>
<sectorsize>0x8000</sectorsize>
<sectorcount>1023</sectorcount>
<sectorsize>0x20000</sectorsize>
</sectors>
<comment>
#######################################################################
</comment>
<organization>
<name>64Mx16x1</name>
<id>0x8963</id>
<algorithm>intel16x1j3.elf</algorithm>
<utility>FlashUtility.elf</utility>
</organization>
</content>
</device>
</device-file>
I then need to tell CW about the new file, so I modify the product manifest:
..\CW PA v10.x\PA\bin\plugins\support\Products\ProductData\FPDevices.mwpdb\product-manifest.xml
And add the following section at the end:
<file>
<name>PC28F00AP30BF</name>
<version>0.1</version>
<path>FP/PC28F00AP30BF.xml</path>
</file>
After saving the files, I open Codewarrior and within the flash programmer, I can now see that my new flash has been added.