Looking for nRF9160 SLM hex file and source code

1. Planning to use nrF9160 SLM into our product, looking for SLM hex file but didn't get it online. Can you please share the nRF9160 SLM hex file or provide the link where can we get it.

2. I have tried to compile the serial lte modem sample code located at "\nrf\applications\serial_lte_modem" but the hex file is didn't generated. Am I missing anything?

Parents
  • Hi Sravan,

    1. Planning to use nrF9160 SLM into our product, looking for SLM hex file but didn't get it online. Can you please share the nRF9160 SLM hex file or provide the link where can we get it.

    Here are two ways to program nRF9160 DK with a prebuilt .hex:

    Program using Cellular Monitor

    1. Open the app Cellular Monitor from nRF Connect for Desktop.
    2. Select your device to the upper left.
    3. Scroll down to the white Program device button under Advanced options.
    4. Then select Serial LTE Modem and program the device, with or without the corresponding modem firwmare.

    Quick Start

    1. Open Quick Start, found in nRF Connect for Desktop.
    2. Follow or skip steps until you are asked to select application
    3. Choose AT Commands to get Serial LTE Modem.

    2. I have tried to compile the serial lte modem sample code located at "\nrf\applications\serial_lte_modem" but the hex file is didn't generated. Am I missing anything?

    The build folder in your project folder should contain the .hex files. The file merged.hex contains the built applilcation including bootloader.

    Exercise 2 in the nRF Connect SDK Fundamentals course at DevAcademy takes you through the steps to build and flash a sample.

  • Hi Team,

    I have looked at the terminal output in visual studio and it shows the FATAL error. What am I missing anything?

    I am able to build 'blinky' sample code successfully but getting FATAL error when I have build the 'serial_lte_modem' sample code. Can you please guide me to build successfully.

    Terminal console screenshot:

    Regards,

    Sravan Rikka

Reply Children
  • Hi Sravan,

    sravan.rikka said:
    Can you please guide me to build successfully.

    Building serial_lte_modem should in theory follow more or less the same procedure as building blinky. Have you followed the steps in the DevAcademy tutorial that I linked? Here is an alternative guide: Developing with nRF9160 DK: Building and programming.

    sravan.rikka said:
    I am able to build 'blinky' sample code successfully but getting FATAL error when I have build the 'serial_lte_modem' sample code. Can you please guide me to build successfully.

    Is this an unmodified version of serial_lte_modem? Which nRF Connect SDK are you using? And which board are you building for?

    sravan.rikka said:
    Terminal console screenshot:

    Would you be able to share the full build log? We recommend using the Insert->Code functionality for readability.

    Best regards,
    HĂĄkon

  • Yes, it is unmodified version of serial_lte_modem.

    Build log:

    Executing task: nRF Connect: Build: serial_lte_modem_sample/build (active)
    
    Building serial_lte_modem_sample
    C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/Sravan/Programs/GIT_Repository/CL5G/serial_lte_modem_sample/build c:/Sravan/Programs/GIT_Repository/CL5G/serial_lte_modem_sample"
    
    [0/175] Performing build step for 'tfm'
    ninja: no work to do.
    [19/172] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DAPP_VERSION=v2.5.0 -DEXT_API_MAGIC=0x281ee6de,0xb845acea,23298 -DFIRMWARE_INFO_MAGIC=0x281ee6de,0x8fcebb4c,23298 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FILE=\"nrf-config-user.h\" -DNRF9160_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -DPICOLIBC_DOUBLE_PRINTF_SCANF -DTFM_PSA_API -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include -Izephyr/include/generated -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/soc/arm/nordic_nrf/common/. -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/subsys/net/lib/sockets/. -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/subsys/net/ip -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/subsys/settings/include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrf/include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrf/lib/at_cmd_parser/include -Itfm/install/interface/include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrf/subsys/net/lib/nrf_cloud/./include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrf/subsys/net/lib/fota_download/./include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrf/include/tfm -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrf/tests/include -Itfm/generated/interface/include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/modules/lib/cjson -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrf/modules/cjson/include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/modules/hal/cmsis/CMSIS/Core/Include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/modules/cmsis/. -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/modules/hal/nordic/nrfx -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/modules/hal/nordic/nrfx/drivers/include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/modules/hal/nordic/nrfx/mdk -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/modules/hal_nordic/nrfx/. -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/modules/debug/segger/SEGGER -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/modules/debug/segger/Config -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrfxlib/nrf_modem/include -I../src/gnss/. -I../src/nrfcloud/. -I../src/ftp_c/. -I../src/mqtt_c/. -I../src/http_c/. -I../src/gpio/. -I../src -Imodules/nrf/subsys/nrf_security/src/include/generated -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrf/subsys/nrf_security/include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrf/ext/oberon/psa/core/include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrf/ext/oberon/psa/core/library -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/modules/crypto/mbedtls/include -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/modules/crypto/mbedtls/library -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/nrfxlib/crypto/nrf_oberon/include -fno-strict-aliasing -Os -imacros C:/Sravan/Programs/GIT_Repository/CL5G/serial_lte_modem_sample/build/zephyr/include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/Sravan/Programs/GIT_Repository/CL5G/serial_lte_modem_sample=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -D_POSIX_THREADS -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c
    In file included from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/toolchain.h:50,
    from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/sys/__assert.h:11,
    from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/sys/iterable_sections.h:10,
    from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/logging/log_instance.h:10,
    from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/logging/log.h:10,
    from ../src/main.c:6:
    C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/toolchain/gcc.h:81:36: error: static assertion failed: "Wake up pin not configured"
    81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~~~~~~~~~~~~
    ../src/main.c:49:1: note: in expansion of macro 'BUILD_ASSERT'
    49 | BUILD_ASSERT(CONFIG_SLM_WAKEUP_PIN >= 0, "Wake up pin not configured");
    | ^~~~~~~~~~~~
    In file included from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/sys/util.h:17,
    from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/sys/cbprintf_internal.h:15,
    from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/sys/cbprintf.h:124,
    from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/logging/log_msg.h:11,
    from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/logging/log_core.h:9,
    from C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/logging/log.h:11:
    ../src/main.c: In function 'gpio_cb_func':
    C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/sys/util_macro.h:44:22: warning: left shift count is negative [-Wshift-count-negative]
    44 | #define BIT(n) (1UL << (n))
    | ^~
    ../src/main.c:191:14: note: in expansion of macro 'BIT'
    191 | if ((BIT(CONFIG_SLM_WAKEUP_PIN) & pins) == 0) {
    | ^~~
    ../src/main.c: In function 'enter_idle':
    C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/sys/util_macro.h:44:22: warning: left shift count is negative [-Wshift-count-negative]
    44 | #define BIT(n) (1UL << (n))
    | ^~
    ../src/main.c:226:52: note: in expansion of macro 'BIT'
    226 | gpio_init_callback(&gpio_cb, gpio_cb_func, BIT(CONFIG_SLM_WAKEUP_PIN));
    | ^~~
    [32/172] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/__/common/tls.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\Sravan\Programs\GIT_Repository\CL5G\serial_lte_modem_sample\build'
    
    * The terminal process terminated with exit code: 1.
    * Terminal will be reused by tasks, press any key to close it.

  • Hello,

    Did you find anything wrong in  the build log? Can you please respond.

  • Have you selected nrf9160_nrf9160_ns your builld target? Or are you building for a custom board?

    This looks like where the build starts to fail:

    C:/Sravan/Programs/GIT_Repository/CL5G/CL_R200/zephyr/include/zephyr/toolchain/gcc.h:81:36: error: static assertion failed: "Wake up pin not configured"
    81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~~~~~~~~~~~~
    ../src/main.c:49:1: note: in expansion of macro 'BUILD_ASSERT'
    49 | BUILD_ASSERT(CONFIG_SLM_WAKEUP_PIN >= 0, "Wake up pin not configured");

  • Yes, I am using nRF9160dk_nRF9160_ns while build target. What is your suggestion to resolve this.

Related