Hello yiping wang,
I followed your instructions with some issues.
I am connecting to CWTAP via USB but I also tried (for this step) the ethernet connection, which gave the same error.
In trying to re-flash just the U-boot as you suggested in "use the first section of "Use CodeWarrior for ARMv8 to Debug U-boot and Linux Kernel and Bring up Bare Boards",
I was unsuccessful (Test name - IR SCAN, more info - IR length measure failed) but noticed the CWTAP RUN/PAUSE LED was solid orange (mixed mode).
NXP documentation suggests bad power but this is the NXP dev board powered with the NXP power supply, so I assumed the RCW was also overwritten.
So I moved on to your second suggestion"If both u-boot and RCW are destroyed".
In step one, my LS1012A RDB switch 1 was set to 0xD4 not 0xA6 as suggested in the "code warrior get started" document.
Before I erroneously overwrote the flash the board was working (it would boot to Linux) with this setting.
I set switch1 to 0x26 as indicated in "code warrior get started" (page 9).
I accomplished steps 2 and 3 as you indicated. I made no changes to cwflash.py, since my connection to CW TAP was USB.
When I attempted step 4 "Opne GDB console" that did open but when I entered "source ../../gdb_extensions/flash/cwflash.py", I received the following output:
(gdb) source ../../gdb_extensions/flash/cwflash.py
Starting flash programmer services...
Starting local server...
Successfully started gdb server 127.0.0.1:45003.
Set gdb remote timeout to 7200
Connecting to target...
Using LS1012A SoC
Using CWTAP connected to local usb port
Using jtag speed 16000
Connecting to probe...
connected successfully
Successfully connected to probe
Initializing target...
Running init script /opt/Freescale/CW4NET_v2017.03/CW_ARMv8/ARMv8/gdb_extensions/flash/scripts/../../../../Config/boards/LS1012A_RDB_init.py
ccs:Subcore error encountered during multicore operation
Python Exception
fp_initialization()
File "../../gdb_extensions/flash/cwflash.py", line 109, in fp_initialization
start_fp_services(argument)
File "/opt/Freescale/CW4NET_v2017.03/CW_ARMv8/ARMv8/gdb_extensions/flash/../flash/scripts/services.py", line 151, in start_fp_services
return instance.invoke(argument, False)
File "/opt/Freescale/CW4NET_v2017.03/CW_ARMv8/ARMv8/gdb_extensions/flash/../flash/scripts/services.py", line 108, in invoke
ret = self.start_service(argument)
File "/opt/Freescale/CW4NET_v2017.03/CW_ARMv8/ARMv8/gdb_extensions/flash/../flash/scripts/services.py", line 122, in start_service
ret = start(args)
File "/opt/Freescale/CW4NET_v2017.03/CW_ARMv8/ARMv8/gdb_extensions/flash/../flash/scripts/flash_init.py", line 294, in start
if internal_start(args) is False:
File "/opt/Freescale/CW4NET_v2017.03/CW_ARMv8/ARMv8/gdb_extensions/flash/../flash/scripts/flash_init.py", line 67, in internal_start
if internal_initialize_target(args) is False:
File "/opt/Freescale/CW4NET_v2017.03/CW_ARMv8/ARMv8/gdb_extensions/flash/../flash/scripts/flash_init.py", line 269, in internal_initialize_target
DbgInit.run_init_file()
File "/opt/Freescale/CW4NET_v2017.03/CW_ARMv8/ARMv8/gdb_extensions/flash/scripts/../../../../Config/boards/LS1012A_RDB_init.py", line 305, in run_init_file
Reset()
File "/opt/Freescale/CW4NET_v2017.03/CW_ARMv8/ARMv8/gdb_extensions/flash/scripts/../../../../Config/boards/LS1012A_RDB_init.py", line 93, in Reset
gdb.execute("py-reset %d" % user_reset_delay)
gdb.error: Error occurred in Python command: Protocol error with Rcmd
(gdb)
I didn't get as far as erasing and re-writting the flash, but if we get that far, can you supply known good image files for RCW and U-boot.