How to measure DL/UL throughput with Thingy:91 ( no debbuger )

I would like to measure some basic parameters using Thingy:91.  Modem shell (MoSh) provides all the necessary tools. However, I was not able to build an image with iperf ( egion `FLASH' overflowed by 868 bytes) . Do I understand correctly that there is no other way to create such image when developing using USB flash ?

BR

Parents
  • Hi, 

    However, I was not able to build an image with iperf ( egion `FLASH' overflowed by 868 bytes)

    How do you build the Modem Shell sample? How do you modify the sample?

    In the Modem Shell sample, it already enables Iperf3 by CONFIG_MOSH_IPERF3=y

    Regards,
    Amanda H.

  • Hi ,

    I've modified prj.conf

    CONFIG_MOSH_IPERF3=y
    CONFIG_MOSH_SOCK=n
    CONFIG_MOSH_PING=n
    CONFIG_MOSH_CURL=n
    CONFIG_MOSH_LINK=y
    CONFIG_MOSH_SMS=n
    CONFIG_MOSH_GNSS=n
    CONFIG_MOSH_LOCATION=n

    and build failed with error

    region `FLASH' overflowed by 868 bytes

  • Any special reason to disable them?

    Without modification, it will not cause the overflow. 

    -Amanda H.

  • I intended to create a smaller image. Looks like I still have to learn a lot. I've prepared a clean build with following configuration

    CONFIG_MOSH_IPERF3=y
    CONFIG_MOSH_SOCK=y
    CONFIG_MOSH_PING=y
    CONFIG_MOSH_CURL=n
    CONFIG_MOSH_LINK=y
    CONFIG_MOSH_SMS=y
    CONFIG_MOSH_GNSS=n
    CONFIG_MOSH_LOCATION=n

    however iperf command is not visible

    Available commands:
      at                 :Execute an AT command.
      clear              :Clear screen.
      cloud_rest         :Send nRF Cloud command over REST
      date               :Date commands
      flash              :Flash shell commands
      heap               :Print heap usage statistics.
      help               :Prints the help message.
      history            :Command history.
      i2c                :I2C commands
      kernel             :Kernel commands
      link               :Commands for LTE link controlling and status information.
      log                :Commands for controlling logger
      nrf_clock_control  :Clock control commands
      ping               :For ping usage, just type "ping"
      print              :Commands for shell output formatting.
      regulator          :Regulator playground
      resize             :Console gets terminal screen size or assumes default in
                          case the readout fails. It must be executed after each
                          terminal width change to ensure correct text display.
      retval             :Print return value of most recent command
      shell              :Useful, not Unix-like shell commands.
      sleep              :Sleep for n seconds.
      startup_cmd        :Command to store MoSH commands to be run sequentially
                          after a bootup.
      uart               :Commands for disabling UARTs for power measurement.

  • finch said:
    I intended to create a smaller image.

    You could try to build with overlay-non-offloading.conf. 

    -Amanda H.

Reply Children
  • I did clean build

    overlay-non-offloading.conf

    CONFIG_MOSH_NRF91_NON_OFFLOADING_DEV=y

    CONFIG_MOSH_PPP=n
    CONFIG_MOSH_IPERF3=y
    CONFIG_MOSH_WORKER_THREADS=n
    CONFIG_MOSH_SOCK=n
    CONFIG_MOSH_PING=y
    CONFIG_MOSH_CURL=n
    CONFIG_MOSH_LINK=y
    CONFIG_MOSH_GNSS=n
    CONFIG_MOSH_SMS=n
    CONFIG_MOSH_LOCATION=n
    CONFIG_MOSH_REST=n
    CONFIG_MOSH_CLOUD_REST=n
    CONFIG_MOSH_AT_CMD_MODE=n
    CONFIG_MOSH_STARTUP_CMDS=n
    CONFIG_MOSH_FOTA=n

    Error :

    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
    cmd.exe /C "cd . && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe  -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf  && cmd.exe /C "cd /D C:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build_1\zephyr && C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.exe -E true""
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 15092 bytes
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build_1'

  • Do you only modify overlay-non-offloading.conf by CONFIG_MOSH_PING=y? 

    Are you able to build without issue with unmodified overlay-non-offloading.conf? 

  • same issue

    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
    cmd.exe /C "cd . && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe  -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf  && cmd.exe /C "cd /D C:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build\zephyr && C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.exe -E true""
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 21024 bytes
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build'

     *  The terminal process terminated with exit code: 1.
     *  Terminal will be reused by tasks, press any key to close it. 

    Is there modem_shell available for download with iperf ?

  • Hi, 

    Forget overlay-non-offloading.conf. Try to modify prj.conf with

    CONFIG_MOSH_IPERF3=y
    CONFIG_MOSH_SOCK=n
    CONFIG_MOSH_PING=n
    CONFIG_MOSH_CURL=n
    CONFIG_MOSH_LINK=y
    CONFIG_MOSH_SMS=n
    CONFIG_MOSH_GNSS=n
    CONFIG_MOSH_LOCATION=n
    CONFIG_MOSH_CLOUD_REST=n
    CONFIG_MOSH_AT_CMD_MODE=n
    CONFIG_MOSH_STARTUP_CMDS=y # This is needed by iperf3

    This set seems to compile for me and ~30kB (10%) free flash. 

    -Amanda H.

  • some symbols are missing

    FAILED: CMakeFiles/app.dir/src/fota/fota.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 -DPROJECT_NAME=MOSH -DTFM_PSA_API -DUSE_PARTITION_MANAGER=1 -D_ANSI_SOURCE -D_FORTIFY_SOURCE=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I../src -I../iperf -I../ping -I../utils -I../src/utils/. -I../src/uart/. -I../src/at/. -I../src/link/. -I../src/fota/. -I../src/rest/. -I../src/startup_cmd/. -I../src/cloud/. -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/ncs/v2.5.0/zephyr/lib/libc/newlib/include -IC:/ncs/v2.5.0/zephyr/include/zephyr/posix -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/zephyr/subsys/net/lib/sockets/. -IC:/ncs/v2.5.0/zephyr/subsys/net/ip -IC:/ncs/v2.5.0/zephyr/subsys/settings/include -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/ext/freebsd-getopt/. -IC:/ncs/v2.5.0/nrf/lib/at_cmd_parser/include -Itfm/install/interface/include -IC:/ncs/v2.5.0/nrf/subsys/net/lib/nrf_cloud/./include -IC:/ncs/v2.5.0/nrf/subsys/net/lib/fota_download/./include -IC:/ncs/v2.5.0/nrf/include/tfm -IC:/ncs/v2.5.0/nrf/tests/include -Itfm/generated/interface/include -IC:/ncs/v2.5.0/modules/lib/cjson -IC:/ncs/v2.5.0/nrf/modules/cjson/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/nrfxlib/nrf_modem/include -I../src/print/. -I../src/th/. -Imodules/nrf/subsys/nrf_security/src/include/generated -IC:/ncs/v2.5.0/nrf/subsys/nrf_security/include -IC:/ncs/v2.5.0/nrf/ext/oberon/psa/core/include -IC:/ncs/v2.5.0/nrf/ext/oberon/psa/core/library -IC:/ncs/v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/modules/crypto/mbedtls/library -IC:/ncs/v2.5.0/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.5.0/nrfxlib/crypto/nrf_oberon/include -IC:/ncs/v2.5.0/nrf/ext/iperf3/. -fno-strict-aliasing -Os -imacros C:/ncs/v2.5.0/nrf/samples/cellular/modem_shell/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:/ncs/v2.5.0/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 -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/ncs/v2.5.0/nrf/samples/cellular/modem_shell=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -D_POSIX_THREADS -std=c99 -MD -MT CMakeFiles/app.dir/src/fota/fota.c.obj -MF CMakeFiles\app.dir\src\fota\fota.c.obj.d -o CMakeFiles/app.dir/src/fota/fota.c.obj -c ../src/fota/fota.c
    ../src/fota/fota.c: In function 'fota_start':
    ../src/fota/fota.c:113:48: error: 'CONFIG_NRF_CLOUD_SEC_TAG' undeclared (first use in this function); did you mean 'CONFIG_NRF_CLOUD_AGNSS'?
      113 |         return fota_download_start(host, file, CONFIG_NRF_CLOUD_SEC_TAG, 0, 0);
          |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
          |                                                CONFIG_NRF_CLOUD_AGNSS
    ../src/fota/fota.c:113:48: note: each undeclared identifier is reported only once for each function it appears in
    ../src/fota/fota.c:114:1: warning: control reaches end of non-void function [-Wreturn-type]
      114 | }
          | ^
    [77/401] Building C object CMakeFiles/app.dir/src/link/link_shell.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build'

     *  The terminal process terminated with exit code: 1.
     *  Terminal will be reused by tasks, press any key to close it.

Related