AnsweredAssumed Answered

Incorrect __initMMU_p1 label address | MPC5675K Qorivva

Question asked by Dhiraj Shetty on Jan 28, 2015



We are running uCOS-II on the Qorivva MPC5675K. We are running the board in DPM mode. We are using CodeWarrior 10.6 MCU, with the latest updates.


As part of our implementation, we have two uCOS-II binaries, compiled as part of separate projects (ProjectA for Core0 and ProjectB for Core1). We start debugging using ProjectA, update its ".tcl" file to point to the "start_p1" of ProjectB, and finally we instruct the debugger to pick up ProjectB binary using "Other Executable".


Also, since we have two projects, we have two linker command files (".lcf").


Currently, we are facing an issue. After compilation, we see that the disassembled code has incorrect address for one of the labels.


Please see the screen shots below. They pertain to ProjectB for Core1.



As you can see, the address of the function "__initMMU_p1" is 0x5000a568.


This can be confirmed again by looking at the disassembly of the same binary, below.




However, in the same disassembly, if we try to look at the function "__start_p1", we see that the address for the label "__initMMU_p1" has incorrectly been taken as 0x5001a568 instead of 0x5000a568. This is shown in the snapshot below.



Due to this, upon starting a debug session, Core1, tries to branch to 0x5001a568 instead of 0x5000a568 and then hangs.


This issue only seems to happen when the code size for ProjectB is large. If we try to lower the code size of the project, this issue seems to disappear.


We have been temporarily able to solve the issue with this particular label by changing "lis r5, __initMMU_p1@ha" to "lis r5, __initMMU_p1@h"


However, now we are not sure if the same problem might be appearing in other places too.


We are unsure if the issue is caused due to mistakes we have made in the linker files. We have provided our linker files as well.


Any ideas on this?

Thanks in advance for your time and support!



Original Attachment has been moved to:

Original Attachment has been moved to: