[SOLVED] InitTarget default body

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

  • [SOLVED] InitTarget default body

    Hi Guys,
    Does somebody know what is the default "InitTarget()" function related body - relating to Jlink.exe? I mean, the documentation describes that I can overwrite "InitTarget", but what I will overwrite, what is the original one? I am using cortex-m4.
    Thanks,
    Tibor
  • Hi Tibro,

    The "InitTarget()" function initializes and sets up the connection between the J-Link and the target.
    You will have to set up the ARM specific debug registers, init the AHBAP accesses and all the target specifics, that are needed to connect to the target successfully.
    All information necessary can be found in the related manuals for your device and the arm documentation.

    Could you explain to us what you want to achieve?

    Please find a list of all known supported devices here:
    segger.com/downloads/supported-devices.php
    Is your device among it?

    Best regards,
    Fabian
    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.
  • Thanks Fabian.

    My intent is a kind of experimental test. Yes, generally I can program my device with Jlink programmer without any problem. But I have an *.s37 file which can "brick" the device, if some kind of disturbance happens during the upload of this file. (I manually make this disturbance, during the upload, I toggling the device related reset pin) After the successful bricking, I've created a log about the jlink connection attempt, but it just say that "Failed to power up DAP". (I've attached the logfile).
    The interesting thing is this issue has happened with my device at once (I mean: same error message, same disturbance during the flash update, etc ), but prior I was able to recover the device, the steps was:
    - connect jlink debugger to a working MCU, then jlink.exe connect, s, 4000, etc. A regular process to a working device.
    - then de attache the good device, then attache the faulty "bricked" device. The key was the JLink.exe thought that the same "good" device was at its end, the thread was not stopped.
    - and I was able to erase the faulty chip, then it worked without any problem. I mean, I can upload new firmware, etc.

    So that is why I am curious about what kind of "functions" are implemented/called in the default "InitTarget" function.
    Can you share with me the default content, or is it not public info?

    Best,
    Tibor
    Files
    • logfile.txt

      (3.83 kB, downloaded 233 times, last: )
  • Hi Tibor,

    I sent the JLinkScript file for EFR32MG12PXXXF1024 to you via e-mail.

    Do you have any further questions?

    Best regards,
    Fabian
    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 Tibor,
    Glad I could help.
    Thank you for the praise.

    We will consider this thread as closed now.

    Best regards,
    Fabian
    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.