Adding a new Flash Device to Codewarrior 10.x

Document created by Paul Genua Employee on May 10, 2013Last modified by Paul Genua Employee on May 11, 2013
Version 1Show Document
  • View in full screen mode

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:

  • Device Name
  • Manufacturer ID code
  • Device ID code
  • Number of sectors
  • Starting and ending address for each sector
  • If the chip can be erased
  • Options for data width
  • Number of flash devices
  • Algorithm (need to pick from one of the existing algorithms)

 

 

As an example, I am going to show how to add a Micron / Numonyx PC28F00AP30BF flash device. According to the datasheet:

  •     Manufacturer ID = 0x89
  •      Sector Map shows 4 sectors of 16K words followed by 1023 sectors of 64K-words   
  •      ChipErase = yes
  •      Algorithm looks like an intel based algorithm, which we can tell from table 7 of the Flash datasheet (I compare the method needed to program or erase a sector to one of the flash parts with an existing XML file)

 

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.

flash_device.JPG

Outcomes