[SOLVED] Jlink EDU - Debug wrong memory location

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

  • [SOLVED] Jlink EDU - Debug wrong memory location

    Good morning


    I have a problem very strange with mi Jlink and i was hoping that you could help me


    I will put you in context:


    I am using a Jlink EDU for a proyect that i am doing at home, but when i debug the following happens to me


    - WHen i go into debug or do a reset from the IDE, it goes to a wrong memory location (attach screenshot).
    if i put the pc the correct memory location, it debugs correctly but when i do a reset from the IDE, it backs to the wrong location (yes its always the same).
    if i program the MCU, and i get it to run withouth the IDE, flasher connected, all works fine.


    - I have tried various configurations and reviewed posts and I don't see the problem.
    - I have checked that the flash settings are correct.
    - I have tried to uninstall the IDE and the Jlink Driver.
    - I have tried in other computer.
    - I have tried others versions (MDK 5.32, JLink 6.88a).


    I am using this versions:
    - uVision MDK 5.33
    - MCU: STM32G484
    - Jlink Software: 6.94b



    What can I do?
    what could be happening to me to make me start in this position?


    Thank very much for you help
    Kinds Regards
    Images
    • Debug_captura.jpg

      301.84 kB, 1,070×857, viewed 714 times
  • Hi,
    There is no such issue known to us, regarding the STM32G4 devices.

    Could you please:
    1) Send us a J-Link log file? How to enable:
    wiki.segger.com/J-Link_DLL#Enable_J-Link_Log_File
    2) Check what is located at the Address the device jumps to after reset?
    Is it the HardFault handler?
    3) Could you please use the J-Link Commander (JLink.exe) to connect to the device (STM32G484) and enter "r" (resets the device).
    This should output the current register values. Could you send us a screenshot of the full commander output?

    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 Fabian,


    Thanks for you repply.


    Tomorrow i will send you the information you request
    But i think that the error come by other side, i tell you:


    I tried to downgrade firmware version of the jlink EDU (to 6.88a) for if have some problem with the actual 6.94.
    When i did it i had the next error:

    i attach image.

    I was surprised because i was working with it without problem.
    I checked the connection from jlink commander and i followed the pasos to test the connection without any problem.
    I have also tried the following:


    - reset conf - without any result
    - exec invalidatefw + usb - it works correctly, and i can upgrade / downgrade the firmware of the jlink, but the error persist


    Thesse errors could be linked?


    Thank you very much for your help
    I belive that it is becomming in a support case, and maybe i should open a ticket.
    Images
    • segger_jlink_configuration_error.jpg

      21.65 kB, 502×132, viewed 381 times
    • segger_jlink_configuration_error_1.jpg

      24.72 kB, 968×193, viewed 353 times
  • Hi,
    It is very unlikely that these issues are directly connected.
    To be honest, I do not thinkt that the initial problem is J-Link related at all.
    Currently it seems more likely that it is an application related or MDK related issue.
    Please also note that no other customer contacted us regarding such an issue yet, and the STM32 devices are very commonly used with J-Link.

    LiqueteGarcia wrote:

    I tried to downgrade firmware version of the jlink EDU (to 6.88a) for if have some problem with the actual 6.94.
    Could you please describe what these problems are exactly?
    Usually, a firmware upgrade leads to a better and more stable experiance.

    Another method to exclude the J-Link as source of the issue would be to reset the device via J-Link Commander:
    - Open J-Link Commander (J-Link exec)
    - Type "reset"
    - Type "regs"
    this should show you the current register values including the PC.
    You can also single step with the command "s".
    Does this work as expected?
    Please also answer the questions of my last post.

    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 Fabian,

    Thanks for you answer so quickly and help me.
    I appreciate so much.

    If i am honest, now worry the problem that i cant use the Jlink EDU with the Jlink Configuration (yesterday attach a screenshot)

    What i can do?
    I test the solutions that i told you yesterday, and looking in the forum similar cases but it has not worked

    Regarding the problem of the memory debug address:
    According to what you say, i have test with other app, with the same MDK (version), and the problem is the same.
    I dont belive that be the app, because of before it worked. For this proyect i worked with git, and i had tested all tags, with the same result. Also i tested a STM example.

    By other hand, i did all test you request me:

    - Attach the logs (Jlink Command - JlinkARM.log, MDK JlinkLog.log)
    - I did the test reset + regs (Screenshots: reset_1, reset_2, reset_3)
    - Check what is located at the Address the device jumps to after reset? Its No code. I dont know what its.
    Is it the HardFault handler? No, and also its some error handler.
    - Could you please use the J-Link Commander (JLink.exe) to connect to the device (STM32G484) and enter "r" (resets the device).
    This should output the current register values. Could you send us a screenshot of the full commander output?
    I attach the screenshot ("reset_jlink_commander")


    Thanks again for helping me and reading me
    Kinds Regards
    Images
    • reset_1.jpg

      82.09 kB, 979×512, viewed 387 times
    • reset_2.jpg

      124.99 kB, 979×512, viewed 375 times
    • reset_3.jpg

      139.58 kB, 979×512, viewed 377 times
    • reset_jlink_commander.jpg

      129.64 kB, 1,012×619, viewed 352 times
    Files
    • JLinkARM.log

      (42.43 kB, downloaded 371 times, last: )
    • JLinkLog.txt

      (207.66 kB, downloaded 320 times, last: )
  • Hi,

    I uploaded a small SEGGER Embedded Studio project (including a .hex-file) that works flawlessly on our side here:
    download.segger.com/Fabian/ST_STM32G484_Sample_App.zip
    Could you give this a quick try?

    The screenshots show that the device is indeed at the aforementioned address when reset.
    I suspect that a bootloader (BTL) is running on the device.

    If so, It seems like your MDK project is not setup correctly (it is not waiting for the BTL to finish).
    I would suggest contacting KEIL regarding this.

    You could also give Ozone a try:
    segger.com/products/development-tools/ozone-j-link-debugger/

    You can find information on how to debug applications with BTL in Ozone here:
    wiki.segger.com/Debug_on_a_Target_with_Bootloader

    Again, there is no indication that the problem is caused on J-Link side.

    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.
  • Good afertnoon Fabian,


    Thank you for your answer.


    I have checked that the problem is not in the jlink, if not the problem was a external supervisor (chip) that is damaged and afect at the reset line.


    I desoldered it and i checked that this didnt happen.
    I replacec by other and and all work correctly.


    Thank you very much for your help
    The post can be closed.


    Note:
    - I will open another post for the Jlink configurator problem that I don't know why I can't configure the device.
  • Hi,
    Good to hear that you are up and running again.

    I will close this thread as you requested.

    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.