Hello Yiping,
Thanks for all your time and help. Unfortunately I gave upp on making Codewarrior IDE work without "Error testing IR scan" and moved into GDB insted.(following text is for people who also want to make it work with the same card)
So i used the p2020_init and some xml that was also needed witch i found in gdb_test_ccs_365 file (from your download page) and modified the p2020 file into this:
# Workaround to send g-packet of correct size on "target remote"
echo Loading basic powerpc register info\n
set tdesc filename ...\gdb_test_ccs_365\xml\e500v2.xml
echo Connecting to proxy\n
target remote xxx.xxx.xxx.xxx:2345
mon jtag_chain mpc8572
# proxy will keep g-packet size info
kill
echo Loading e500v2 register info\n
set tdesc filename ...\gdb_test_ccs_365\xml\e500v2.xml
# gdb settings
set debug remote 0
set logging off
set debug frame 0
set remotetimeout 20
set remote hardware-breakpoint-limit 2
echo Connecting to proxy\n
target remote xxx.xxx.xxx.xxx:2345
#mon ccs_host xxx.xxx.x.xxx
#mon ccs_path ...\bin\ccs.exe
echo Setting jtag speed\n
mon jtag_speed 10000
mon jtag_chain mpc8572
mon jtag_chain
echo Connecting to probe and target\n
mon connect
mon jtag_chain
mon chain_pos 0
mon jtag_chain
mon chain_pos 1
echo Jtag speed\n
mon jtag_speed
mon get_probe_status
echo Reset\n
mon reset system
echo Initialize COP register\n
set $copcr=0x0000000000040200
echo Update register cache\n
flushregs
monitor mem_access ijam
define e500v2_workaround
echo e500v2 workaround \n
mon chain_pos $arg0
mon chain_pos
echo Initialize program and debug interrupt vectors\n
set $ivpr=0xFFFF0000
# debug - (a valid instruction should exist to be fetched)
set $ivor15=0x0000F000
# program
set $ivor6=0x0000F700
echo Insert hw breakpoint at reset address\n
set $iac1=0xfffffffc
set $dbcr0=0x40800000
set $dbcr1=0x00000000
# activate debug interrupt and enable SPU
set $msr=0x02000200
echo Run target\n
monitor no_wait_continue
echo Wait 10 sec\n
shell timeout /t 10
echo Stop target\n
monitor stop
echo Remove hw breakpoint at reset address\n
set $dbsr=0x01CF0000
set $dbcr0=0x41000000
set $iac1=0x00000000
end
p /x $pc
e500v2_workaround 1
p /x $pc
Note: This is for windows. ( shell timeout /t 10) and my test is full of buggs. I need to run this three times befor i get it to work proper.
After that it is straight forward.
<gdb> file Myfile
<gdb> break main
<gdb> set follow-fork-mode child
<gdb> c
load and start the program on the MVME2502. And it will halt in main. And then i can step through it.
Note: The MVME2502 had a COP present pin on PIN 12 that NEEDS to be pulled to ground or it wont work at all. (See former awnsers)
I still have some minor errors that I haven't worked out yet but they aren't that big.
Thanks again for all your hard work,
Martin