Programming flash in factory using Codewarrior TAP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programming flash in factory using Codewarrior TAP

1,426 Views
angelotrivelli
Contributor I

I would like to use the Codewarrior TAP to program flash on boards in a manufacturing environment. 

My target is a P4080 CPU w/Flash memory. I am currently using an Abatron BDI-3000 for this, but that device is now EOL and I will eventually need to find another way to program the flash. It looks like the Codewarrior TAP can do it, but I can't find any solid clues for how to do this. 

I suspect it can be done because some engineering folks in my org have used the "Codewarrior IDE" to program flash. However, I would very much like to avoid using the IDE in a factory. I know that I can telnet to the TAP, but there doesn't seem to be any analogous CLI commands to what I used on the BDI-3000.

My tasks are very simple...

  1. Erase some memory range. BDI command was "erase 0xeff80000 0x20000 4"
  2. Program a binary from a tftp server. BDI command was "prog 0xeff80000 /path/in/tftp/server/MyBinary.bin bin"
  3. Verify the binary was programmed correctly. BDI command was "verify 0xeff80000 /path/in/tftp/server/MyBinary.bin bin"

The problem is I don't see the equivalent of any program, erase, or verify commands in the Codewarrior TAP manual. Moreover, there doesn't seem to be a way to specify a TFTP server which contains binaries to write to the target.

Can anyone help me get started with this? I just need to get pointed in the right direction.

Many Thanks!

3 Replies

771 Views
sinanakman
Senior Contributor III

Hi Angelo

One solution that comes to my mind is to connect to CW TAP 

from a command line gdb client (no gui) and load a customized

u-boot to run on RAM and program your flash on the board. This

would require some careful engineering work but should be doable.

 

There is also some other probes to replace BDI3000 which has

a similar telnet interface. If you are interested in those send me

an e-mail and I will provide you some info.

Hope this helps

Regards

Sinan akman

771 Views
angelotrivelli
Contributor I

Thanks Sinan, 

One of the things I am loading into flash with the old BDI is actually a UBoot image (along with the RCW and fman). This is just enough to make it possible to boot into the uboot CLI and load the larger images such as the OS kernel from a tftp server and into flash.

I happen to have plenty of RAM. Are you saying I could use the TAP+gdb to load UBoot/RCW/fman into RAM and proceed from there? What do you mean by "customized" UBoot? Could I just use my existing UBoot image that normally goes to flash?

Unfortunately, the gdb documentation is extremely dense and its not at all clear how to proceed. Do you or anyone know of some basic examples/tutorials of how to perform this task using gdb + Codewarrior TAP. 

0 Kudos

771 Views
sinanakman
Senior Contributor III

Hi Angelo

If there will be no RCW in the flash before you are programming you would

also have to provide an RCW via your JTAG. Your BDI config file probably

already included this.

I mentioned a customized u-boot because if you are loading a u-boot image

to RAM you will have to initialize your DDR controller and set an address space

before accessing the memory to load the image. You will have to do this as

part of the initialization via your JTAG probe. Normally u-boot does all those

initializations and expects a virgin system so in your case it has to be modified

to work on a system where the memory and address is space has initial set up.

As far as the gdb is concerned  all what you need is the commands to load an

image to memory and the monitor commands to modify registers via your probe

for setting up the DDR controller and the address space. As mentioned all these

will require some engineering work and good understanding of your SoC.

Let me know if you have further questions.

Regards

Sinan Akman