This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMDXIDK5718: Bug report CCBT-1993

Part Number: TMDXIDK5718

Tool/software: Code Composer Studio

Hi

About one year ago there was a thread concerning restart of an application where the initialised data section was not initialised again.

https://e2e.ti.com/support/embedded/tirtos/f/355/p/542236/1978196

  • Seems that some of my text has been discarded...
    So here is the whole question again:


    About at the end there is a reply from TI employee "ScottG" about a filed bug report (CCBT-1993).

    e2e.ti.com/.../1978196

    As I have the same problem I tried to track that bug, but I was not able to find it.
    Where can I find more information about this bug?

    Regards,
    Markus
  • Markus,

    I believe it is not visible in the external bug tool as it is a requirement vs a bug.

    The summary of the requested change is:

    "the debugger should either not support restart of programs built for RAM model, by not making the option available, or by indicating such when customer tries to restart; or, to support RAM model, if restart is requested the debugger should do a partial reload to re-initialize globals."

    I will get an updated status

    Regards,
    John
  • Hi John

    Thank you for your answer.
    I'm looking forward to your status update.

    Regards,
    Markus
  • No answer yet but I hope to have more details the start of next week.

    John
  • Markus,

    Please look at this HOWTO note for specifying different data load and run addresses for GNU targets: processors.wiki.ti.com/.../BIOS_with_GCC_(CortexA)

    Doing this, every time the program starts over the .data section runtime locations will get reinitialized from the initial values the loader placed in memory.

    Is this what you are looking for?  If not, can you please clarify the specific use case and issue you are having?

    Thanks,
    Scott

  • Scott,

    I tried your suggestion already some days prior to this thread. Because it did still not work I created the following thread:

    e2e.ti.com/.../635099

    Can you help on that?

    Regards,
    Markus
  • Hi Markus,

    I looked at your other thread and what you posted looks fine to me. I don’t know why that doesn’t work.

    I just did some experimentation on an MSP432 board (that I have with me tonight), and doing the Program.sectMap[] steps as described on the wiki page worked for me without any issue. I tried specifying both load/run segments, and addresses, and the map files looked good, and the programs ran and restarted fine in both cases.

    I am running on a later version of the kernel, but I don’t think that should make a difference.

    One thing that you might try as an experiment… if you specify addresses instead of segments do you see the same result? I don’t know if there might be some issue with the segments in your custom platform(?)

    I just sent an internal ping to the engineer assigned to your other thread to see if he has made any progress or has any ideas as to why this might not be working in your case. Hopefully you will get a response on that thread soon…

    Regards,
    Scott
  • Hi Scott

    Concerning your suggestion "if you specify addresses instead of segments do you see the same result?":
    Yes, I also tried this, but the result is the same. The load address is not used.

    Thank you for involving an other engineer.
    I'm Looking forward to his answer.

    Regards,
    Markus

  • OK, thanks Markus.

    Sorry for the delay.  I haven’t heard back yet from the engineer assigned your thread.  I’ve not used the SDK you are using, and I’m hoping he may be able to recognize what the problem is.

    I hope to get a response for you soon…

    Regards,
    Scott

  • Hi Scott

    Any updates on this question?

    Regards,
    Markus

  • Hi Markus,

    I did make contact with Eric and saw that he replied to your original thread.  I left it at that, and didn’t know you were still having an issue.  At the time I probably should have asked for this thread to be closed as a duplicate.  

    Anyways, sorry for the delay.

    I now see your reply back to him on that other thread, that it works for your own sections, but not for predefined sections like .text, .data etc.  When I’d experimented I’d moved .data without any issue.  My guess is that the problem relates the custom platform somehow.  There is an engineer at my local site that I can ask about this (he wrote that HOWTO info on the wiki), but he has left for the day.  I will talk to him tomorrow and see if he has any suggestions…

    Regards,
    Scott

  • Hi Markus,

    I heard back.  The trick described on the wiki page generates a second placement directive, with the goal that it will override the default directive auto-generated within the platform.  This override has since been found to not work for some linker versions.  This is probably what is happening for your project.

    An alternative that forces the different load and run addresses for .data is to edit your custom platform to separately partition code and data regions.  By default the auto-generated linker script places the .data section into Program.platform.codeMemory, and has the run address in Program.platform.dataMemory.  If you edit your memory configuration to have codeMemory and dataMemory point to different memory regions then this will result in different load and run addresses for .data, allowing the .data values to be re-initialized when the CPU is reset.

    Does this work for you?

    Thanks,
    Scott  

  • Hi Scott

    I changed to platform settings as follows:

    This did the trick:
    The section ".data" now has separate load and run addresses (load: DDR_CODE, run: DDR_DATA).

    I also added the following to my config file:

    Program.sectMap[".data"] = new Program.SectionSpec();
    Program.sectMap[".data"].loadSegment = "DDR_CODE";
    Program.sectMap[".data"].runSegment = "DDR_DATA";

    Strangely after I did this the program always crashes before main().
    But it works when I remove those lines.
    Any ideas why this is wrong here?

    Regards,
    Markus

  • Hi Markus,

    OK, I’m glad to hear it is working (without those extra lines).

    I don't know why your program crashes if you also add the extra handling for .data in your config file.  With different code and data memory regions specified in the platform there is no need to use Program.sectMap[], because the default directives will now use different load and run addresses for .data.

    A guess is that there is still some ordering issue between the default directives and those attempting override in the config file.  To understand why, it would be good to debug into the startup sequence to see where before main() the crash happens.  I expect that in the end it will make sense, but I don’t know if you want to debug that further since there is no need to try to redirect .data anymore(?)

    Regards,
    Scott

  • Hi Scott

    Thank you for this estimation.
    As it is working now and I don't have time to investigate this further I will leave it this way.

    Thanks again for your help!

    Regards,
    Markus