This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

West does not build a merged.hex or app_update.bin

I am used to using Segger, but am switching to west for various reasons.  The main reason is to create a CI/CD pipeline.

I built a sample project with west, didn't see any errors, but I noticed there is no merged.hex or app_update.bin file produced in the build folder.  I am guessing west does things a bit differently than Segger.  What file should be used for DFU updates, if there is no app_update.bin.  What file should be flashed onto the board using J-Link, if not merged.hex?

chris@Christophers-MacBook-Pro rehab2fit-firmware % west build -b nrf52_r2f_bike_ctrl test/zephyr/samples/boards/nrf/clock_skew

[0/1] Re-running CMake...

Including boilerplate (Zephyr base (cached)): /opt/nordic/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake

CMake Deprecation Warning at /opt/nordic/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake:37 (cmake_policy):

  The OLD behavior for policy CMP0079 will be removed from a future version

  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all

  policies are deprecated and that a policy should be set to OLD only under

  specific short-term circumstances.  Projects should be ported to the NEW

  behavior and not rely on setting a policy to OLD.

Call Stack (most recent call first):

  /opt/nordic/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

  /opt/nordic/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)

  CMakeLists.txt:4 (find_package)

-- Application: /Users/chris/Dev/rehab2fit-firmware/test/zephyr/samples/boards/nrf/clock_skew

-- Using NCS Toolchain 1.7.1 for building. (/opt/nordic/ncs/v1.7.1/toolchain/cmake)

-- Zephyr version: 2.6.99 (/opt/nordic/ncs/v1.7.1/zephyr), build: v2.6.99-ncs1-1

-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")

-- Board: nrf52_r2f_bike_ctrl

-- Cache files will be written to: /Users/chris/Library/Caches/zephyr

-- Found dtc: /opt/nordic/ncs/v1.7.1/toolchain/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")

-- Found toolchain: gnuarmemb (/opt/nordic/ncs/v1.7.1/toolchain)

-- Found BOARD.dts: /opt/nordic/ncs/v1.7.1/zephyr/boards/arm/nrf52_r2f_bike_ctrl/nrf52_r2f_bike_ctrl.dts

nrf52_r2f_bike_ctrl.dts.pre.tmp:15.39-20.5: Warning (interrupt_provider): /soc/interrupt-controller@e000e100: Missing #address-cells in interrupt provider

  also defined at nrf52_r2f_bike_ctrl.dts.pre.tmp:298.7-300.3

-- Generated zephyr.dts: /Users/chris/Dev/rehab2fit-firmware/build/zephyr/zephyr.dts

-- Generated devicetree_unfixed.h: /Users/chris/Dev/rehab2fit-firmware/build/zephyr/include/generated/devicetree_unfixed.h

-- Generated device_extern.h: /Users/chris/Dev/rehab2fit-firmware/build/zephyr/include/generated/device_extern.h

-- Including generated dts.cmake file: /Users/chris/Dev/rehab2fit-firmware/build/zephyr/dts.cmake

Parsing /Users/chris/Dev/rehab2fit-firmware/test/zephyr/samples/boards/nrf/clock_skew/Kconfig

Loaded configuration '/opt/nordic/ncs/v1.7.1/zephyr/boards/arm/nrf52_r2f_bike_ctrl/nrf52_r2f_bike_ctrl_defconfig'

Merged configuration '/Users/chris/Dev/rehab2fit-firmware/test/zephyr/samples/boards/nrf/clock_skew/prj.conf'

Configuration saved to '/Users/chris/Dev/rehab2fit-firmware/build/zephyr/.config'

Kconfig header saved to '/Users/chris/Dev/rehab2fit-firmware/build/zephyr/include/generated/autoconf.h'

-- Configuring done

-- Generating done

-- Build files have been written to: /Users/chris/Dev/rehab2fit-firmware/build

[123/130] Linking C executable zephyr/zephyr_prebuilt.elf

[130/130] Linking C executable zephyr/zephyr.elf

Memory region         Used Size  Region Size  %age Used

           FLASH:       38400 B       512 KB      7.32%

            SRAM:        7144 B        64 KB     10.90%

        IDT_LIST:          0 GB         2 KB      0.00%

 

  • Hello Christopher,

    Does it make any difference if you add a “-p” at the end of the build command?

    west build -b nrf52_r2f_bike_ctrl test/zephyr/samples/boards/nrf/clock_skew -p

    Regards,

    Markus

  • It doesn't.  I am using west as recommended by the Zephyr Project, and zephyr.elf, zephyr.bin, zephyr.hex etc are build, but no merged.hex.  I am not using nrf connect sdk. I am guessing that the sdk helps with this automatically.

    However, I realized I missed a step on the Nordic tutorial:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/readme-zephyr.html

    The step where I am to build a bootloader. The tutorial instructions are a bit sparse.  

    Right now I have a board named "my_board" based on nrf52832.  A folder exists in zephyr/boards/arm/my_board with DTS files. Could you help me with the full command?  Do I need to copy that folder somewhere inside the boot folder? The directions have a ".." at the end and I am no expert.  I am stuck at this step.

    To build MCUboot, create a build directory in boot/zephyr, and build it as usual:

    cd boot/zephyr mkdir build && cd build
    cmake -GNinja -DBOARD=<board> .. ninja

  • Hello Christopher,

    yayembedded said:
    I am not using nrf connect sdk. I am guessing that the sdk helps with this automatically.

    Why aren’t you using the nRF Connect SDK? This is the recommended way to do from our side. Otherwise, you should raise the issue to the Zephyr support.

    Regards,

    Markus

  • I just googled how to build zephyr via command line and I followed some tutorials using west.  I had the nrf connect desktop sdk previously, but I built with Segger.  I didnt know the nrf connect sdk built upon zephyr and added extra tools to make life easier until yesterday. im going to try command line with NCS 

Related