codewarrior10.x 增加 新的flash型号 方法

 

最近在项目开发过程中遇到需要通过codewarrior10.x烧写bootrom的情况,下载了codewarrior10.5,由于项目板卡携带的flash是codewarrior库里没有的,需要重新编辑。。。

下面是NXP搜到的方法,希望对各位有帮助。

有不懂的可以私信我

 

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.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值