Codewarrior - MPC8347 - S29AL032D flash driver.

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

Codewarrior - MPC8347 - S29AL032D flash driver.

1,802 Views
martonmiklos
Contributor I

Hello all,

 

First of all here is my configuration:

 

Codewarrior IDE 5.9.0 Build 2489 running on Linux (Ubuntu) installed to /opt/Freescale/CodeWarrior-EPPC-8.8/

Codewarrior USB Tap

MPC8347 based custom board equipped with Spansion S29AL032D-04

 

I have written the device XML as it was described in the Adding Flash Devices to the
EPPC Flash Programmer Appnote.

 

 

After it the device had been shown up in the flash device list, but it listed wrong device geometries.

I have deleted the other device descriptions, so now it shown up with right dimensions.

 

But when I try to erease the flash I get this error:

 

========================================================================= Execute: Erase=== Timestamp:  Mon Feb 27 19:22:15 2012=== Flash Device:         S29AL032D-04=== Flash Organization:   2048Kx16x1=== Flash Mem Start Addr: 0xFF800000=== Flash Mem End Addr:   0xFFBFFFFF======================================================================Informing other connection clients that the target is being 'clobbered'.Loading Flash Device Driver at: 0x00000000Flash Programmer: CCSProtocolPlugin : Error writing memory [Connection refused]Timestamp:  Mon Feb 27 19:22:15 2012

 

I have written the neccessary udev rules to the TAP. It is brand new, so I have no clue what could I do wrong.

My board is working running the current application fine.

 

I have attached the FPDeviceConfig.xml renamed to  cfg because the forum did not allowed attach xml files.

Labels (1)
0 Kudos
4 Replies

669 Views
martonmiklos
Contributor I

I have figured out that I need to use a target initialization file. After I have written it correctly. The CW was able to load the programming elf file. Now I am stucking with the following problem:

 

========================================================================= Execute: Program=== Timestamp:  Sun Mar  4 18:21:16 2012=== Flash Device:   S29AL032D-04=== Flash Organization:   2048Kx16x1=== Flash Mem Start Addr: 0xFF800000=== Flash Mem End Addr:   0xFFBFFFFF======================================================================Informing other connection clients that the target is being 'clobbered'.Loading Flash Device Driver at: 0x00002000Flash Driver Buffer is at:   0x00003D70Flash Driver Buffer Size is: 0x00010290DoneInitialization Command SucceededTrying auto-detect...  File is NOT of type Elf Format.Auto-detection is successful.  File is of type Binary/Raw Format.0x00010000 bytes of Target Memory at 0x00000000 is not within flash boundaries.

 

I am trying to flash an U-boot binary.

0 Kudos

669 Views
AlexP
NXP Employee
NXP Employee

The error you are seeing suggests that you have not selected the Address Range and "Apply Address Offset" settings in Flash Programmer:

0x00010000 bytes of Target Memory at 0x00000000 is not within flash boundaries.

 Please check the box called "Apply Address Offset" and type the start address in the corresponding "Offset" text box, as the file type "Binary/Raw Format" does not automatically include a start address in its structure.

 

EDIT:  The "Offset" box should include the absolute offset for writing the data.  For example, if you are planning to write from the start of the Flash, you should use 0xFF800000 (the address specified in "Flash Mem Start Addr").

0 Kudos

669 Views
martonmiklos
Contributor I

Well I am still fighting with the flash programming.

My flash xml file should be correct, because the CW for mobileGT 9.2 includes xml for the AM29LV320DB which is the similar device (VID:smileytongue:ID, device alignment is checked).

 

My flash is mapped to 0xFFC00000. I can access it if I start a debug session it jumps to 0xFFF00100 as it set in the reset configuration words in the flash beginning.

 

But my attempts to the flash programmings get stucked at the following:

 

 

: -------------------------

Programming file /opt/Freescale/EPPC_8.8/CodeWarriorIDE/CodeWarrior/start.sh

Using Algorithm: amd16x1.elf
 


======================================================================
=== Target Configuration Settings
=== Connection:       CodeWarrior USB TAP
=== Target Processor: 8347
=== Target Init File: /opt/Freescale/EPPC_8.8/CodeWarriorIDE/CodeWarrior/PowerPC_EABI_Support/Initialization_Files/PQ2/CRIO902X.cfg
======================================================================
Connecting......Connected


======================================================================
=== Execute: Program
=== Timestamp:  Thu May 24 14:40:06 2012
=== Flash Device:         AM29LV320DB
=== Flash Organization:   2Mx16x1
=== Flash Mem Start Addr: 0xFFC00000
=== Flash Mem End Addr:   0xFFFFFFFF
======================================================================
Informing other connection clients that the target is being 'clobbered'.
Loading Flash Device Driver at: 0x00000000
Flash Driver Buffer is at:      0x00001D70
Flash Driver Buffer Size is:    0x00004290
Done

Initialization Command Succeeded

Programming 0x00000072 bytes of Target Memory at 0xFFF00000

 

This process newer ends. I have enable the debugger protocoll's logging, and nothing happends there. I can check the affected flash region with the technique mentioned above, but nothing changed. Please let me know if you have any idea!

0 Kudos

669 Views
martonmiklos
Contributor I

Does anyone have any idea about what can be the problem?

 

I have tried to write smaller files ( /etc/passwd for e.g. ) and realized that only 720 bytes get written only and for e.g. the first byte did not get written correctly see attachment.

 

During my pains I have also tried to use the amd16x1.elf to amd16x1alt.elf driver, but it did not helped.

Does anyone know the difference between the two drivers?

 

Reading works fine, but neither erase nor write does not working.

 

 

 

0 Kudos