An error occurs when you use "Flash" in Visual Studio Code

Greetings,

I want to write the nRF Connect SDK v2.0.0 sample "nrf9160/https_client" to the nRF9160-DK,
but when I use "Flash" in Visual Studio Code, the following error occurs.

ERROR: The JLinkARM DLL timed out while communicating to the J-Link probe.
ERROR: If the error condition persists, run the same command again with
ERROR: argument -- log, contact Nordic Semiconductor and provide the generated
ERROR: log.log file to them.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.
FATAL ERROR: command exited with status 35: nrfjprog --program 'C:\Users\protec\Desktop\https_client\build\zephyr\merged.hex' --chiperase --verify -f NRF91 --snr 960007184

My build settings are as follows, am I doing something wrong?

I would be happy to get your advice.

Parents Reply Children
  • Hi,

    The terminal emulator for the https_client sample would be to see the logs from the sample.

    You can enable AT commands in the https_client sample by adding the following lines, which I found in the at_client/prj.conf:

    # AT host library
    CONFIG_AT_HOST_LIBRARY=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    

    Regards,
    Sigurd Hellesvik

  • Thank you for your answer.

    How do you use a terminal emulator?
    Where can i download it?
    I would like to debug the nRF9160-DK to see if the https_client sample is written correctly.

    Thank you for your reply regarding the AT command. I'll give it a try.

  • Hi,

    There are multiple alternatives for Terminal Emulators. Here are some I suggest:

    If you use VS Code, you can use the Integrated Serial Terminal.

    Or you can use the LTE Link Monitor in the nRF Connect for Desktop.

    Regards,
    Sigurd Hellesvik

  • Hi,

    I tried building and debugging the sample "https_client" using the method described here.
    But debugging fails. Debugging stops prematurely because the source file cannot be found.

    The settings and extended functions when creating the application, and the contents of the output are as follows.

    Settings

    extension

    output

    We will also send you the logs output during build, flash, and debug, so please check them.

    log_build.txt

    Flashing build to undefined
    west flash -d c:\Users\protec\Desktop\https_client\build --skip-rebuild -r nrfjprog --dev-id 960007184
    
    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: Flashing file: C:\Users\protec\Desktop\https_client\build\zephyr\merged.hex
    Parsing image file.
    Verifying programming.
    Verified OK.
    Applying pin reset.
    -- runners.nrfjprog: Board with serial number 960007184 flashed successfully.

    Cortex-Debug: VSCode debugger extension version 1.6.0 git(3026299). Usaage info: https://github.com/Marus/cortex-debug#usage
    Warn: c:/Users/protec/Desktop/https_client/build/zephyr/merged.hex is not an ELF file format. Some features won't work -- Globals, Locals, disassembly, etc.Launching GDB: "c:\\ncs\\toolchains\\v2.0.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb-no-py.exe" -q --interpreter=mi2
        IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here. Very helpful to debug issues or report problems
    Launching gdb-server: "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF9160_xxAA -select usb=960007184 -rtos "C:\\Program Files (x86)\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll"
        Please check TERMINAL tab (gdb-server) for output from C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe
    GNU gdb (Zephyr SDK 0.14.1) 9.2
    Copyright (C) 2020 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Type "show copying" and "show warranty" for details.
    This GDB was configured as "--host=x86_64-host_w64-mingw32 --target=arm-zephyr-eabi".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <https://github.com/zephyrproject-rtos/sdk-ng/issues>.
    Find the GDB manual and other documentation resources online at:
        <http://www.gnu.org/software/gdb/documentation/>.
    
    For help, type "help".
    Type "apropos word" to search for commands related to "word".
    0x0001244e in ?? ()
    Program stopped, probably due to a reset and/or halt issued by debugger
    add symbol table from file "c:/Users/protec/Desktop/https_client/build/zephyr/zephyr.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Users/protec/Desktop/https_client/build/zephyr/zephyr.elf...
    add symbol table from file "c:/Users/protec/Desktop/https_client/build/tfm/bin/tfm_s.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Users/protec/Desktop/https_client/build/tfm/bin/tfm_s.elf...
    Reading symbols from c:/Users/protec/Desktop/https_client/build/zephyr/zephyr.elf...
    add symbol table from file "c:/Users/protec/Desktop/https_client/build/tfm/bin/tfm_s.elf"
    (y or n) [answered Y; input not from terminal]
    Reading symbols from c:/Users/protec/Desktop/https_client/build/tfm/bin/tfm_s.elf...
    2
    Resetting target
    [New Remote target]
    [New Thread 536955656]
    [New Thread 536956032]
    [Switching to Thread 536955840]
    
    Thread 2 hit Temporary breakpoint 1, main () at C:/ncs/v2.0.0/modules/tee/tf-m/trusted-firmware-m/secure_fw/spm/cmsis_psa/main.c:130
    130	    __ASM volatile(
    [New Remote target]

    build settings

    I would be very happy if you could tell me how to solve it.

    (In this state, nothing was displayed even when connected to LTE Link Monitor.)

  • Hi,

    Try to program the nRF9160DK using "Flash" instead of "Debug". Doe you get log in this case?

    Also have a look at https://academy.nordicsemi.com/ to get started. It is a very useful guide to using the nRF Connect SDK.

    Regards,
    Sigurd Hellesvik

Related