Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    Source not found when debugging any XDK project using segger j-link plus

    DrEmmettBrown
    Member

    Source not found when debugging any XDK project using segger j-link plus

    I downloaded and built one of your Demo-Projects: LedsAndButtons. I followed your instructions to debug the software using a segger j-link plus:

    https://developer.bosch.com/web/xdk/how-to-debug

    DrEmmettBrown_1-1604654585737.png

     

    Programming the target seems to work, but when XDK Workbench switches to Debug-View, XDK does not find the project source code. Only Disassembly debugging works, which is not really useful:

    DrEmmettBrown_0-1604654524104.png

    Is this a known issue of the XDK Workbench (default debugging settings), or did I do something wrong here?

    5 REPLIES 5
    DrEmmettBrown
    Member

    Re: Source not found when debugging any XDK project using segger j-link plus

    I figured now, that the programming using JLink does not work. When I use the Flash button, the application starts and does control the LED output according to the xdk-buttons-1/2 as expected.

    DrEmmettBrown_0-1604673611726.png

    If I use the JLink Debug the demo project is not running and on xdk-button-2 press, xdk returns the following error to console: "Application Firmware Corrupted"

    DrEmmettBrown_1-1604673866211.png

     

    The only thing that make me wonder from the JLinkGDBServerCL output is the warning and the low target voltage of 2.46V. Other than that Download is stated with "Verified OK"

    DrEmmettBrown_2-1604674284557.png

     

     

    I did not change the run-configuration at all, but I suspect an error in there:

    DrEmmettBrown_0-1604674941895.png

    DrEmmettBrown_1-1604674984762.png

    DrEmmettBrown_2-1604675043568.png

    DrEmmettBrown_3-1604675082588.png

    DrEmmettBrown_4-1604675123207.png

     

     

     

     

    DrEmmettBrown
    Member

    Re: Source not found when debugging any XDK project using segger j-link plus

    ok, it looks like there is an issue with loading the *.out file when debugging.

    JLink loads: debug/LedsAndButtons.out -> "Application Firmware Corrupted"
    Flash loads: debug/LedsAndButtons.bin -> "ok"

    What actually works is using "Flash" to load the .bin and then "Debug" having the debug run-configuration set to "Connect to running target". This option does skip programming the .out file.

    DrEmmettBrown_0-1604680997244.png

     

     

    Mahalingam
    Occasional Contributor

    Re: Source not found when debugging any XDK project using segger j-link plus

    Hello DrEmmettBrown

    Debugging is not supported with XDK device having bootloader version above v0.0.10. It is known limitation in XDK Workbench.

    You can Flash bootloader version v0.0.10 and try to debug the application.

    I am able to debug the application with v0.0.10 bootloader version. I have shared screenshot for your reference,

    Debugging_in_Workbench.png

    Mahalingam
    Occasional Contributor

    Re: Source not found when debugging any XDK project using segger j-link plus

    Hello DrEmmettBrown,

    The Reason why you are getting "Application Firmware Corrupted" message in console,

    When you tried to debug the application with XDK device with v1.2.0 Bootloader version.

    Device has to go Application mode. But Device didn't  go to Application mode. Device remains in the Bootloader mode itself. You can see Red and Yellow LED ON in your XDK device and Mode remains in Bootloader in Workbench.

    Device_in_Bootloader_Mode.png

    During debug mode, When the device is in Bootloader mode, If you press the button 2, there is possibility of firmware corruption. That is the reason why you are getting "Application Firmware Corrupted" message in console.

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist