AnsweredAssumed Answered

OSBDM can not write to memory but can read

Question asked by Shaun James on Jan 31, 2012
Latest reply on Feb 15, 2012 by Shaun James

Hi All,

 

I have been using the OSBDM build into the M52259DEMO board with CW7.1.2 for a couple of days to test out a couple of RTOS's.  After erasing the flash memory one time I now get the error:

 

GDI Protocol PlugIn: The Debugger can not write memory.

 

It appears that it can read memory okay because checking the protocol log shows that the chip ID is successfully returned.  Also, I went into the hardware diagnostics tool and found that I could read IPSBAR and RAMBAR and I could write to RAMBAR also.

 

The firmware in the OSBDM was v26, I found that it was a bit old so I've updated it to the latest with the new P&E tool but I still get the same error.

 

Strange as it was working fine earlier, is there some kind of lock to prevent a BDM writing to memory?

 

Here is the protocol log of a "blank check":

 

GDI:   DiGdiOpen()
==> DI_OK
GDI:   DiGdiVersion()
==> DI_ERR_NOTSUPPORTED
GDI:   DiGdiAddCallBack(8192)
==> DI_OK
GDI:   DiGdiAddCallBack(16384)
==> DI_OK
GDI:   DiGdiInitIO()
GDI:      Callback(DI_CB_MTWKS_EXTENSION) kind=MTWKS_CB_REPORTONLYFATALERROR, Result=DI_OK
GDI:      Callback(DI_CB_MTWKS_EXTENSION) kind=MTWKS_CB_GETSTATUSWHENSTOPPED, Result=DI_ERR_NOTSUPPORTED
GDI:      Callback(DI_CB_MTWKS_EXTENSION) kind=MTWKS_CB_COLDFIREAUTOCONFIG, Result=DI_OK
==> DI_OK
GDI:   Reading From Memory Address: 0x04011000A, count: 2, memSpace: 2
GDI:   DiMemoryRead()
==> DI_OK
GDI:   24 81
GDI:   Writing To Memory Address: 0x020000000, count: 40, memSpace: 1
GDI:   BC C5 BC C5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00
GDI:   DiMemoryWrite()
==> DI_ERR_FATAL
GDI:   DiErrorGetMessage()
==> 1
GDI:   Error Message ==> The Debugger can not write memory.
GDI:   DiGdiClose(TRUE)

EDIT:  I used the hardware diagnostic tool to read from 0x0401D0008 which is the SCFMSEC — CFM Security Register and it reads 80 00 FF FF which suggests that there is no flash security.

 

Any ideas??

 

Shaun

Outcomes