[SOLVED] How to avoid RAM initialization

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] How to avoid RAM initialization

    Hi,
    I am using J-Link and the GDB server for debugging ARM devices under Eclipse with GCC tool chain. I added external RAM to my linker script an realized that when loading my code with the debugger the complete external RAM section will be be loaded with data. Even though this RAM section does not need to be initialized with any data at all. I assume that J-Link is doing that for whatever reason. Is there a way to avoid that because it exceeds the download time quite significantly.

    Any help on that is appreaciated.
  • Hello,

    Thank you for your inquiry.
    I assume that J-Link is doing that for whatever reason.

    J-Link is doing that because Eclipse is telling J-Link to do so. J-Link will initialize and program any memory the IDE or program tells it to.
    To avoid certain areas from being initialized you can tell J-Link to ignore them with command "map exclude".

    More information can be found in the J-Link user manual.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Nino,

    thanks for the valuable feedback. I checked the J-Link debugging configuration in Eclipse, but did not find the right place to put the "map exclude" command. Do you have a hint for that as well?

    regards
    Andreas
  • OK, I got it.
    It has to be part of a J-Link script file. The script file can be passed by using the command line option -jlinkscriptfile which can be set in the eclipse debug configurations under the debugger tab.
    See this link for instructions: wiki.segger.com/Eclipse#Using_J-Link_script_files

    It works now as expected. Thanks again for pointing me to that

    The post was edited 1 time, last by anko ().

  • Hello,

    Great to hear that you are up and running again.
    We will consider this case as closed now.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.