tcl script problems about codewarrior

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

tcl script problems about codewarrior

939 Views
mgkiller
Contributor III

when i debug my p2020 and p4040 by using codewarrior, i have the following questions:

question 1:

there are 2 tcl scripts to initialize p2020, p2020_core_init_cacheon.tcl and p2020_core_init_ram.tcl, i can do step debugging with p2020_core_init_ram.tcl in DDR, but i can't do that with p2020_core_init_cacheon.tcl in SRAM, my question is whether i cando step debugging in SRAM with p2020_core_init_cacheon.tcl?

question 2:

when i do step debugging my p4040 with p4040_core_init_ram.tcl in DDR,i found the cpu always infinite loop in below code:

########################################################

#

#   IVOR6 - 0x0700 Program

#

########################################################

       .org   0x700

 

        nop                    /*cpu infinite loop here*/

       isr_prologue

 

       li     r3,0x0700

       lis    r4,InterruptHandler@h

       ori    r4,r4,InterruptHandler@l

       mtlr   r4

       blrl

 

       isr_epilogue

########################################################

why?

question 3:

when i program norflash on my  p4040 using p4040_core_init_ram.tcl, i got the error below:

Performing target initialization ...   

  + e500mc Special Purpose Registers

    PIR=<r>0</r>

Warning: auto-converting deprecated register / group names "CONFIG/CONFIG_BRR" to the current version "DCFG/DCFG_BRR"

         0 <m>0x11111111</m> .... 

        10 <m>0x22222222</m> """" 

       100 <m>0x33333333</m> 3333 

      1000 <m>0x44444444</m> DDDD

     10000 <m>0x55555555</m> UUUU 

    100000 <m>0x66666666</m> ffff 

   1000000 <m>0x77777777</m> wwww 

  10000000 <m>0x88888888</m> .... 

  100000f0 <m>0x99999999</m> .... 

  10000ff0 <m>0xAAAAAAAA</m> .... 

  1000fff0 <m>0xBBBBBBBB</m> .... 

  100ffff0 <m>0xDDDDDDDD</m> .... 

  100ffff0 <m>0xDDDDDDDD</m> .... 

  10fffff0 <m>0xEEEEEEEE</m> .... 

  1ffffff0 <m>0xFFFFFFFF</m> .... 

         0 <m>0xAAAAAAAA</m> .... 

         4 <m>0xBBBBBBBB</m> .... 

         8 <m>0xCCCCCCCC</m> .... 

      201c <m>0x12345678</m> ....

  Downloading Flash Device Driver ... 

Error:  Couldn't write flash driver to target.  Memory verify failed at location: 0x0000201c.Please make sure you are not trying to write to a read-only location.

 

but as you see, i can succeed to  access the whole 512MB DDR space, why codewarrior say memory verify failed?



thanks for your concern,any help is appreciated!

Labels (1)
Tags (3)
0 Kudos
3 Replies

560 Views
lunminliang
NXP Employee
NXP Employee

Hi,

For the third question, please check the address "0x0000201c" in your memory map, check in .tcl file in which area is this address.

0 Kudos

560 Views
lunminliang
NXP Employee
NXP Employee

Hi,

For the second question, from the code you provided, the core has entered a program interrupt.

It occurs under several conditions: floating-point enabled, illegal instruction, privileged instruction, trap and unimplemented operation.

Please check Guest) Exception Syndrome Register (ESR/GESR) for which happened.

0 Kudos

560 Views
lunminliang
NXP Employee
NXP Employee

Hi,

For the first question, those .tcl file are your custom initialization file right? I think you need to share the two files and describe what errors you meet?

0 Kudos