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

zigbee coordinator example on nrf52840 dongle linker problem

When building the zigbee network_coordinator example for the nrf52840 dongle the merge.hex is linked to start at 0x0 in flash so the nrf connect programmer won't flash it to the stick.

In Kconfig the offset is configured as CONFIG_FLASH_LOAD_OFFSET=0x1000

The Zephyr blink example works.

Is there another hex-file? I'm trying to use ncs\v1.5.1\nrf\samples\zigbee\network_coordinator\build_nrf52840dongle_nrf52840\zephyr\merge.hex

Parents
  • Hi,

    I am afraid the network coordinator sample is not officially supported on the nRF52840 Dongle as of now, so we cannot guarantee that it will work. You can see a list of supported boards in the Requirements section of the sample's documentation.

    You are correct that you should use zephyr/merged.hex. I tested myself and also got that it started on 0x0. However, the NCP sample is supported on the Dongle, so I added some of the things related to the Dongle from that sample to the network coordinator sample, and it now starts on 0x1000.

    In CMakeLists.txt I added the following before find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}):

    # Increase size of MCUboot partition when building with MCUboot
    if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml"
        AND "prj_usb.conf" IN_LIST CONF_FILE)
      set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml
      )
    endif()
    
    # Include pm_static file to build for nRF52 dongle with nRF5 Bootloader
    if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml"
        AND ${BOARD} STREQUAL "nrf52840dongle_nrf52840")
      set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml
      )
    endif()

    In addition to this, I copied the board file nrf52840dongle_nrf52840.overlay from ncp/boards into network_coordinator/boards, as well as created a folder called configuration in the network coordinator folder, and added the nrf52840dongle_nrf52840 folder from ncp/configuration there (with the file pm_static.yml inside).

    I have not tested this on the Dongle myself, merely built it and checked the memory layout, so if the sample itself does not work, please let me know and I will check it out.

    Best regards,

    Marte

Reply
  • Hi,

    I am afraid the network coordinator sample is not officially supported on the nRF52840 Dongle as of now, so we cannot guarantee that it will work. You can see a list of supported boards in the Requirements section of the sample's documentation.

    You are correct that you should use zephyr/merged.hex. I tested myself and also got that it started on 0x0. However, the NCP sample is supported on the Dongle, so I added some of the things related to the Dongle from that sample to the network coordinator sample, and it now starts on 0x1000.

    In CMakeLists.txt I added the following before find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}):

    # Increase size of MCUboot partition when building with MCUboot
    if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml"
        AND "prj_usb.conf" IN_LIST CONF_FILE)
      set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml
      )
    endif()
    
    # Include pm_static file to build for nRF52 dongle with nRF5 Bootloader
    if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml"
        AND ${BOARD} STREQUAL "nrf52840dongle_nrf52840")
      set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml
      )
    endif()

    In addition to this, I copied the board file nrf52840dongle_nrf52840.overlay from ncp/boards into network_coordinator/boards, as well as created a folder called configuration in the network coordinator folder, and added the nrf52840dongle_nrf52840 folder from ncp/configuration there (with the file pm_static.yml inside).

    I have not tested this on the Dongle myself, merely built it and checked the memory layout, so if the sample itself does not work, please let me know and I will check it out.

    Best regards,

    Marte

Children
No Data
Related