Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
ICDPPCNEXUS debug asm not as expected
Hugo C. Sep 28, 2016 at 11:49 AM (11:49 hours)
Staff: Takao Y.

  • I am loading a program that fails to execute with ICDPPCNEXUS on a MPC5676R with the MPC567XADAT516 daughter board.

    My program is map to use the external RAM for execution.

    I have use the objdump from the gnu toolchain that we use to inspect the assembler code.

    And when I go ASM step with the ICDPPCNEXUS I did not see the expected source code.

    I have made various test that I resume here:
    - Using all program mapping to internal RAM works
    - Remove 2 lines of a function never called permit the correct execution

    I have made some special mapping to split the .text section in internal and external memory.

    Do someone have an idea what I have to search or manipulate to identify the source of problem. I am facing an issue I think is it related to ICDPPCNEXUS.


  • Greetings,

    Did you take a look at the macro script you may be running on reset? Go to configuration menu -> automated script option. Open the script you are running in a text file and check the MMU setup. If the external memory is setup differently than what you want, then make changes here.

    Takao Yamada

    • The same environment is used and when I disable 2 lines of source code (integer variable set value). The same mapping and macro works.

  • Greetings,

    Check at which program counter this problem occurs. Then check the MAP to see where this location is mapped. If it is not mapped, then all you will see is disassembly. If it is mapped but the source code is not showing up, then you should try using the "sourcepath x" command in the console, where x is the full path to the source file. That forces ICD to load that source file. This can happen if that source file cannot be found or it has changed since the last compilation, so the MAP file can be out-of-date.

    Takao Yamada

  • I didn't have any issue with the PC. It is at the expected position. The source code is visible. But when I execute in ASM step the ASM source code is not the same as the objdump of my ELF file.
    And only by removing 2 lines in a function I could execute and see the correct ASM code.

  • Greetings,

    What does the assembly look like for these 2 lines?

    Takao Yamada

    • As the ASM code is incorrect on other portion of code I didn't put any review on this ASM code.
      The ASM code is identical for this two lines but my starting line code does not correspond to objdump asm code.

      But with your comment I take a look at the content after the last line of function with 2 lines of source code. There is elements in this RAM but there is no content defined in the following mapping file.

      I have read again my readelf generated file nad see that there is a difference between VirtAddr and PhysAddr. I did not know the consequence on the MCU.

    • I have also another issue. I try to erase the extra adress memory but all external memory is erased
      meminit.l $2001100c $2001FFFF
      And my PC is at 200001008 and there is empty code.

      I have tried the same with internal RAM and it only erase the defined addresses.

      I think it could be a start of something but I this know what to search.

      • I have make more experience and found something strange.

        When I use the command meminit.l $20001000 $20001100.
        The Memory view display content on a part of this memory.
        From 200017B to 200010FB there is remaining data.

        If I make a C program to initialize each byte, it is correctly performed.

  • I have finally completed the issue.
    The initialization of memory access need to have all PCR regarding addressing properly set.

    I have a response on NXP community
    Subject: MPC567XADAT516 load program to external RAM (updated)

    Thanks Takao Y. for your answer that help me to search the source of the issue.

Add comment

   Want to comment? Please login or create a new PEmicro account.

© 2019 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement