Migration v2.7.0 to v2.8.0 crashes before main() is reached

Hi,

I'm having Bluetooth LE peripheral nus code which works fine with v2.7.0 with nrf52840DK (I can connect with an Android App and stream data etc):

  Memory region         Used Size  Region Size  %age Used
            FLASH:      345312 B         1 MB     32.93%
              RAM:      118976 B       256 KB     45.39%


Changing the build configuration to v2.8.0, without any changes produces a much bigger flash:

Memory region         Used Size  Region Size  %age Used
           FLASH:      340640 B     474624 B     71.77%
             RAM:      115112 B       256 KB     43.91%


but the startup never reaches main, the debugger shows

JLinkGDBServerCLExe:
=thread-group-added,id="i1"
=cmd-param-changed,param="pagination",value="off"
0xfffffffe in ?? ()
Program received signal SIGTRAP, Trace/breakpoint trap.
0xfffffffe in ?? ()


These are some compile warnings (which I don't yet know how to address):

warning: NCS_SAMPLE_MCUMGR_BT_OTA_DFU (defined at
/home/bledev/ncs/v2.8.0/nrf/samples/common/mcumgr_bt_ota_dfu/Kconfig:9) was assigned the value 'y'
but got the value 'n'. Check these unsatisfied dependencies: BOOTLOADER_MCUBOOT (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU and/or look up
NCS_SAMPLE_MCUMGR_BT_OTA_DFU in the menuconfig/guiconfig interface. The Application Development
Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual
might be helpful too.


warning: IMG_ERASE_PROGRESSIVELY (defined at
/home/bledev/ncs/v2.8.0/nrf/samples/common/mcumgr_bt_ota_dfu/Kconfig:45, subsys/dfu/Kconfig:69) was
assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies:
(NCS_SAMPLE_MCUMGR_BT_OTA_DFU || (MCUBOOT_IMG_MANAGER && IMG_MANAGER)) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_IMG_ERASE_PROGRESSIVELY and/or look up
IMG_ERASE_PROGRESSIVELY in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.

-- Found partition manager static configuration : /home/bledev/bleproj_z/pm_static.yml
Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
CMake Warning at /home/bledev/ncs/v2.8.0/nrf/cmake/sysbuild/partition_manager.cmake:188 (message):
  MCUboot padding partition size is 0x200 but signing uses , please adjust
  `PM_MCUBOOT_PAD` value in sysbuild Kconfig to 0x200.
Call Stack (most recent call first):
  /home/bledev/ncs/v2.8.0/nrf/cmake/sysbuild/partition_manager.cmake:630 (partition_manager)
  /home/bledev/ncs/v2.8.0/nrf/sysbuild/CMakeLists.txt:661 (include)
  cmake/modules/sysbuild_extensions.cmake:583 (nrf_POST_CMAKE)
  cmake/modules/sysbuild_extensions.cmake:583 (cmake_language)
  cmake/modules/sysbuild_images.cmake:23 (sysbuild_module_call)
  cmake/modules/sysbuild_default.cmake:20 (include)
  /home/bledev/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  /home/bledev/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  /home/bledev/ncs/v2.8.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  template/CMakeLists.txt:10 (find_package)


Do you have any idea on how to proceed?

Thank you
Marcel

Parents
  • Hello,

    The warnings you shared are mostly related to configuration issues. Please check if there are any unmet dependencies for the configurations you have enabled. You can use the Kconfig reference for this. Additionally, some warnings pertain to OTA_DFU and the bootloader. You might consider disabling the DFU feature in the application to see if that allows the rest of the application to function correctly.

    I'd suggest taking a look at the migration guide to make sure you've covered all the important steps, especially the ones that could affect your setup (if any).

    Kind Regards,

    Abhijith

  • I have taken over the project and am still fishing in the empty air,
    this is the situation when upgrading to ncs 2.8.0 or 2.9.0


    Deleting the bleproj_z/pm_static.yml file and the firmware runs fine.
    With 2.7.0 pm_static.yml was OK.

    So the pure presence of pm_static.yml breaks the firmware, it is not booting any more.

    I think I need the pm_static.yml to be able to make OTA for the devices out there still running with ncs 2.6.2

    What could be the reason, here the pm_static.yml from my developer predecessor, he got it from Nordic @Bell:

    app:
    address: 0x10200
    end_address: 0x84000
    region: flash_primary
    size: 0x73e00
    mcuboot:
    address: 0x0
    end_address: 0x10000
    placement:
    before:
    - mcuboot_primary
    region: flash_primary
    size: 0x10000
    mcuboot_pad:
    address: 0x10000
    end_address: 0x10200
    placement:
    align:
    start: 0x1000
    before:
    - mcuboot_primary_app
    region: flash_primary
    size: 0x200
    mcuboot_primary:
    address: 0x10000
    end_address: 0x84000
    orig_span: &id001
    - app
    - mcuboot_pad
    region: flash_primary
    sharers: 0x1
    size: 0x74000
    span: *id001
    mcuboot_primary_app:
    address: 0x10200
    end_address: 0x84000
    orig_span: &id002
    - app
    region: flash_primary
    size: 0x73e00
    span: *id002
    mcuboot_secondary:
    address: 0x84000
    end_address: 0xf8000
    placement:
    after:
    - mcuboot_primary
    align:
    start: 0x1000
    region: flash_primary
    share_size:
    - mcuboot_primary
    size: 0x74000
    settings_storage:
    address: 0xf8000
    end_address: 0x100000
    placement:
    align:
    start: 0x1000
    before:
    - end
    region: flash_primary
    size: 0x8000
    sram_primary:
    address: 0x20000000
    end_address: 0x20040000
    region: sram_primary
    size: 0x40000
Reply
  • I have taken over the project and am still fishing in the empty air,
    this is the situation when upgrading to ncs 2.8.0 or 2.9.0


    Deleting the bleproj_z/pm_static.yml file and the firmware runs fine.
    With 2.7.0 pm_static.yml was OK.

    So the pure presence of pm_static.yml breaks the firmware, it is not booting any more.

    I think I need the pm_static.yml to be able to make OTA for the devices out there still running with ncs 2.6.2

    What could be the reason, here the pm_static.yml from my developer predecessor, he got it from Nordic @Bell:

    app:
    address: 0x10200
    end_address: 0x84000
    region: flash_primary
    size: 0x73e00
    mcuboot:
    address: 0x0
    end_address: 0x10000
    placement:
    before:
    - mcuboot_primary
    region: flash_primary
    size: 0x10000
    mcuboot_pad:
    address: 0x10000
    end_address: 0x10200
    placement:
    align:
    start: 0x1000
    before:
    - mcuboot_primary_app
    region: flash_primary
    size: 0x200
    mcuboot_primary:
    address: 0x10000
    end_address: 0x84000
    orig_span: &id001
    - app
    - mcuboot_pad
    region: flash_primary
    sharers: 0x1
    size: 0x74000
    span: *id001
    mcuboot_primary_app:
    address: 0x10200
    end_address: 0x84000
    orig_span: &id002
    - app
    region: flash_primary
    size: 0x73e00
    span: *id002
    mcuboot_secondary:
    address: 0x84000
    end_address: 0xf8000
    placement:
    after:
    - mcuboot_primary
    align:
    start: 0x1000
    region: flash_primary
    share_size:
    - mcuboot_primary
    size: 0x74000
    settings_storage:
    address: 0xf8000
    end_address: 0x100000
    placement:
    align:
    start: 0x1000
    before:
    - end
    region: flash_primary
    size: 0x8000
    sram_primary:
    address: 0x20000000
    end_address: 0x20040000
    region: sram_primary
    size: 0x40000
Children
No Data
Related