This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Mqtt_simple sample error.

Trying to up load mqtt_simple sample, however getting bus fault on terminal. have browsed after the same issue here, but don't work after doing git pull ect...

here's the output:

***** BUS FAULT *****


 
Precise data bus error


  
BFAR Address: 0x4002a514



***** Hardware exception 
*****


Current thread ID = 0x2000033c



Faulting instruction address = 0x70b8


Fatal 
fault in essential thread! Spinning...
Parents
  • Hello Henning, 

    Did you see this thread? Similar bus fault with the MQTT Simple Sample.

    Kind regards,
    Øyvind

  • Yess, gjorde alt på vei ned til ninja flash.     fikk dette ut på terminalen:

    C:\gnuarmemb\bin\arm-none-eabi-objcopy.exe: zephyr.hex 64-bit address 0x4b4fa300000000 out of range for Intel Hex file
    C:\gnuarmemb\bin\arm-none-eabi-objcopy.exe:zephyr.hex: bad value
    ninja: build stopped: subcommand failed

  • yess, am trying to use the command prompt and did it on friday. but now I get an another error there then I got on friday.

    warning: NET_RAW_MODE (defined at subsys\net\ip\Kconfig:12) was assigned the value 'y' but got the
    value 'n'. This symbol has no prompt, meaning assignments in configuration files have no effect on
    it. It can only be set indirectly, via Kconfig defaults (e.g. in a Kconfig.defconfig file) or
    through being 'select'ed or 'imply'd (note: try to avoid Kconfig 'select's except for trivial
    promptless "helper" symbols without dependencies, as it ignores dependencies and forces symbols on).
    YouParsing Kconfig tree in C:/Nordic/ncs/zephyr/Kconfig
    Loading C:/Nordic/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090_defconfig as base
    Merging C:/Nordic/ncs/nrf/samples/nrf9160/at_client/prj.conf
     can check symbol information (including dependencies) in the 'menuconfig' interface (see the
    Application Development Primer section of the manual), or in the Kconfig reference at
    docs.zephyrproject.org/.../CONFIG_NET_RAW_MODE.html (which is updated
    regularly from the master branch). See the 'Setting configuration values' section of the Board
    Porting Guide as well. It covers Kconfig.defconfig files.

    C:/Nordic/ncs/nrf/samples/nrf9160/at_client/prj.conf:1: warning: attempt to assign the value 'y' to the undefined symbol BSD_LIBRARY

    C:/Nordic/ncs/nrf/samples/nrf9160/at_client/prj.conf:6: warning: attempt to assign the value 'y' to the undefined symbol AT_HOST_LIBRARY

    Error: Aborting due to non-whitelisted Kconfig warning
    'C:/Nordic/ncs/nrf/samples/nrf9160/at_client/prj.conf:1: warning: attempt to assign the value 'y' to
    the undefined symbol BSD_LIBRARY'. Note: If this warning doesn't point to an actual problem, you can
    add it to the whitelist at the top of C:/Nordic/ncs/zephyr/scripts/kconfig/kconfig.py.

    CMake Error at C:/Nordic/ncs/zephyr/cmake/kconfig.cmake:191 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/Nordic/ncs/zephyr/cmake/app/boilerplate.cmake:397 (include)
      CMakeLists.txt:9 (include)


    -- Configuring incomplete, errors occurred!

    here am trying to flash AT_client, and is the same error on mqtt_simple and others.

    and if i use mqtt_simple with SES I'll get bus fault on the mqtt.

    regards

    Henning

  • Ok, that was not what I expected.

    Can you please elaborate your steps up to this point? 

    What versions of git repositories are you using? Remember, there are two repository tags that can be used for fw-nrfconnect-nrf: tag v0.3.0 or 0.3.99 (master branch).

    Maybe it is good to start from scratch. What did you use to start with the nRF9160 DK? Getting Started with the nRF91DKnRF Connect SDK v0.3.0 documentation or  nRF Connect SDK v0.3.99 documentation? The latter yields the issue as mentioned in the previous post (not able to use the master branch with Segger Embedded Studio (SES)). I would recommend using the first one (Getting Started....), which lets you use SES.

    Thank you,
    Øyvind

  • I've updated the master branch, git pull etc... when I flash it, I'm doing it exactly like the thread u posted. even tried to flash the cmake .. -DBOARD=nrf9160_pca10090ns -GNinja and cmake .. -DBOARD=nrf9160_pca10090 -GNinja.

    I think it's odd because I've erased and done everything from the start, but it will not flash the new one.

    So I tried to flash the old one v0.3.0 with a prompter, it works rigth away.

    i've stated with Getting Started with the nRF91DK,  I started with the nrf connect v2.6.2, and done everything there even verified all.

    I only have problem with the new v0.3.99

    regards

    Henning

  • I need to use mqtt_simple in my project. or do u have an another sample to transmitt data to a server?

    -Henning

  • henninglindseth said:
    m doing it exactly like the thread u posted. even tried to flash the cmake .. -DBOARD=nrf9160_pca10090ns -GNinja and cmake .. -DBOARD=nrf9160_pca10090 -GNinja.

     Can you please share the command prompt output when you run these commands? Are you in the correct folders when running these commands?

    So I tried to flash the old one v0.3.0 with a prompter, it works away.

    I need to use mqtt_simple in my project. or do u have sample to data to a server?

    Did you try to copy the mqtt_simple example to the v0.3.0 samples folder? Ensuring that you were using v0.3.0? 

    Did you try to open this example using Segger Embedded Studio Nordic Edition?

Reply
  • henninglindseth said:
    m doing it exactly like the thread u posted. even tried to flash the cmake .. -DBOARD=nrf9160_pca10090ns -GNinja and cmake .. -DBOARD=nrf9160_pca10090 -GNinja.

     Can you please share the command prompt output when you run these commands? Are you in the correct folders when running these commands?

    So I tried to flash the old one v0.3.0 with a prompter, it works away.

    I need to use mqtt_simple in my project. or do u have sample to data to a server?

    Did you try to copy the mqtt_simple example to the v0.3.0 samples folder? Ensuring that you were using v0.3.0? 

    Did you try to open this example using Segger Embedded Studio Nordic Edition?

Children
  • here the whole thing:


    USN+103438@S-HVE9127 MINGW64 /c/ncs
    $ export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb

    USN+103438@S-HVE9127 MINGW64 /c/ncs
    $ export GNUARMEMB_TOOLCHAIN_PATH=/c/gnuarmemb/

    USN+103438@S-HVE9127 MINGW64 /c/ncs
    $ source /c/ncs/zephyr/zephyr-env.sh

    USN+103438@S-HVE9127 MINGW64 /c/ncs
    $ cd /c/ncs/nrf/samples/nrf9160/mqtt_simple/

    USN+103438@S-HVE9127 MINGW64 /c/ncs/nrf/samples/nrf9160/mqtt_simple (master)
    $ mkdir build && cd build
    mkdir: cannot create directory ‘build’: File exists

    USN+103438@S-HVE9127 MINGW64 /c/ncs/nrf/samples/nrf9160/mqtt_simple (master)
    $ mkdir build && cd build

    USN+103438@S-HVE9127 MINGW64 /c/ncs/nrf/samples/nrf9160/mqtt_simple/build (master)
    $ cmake .. -DBOARD=nrf9160_pca10090ns -GNinja
    Zephyr version: 1.14.0
    -- Found PythonInterp: C:/Python37/python.exe (found suitable version "3.7.2", minimum required is "3.4")
    -- Selected BOARD nrf9160_pca10090ns
    -- Found west: C:/Python37/Scripts/west.exe (found suitable version "0.5.7", minimum required is "0.5.6")
    -- Loading C:/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns.dts as base
    -- Overlaying C:/ncs/zephyr/dts/common/common.dts
    Parsing Kconfig tree in C:/ncs/nrf/samples/nrf9160/mqtt_simple/Kconfig
    Loading C:/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns_defconfig as base
    Merging C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf

    C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf:11: warning: attempt to assign the value 'y' to the undefined symbol LTE_LINK_CONTROL

    C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf:12: warning: attempt to assign the value 'n' to the undefined symbol LTE_AUTO_INIT_AND_CONNECT

    C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf:15: warning: attempt to assign the value 'y' to the undefined symbol BSD_LIBRARY

    C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf:19: warning: attempt to assign the value 'y' to the undefined symbol AT_HOST_LIBRARY

    Error: Aborting due to non-whitelisted Kconfig warning
    'C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf:11: warning: attempt to assign the value 'y' to the
    undefined symbol LTE_LINK_CONTROL'. Note: If this warning doesn't point to an actual problem, you
    can add it to the whitelist at the top of C:/ncs/zephyr/scripts/kconfig/kconfig.py.

    CMake Error at C:/ncs/zephyr/cmake/kconfig.cmake:191 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/zephyr/cmake/app/boilerplate.cmake:397 (include)
      CMakeLists.txt:9 (include)


    -- Configuring incomplete, errors occurred!

    *******************************************************************************************************

    USN+103438@S-HVE9127 MINGW64 /c/ncs/nrf/samples/nrf9160/mqtt_simple/build (master)
    $ cmake .. -DBOARD=nrf9160_pca10090 -GNinja
    Zephyr version: 1.14.0
    CMake Warning at C:/ncs/zephyr/cmake/app/boilerplate.cmake:155 (message):
    The build directory must be cleaned pristinely when changing boards
    Call Stack (most recent call first):
    CMakeLists.txt:9 (include)


    -- Selected BOARD nrf9160_pca10090ns
    -- Found west: C:/Python37/Scripts/west.exe (found suitable version "0.5.7", minimum required is "0.5.6")
    -- Loading C:/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns.dts as base
    -- Overlaying C:/ncs/zephyr/dts/common/common.dts
    Parsing Kconfig tree in C:/ncs/nrf/samples/nrf9160/mqtt_simple/Kconfig
    Loading C:/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns_defconfig as base
    Merging C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf

    C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf:11: warning: attempt to assign the value 'y' to the undefined symbol LTE_LINK_CONTROL

    C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf:12: warning: attempt to assign the value 'n' to the undefined symbol LTE_AUTO_INIT_AND_CONNECT

    C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf:15: warning: attempt to assign the value 'y' to the undefined symbol BSD_LIBRARY

    C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf:19: warning: attempt to assign the value 'y' to the undefined symbol AT_HOST_LIBRARY

    Error: Aborting due to non-whitelisted Kconfig warning
    'C:/ncs/nrf/samples/nrf9160/mqtt_simple/prj.conf:11: warning: attempt to assign the value 'y' to the
    undefined symbol LTE_LINK_CONTROL'. Note: If this warning doesn't point to an actual problem, you
    can add it to the whitelist at the top of C:/ncs/zephyr/scripts/kconfig/kconfig.py.

    CMake Error at C:/ncs/zephyr/cmake/kconfig.cmake:191 (message):
    command failed with return code: 1
    Call Stack (most recent call first):
    C:/ncs/zephyr/cmake/app/boilerplate.cmake:397 (include)
    CMakeLists.txt:9 (include)


    -- Configuring incomplete, errors occurred!

    **************************************************************

    if the rigth folder is build, and before compiling its empty.

    yess, I have tried that, to copy it, tried it first before and tried it agian. however, the bus fault happen. the same bus fault as written at the topic.

    I think I've covered everything here on devzone to find out the issue. 

    --Henning

  • I have this issue as well. When the mqtt_simple example is compiled from the master branch using Cmake, the DK will report back a BUS FAULT.

    I have also tried copying the sample (and the Zephyr mqtt.h include file) into a v0.3.0 branch of the nRF connect repos and compiled it using both SEGGER Embedded Studio and Cmake. Both compile and flash but continue to report back BUS FAULTs.

  • Ok, here's and update, I managed to compile and build it over the command prompter, I opened up C:/ncs/zephyr/scripts/kconfig/kconfig.py in notepad and whitelisted the libraries that where in the error.

    # Warnings that won't be turned into errors (but that will still be printed),
    # identified by a substring of the warning. The warning texts from Kconfiglib
    # are guaranteed to not change.
    WARNING_WHITELIST = (
        # Warning generated when a symbol with unsatisfied dependencies is being
        # selected. These should be investigated, but whitelist them for now.
        "y-selected","BSD_LIBRARY","AT_HOST_LIBRARY","LTE_LINK_CONTROL","LTE_AUTO_INIT_AND_CONNECT",
    )

    however, now the ninja flash stop at the end because of.

    FAILED: CMakeFiles/app.dir/src/main.c.obj
    C:\gnuarmemb\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v1.13.99-ncs1-5782-g3e02cab5fb0f -DKERNEL -DNRF9160_XXAA -DNRF_TRUSTZONE_NONSECURE -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -IC:/ncs/zephyr/kernel/include -IC:/ncs/zephyr/arch/arm/include -IC:/ncs/zephyr/include -IC:/ncs/zephyr/include/drivers -Izephyr/include/generated -IC:/ncs/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/ncs/zephyr/soc/arm/nordic_nrf/include -IC:/ncs/zephyr/lib/libc/minimal/include -IC:/ncs/zephyr/ext/hal/cmsis/Include -IC:/ncs/zephyr/ext/hal/nordic/nrfx -IC:/ncs/zephyr/ext/hal/nordic/nrfx/drivers/include -IC:/ncs/zephyr/ext/hal/nordic/nrfx/hal -IC:/ncs/zephyr/ext/hal/nordic/nrfx/mdk -IC:/ncs/zephyr/ext/hal/nordic/. -IC:/ncs/zephyr/subsys/net/lib/sockets/. -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include-fixed -Os -nostdinc -g -Wall -Wformat -Wformat-security -Wno-format-zero-length -imacros C:/ncs/nrf/samples/nrf9160/mqtt_simple/build/zephyr/include/generated/autoconf.h -ffreestanding -Wno-main -fno-common -mthumb -mcpu=cortex-m33 -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -Wno-pointer-sign -Wno-unused-but-set-variable -fno-reorder-functions -fno-defer-pop -Werror=implicit-int -Wpointer-arith -ffunction-sections -fdata-sections -mabi=aapcs -march=armv8-m.main+dsp -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
    ../src/main.c:14:10: fatal error: lte_lc.h: No such file or directory
     #include <lte_lc.h>
              ^~~~~~~~~~
    compilation terminated.
    [125/133] Building C object zephyr/kernel/CMakeFiles/kernel.dir/poll.c.obj
    ninja: build stopped: subcommand failed.
    

  • Ok, there is something wrong with your SDK. Seems like the Zephyr is not aware of NRF, as the warnings are configurations that enable the use of nrf drivers/libraries in Zephyr.

    henninglindseth said:
    -- Found west: C:/Python37/Scripts/west.exe (found suitable version "0.5.7", minimum required is "0.5.6")

     Are you using west to update the master branch of the SDK? 
    Be aware that West was introduced after nRF Connect SDK v0.3.0. Therefore, you cannot use it to check out v0.1.0 or v0.3.0. More information here


    Can we try to start from scratch, with a new folder e.g. C:\NCS2

    In this folder run:

    git clone https://github.com/NordicPlayground/fw-nrfconnect-nrf.git nrf

    then

    west init -l nrf

    following with

    west update

    Now you have to setup the building environment:

    In NCS2
    
    cd zephyr
    
    zephyr-env.cmd

    Lastly add the file %userprofile%\zephyrrc.cmd with

    set ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
    set GNUARMEMB_TOOLCHAIN_PATH=/c/gnuarmemb/

    From this point, you should be able to continue with the mqtt_simple sample using nRF Connect SDK v0.3.99 (master).

    And if that this does not help, then we will find another solution. 

    -Øyvind

  • Hi Michael, 

    Can you please register a support case for your issue? 

    Thank you!

    BR,
    Øyvind

Related