[SOLVED] Target Connection Lost when attaching to running program

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

  • [SOLVED] Target Connection Lost when attaching to running program


    My application has a bootloader which runs in the K60 internal flash, then jumps to an entry routine in an external flash bank.

    I can debug the bootloader perfectly, but as the transition to loading the external flash code is proving tricky, I'm looking for a more straightforward approach to debugging the external flash code, which I think might be achieved by the 'attach to running program' option.

    I'm using a 'default' jdebug project (haven't commented anything in/out), and am seeing the 'Target Connection Lost' message (see attached) following the attempt to connect Ozone to the running target- Any ideas as to what might cause this issue?

    Many thanks

    • Image 1.png

      24.47 kB, 749×457, viewed 60 times
  • Hello,

    When you have a bootloader part and application part where you want to debug only the application we recommend to just load the bootloader part before your application part is downloaded:

    Your application will then be downloaded via the elf file you provided to the File.Open function and for this application also all debug symbols will be available.
    Then just make sure that your bootloader runs through as explained here:

    Now on start of the debug Session Ozone will let the bootloader and then the application run until the startup completion point (usually function main()) is hit where the first automatic breakpoint is set.

    From then on Ozone has full control over the debug session and you can debug your application as usual.

    But you have to make sure the application image makes it to the Flash by having a Flashloader for that external Flash as explained in your other thread:
    Ozone hanging when loading code into external flash

    Best regards,

    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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.