I met a problem while flashing program to MPC5744.
Firstly, when I set [un-check] to "Attatch to Running Target" in Startup page of Flash configuration, i can see my project running with PE debugger. But when I reset the MPC5744, or when I disconnect my PE and use 12V power, an elder version of project runs.
Secondly, when I set [check] of this item, the error show as below:
Connection from "127.0.0.1" via 127.0.0.1. Connection from port "54999" to 7224
PE-ERROR: Warning. Can't read registers while part is running.
PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
PE-ERROR: Warning. Can't read memory while part is running. @0 (4 bytes)
PE-ERROR: Warning. Can't read memory while part is running. @4002d44(4 bytes)
PE-ERROR: Warning. Can't read memory while part is running. @4002d44(4 bytes)
PE-ERROR: Warning. Can't read memory while part is running. @4002d44(4 bytes)
Interrupt command received. Halting execution.
No breakpoints currently set.
Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "54999" from 7224
Target Disconnected.
In conclusion, I try these method, but neither of them can make me flashing my new project.
HELP!
Solved! Go to Solution.
Hi,
if you can see that old version of your project is running after disconnection of PE or after power-on - are you sure that you didn't select RAM target in Debug Configurations by mistake?
There are two typical use-cases how to configure it:
1. You want to load new code to flash. In this case, it's necessary to enable "Load executable" and also "Load symbols" to see the source code when debugging. Do not select "Attach to Running Target" here:
2. You want to do a "hot attach" only to debug code which is already programmed in flash and which is running (you are not going to program the flash again). In this case, disable "Load executable" and enable "Attach to Running Target":
You can get a message that the debugger can't read some registers or memory because the device is already running (real-time access is not supported by this debugger). Just stop the execution to see all resources.
Note: Source level debug of a running target is only possible if the sources of the project to be attached exactly match the binary code running on the target.
Regards,
Lukas
MPC5744P 检测到设备。
当前未设置断点。
通过 127.0.0.1 与 “127.0.0.1” 断开连接。通过端口 “53887” 与 7224
Target 断开连接。
我在使用 5744P 开发板进行烧录时遇到了上述错误。端口选择是正确的,我尝试了上面提到的方法,但还是出错了。我该如何解决这个问题
Hi,
if you can see that old version of your project is running after disconnection of PE or after power-on - are you sure that you didn't select RAM target in Debug Configurations by mistake?
There are two typical use-cases how to configure it:
1. You want to load new code to flash. In this case, it's necessary to enable "Load executable" and also "Load symbols" to see the source code when debugging. Do not select "Attach to Running Target" here:
2. You want to do a "hot attach" only to debug code which is already programmed in flash and which is running (you are not going to program the flash again). In this case, disable "Load executable" and enable "Attach to Running Target":
You can get a message that the debugger can't read some registers or memory because the device is already running (real-time access is not supported by this debugger). Just stop the execution to see all resources.
Note: Source level debug of a running target is only possible if the sources of the project to be attached exactly match the binary code running on the target.
Regards,
Lukas
Hi, Lukas:
Thank you for your explanation!
I follow your instruction and especially not select "Attach to Running Target" .
Still, new code can run normally in debug mode, but after reset old version runs, it driving me crazy!
Here is my concern:
1-I can not set my project to DEBUG_FLASH mode(only DEBUG, DEBUG_RAM available)
2-What is the difference between DEBUG_FLASH mode and the flash function(with the "lightning" symbol)
Looking forward to your reply.
Best regards!
Wayne
Hi Wayne,
DEBUG or DEBUG FLASH forces the code to the flash memory, it will run also after disconnection of debugger. DEBUG_RAM forces everything to RAM memory - it's for fast testing and debugging when the project is not too large (less than size of RAM). It does not touch the flash ever, obviously it won't work after reset. There are separate linker files for both modes.
Not sure what's wrong on your side. Could you make a screenshot of your Debug Configurations window? I would like to see Main and Startup tabs.
If you can see that old version of your project is running after reset, it really looks like you use DEBUG_RAM target by mistake.
Regards,
Lukas
Hi Lukas:
Problem solved!
It is that I use DEBUG_RAM mode.
Thank you!
Good luck!
Wayne