Including a bootloader with an application

I want to include a dfu bootloader with an application.  I read here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_dev/bootloaders_and_dfu/bootloader_adding.htmlthat I should include "CONFIG_SECURE_BOOT=y" in the prj.conf file. However when I do I get this most enigmatic error message: "FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\v2.3.0\opt\bin\cmake.EXE' --build 'c:\Nordic\MyApps\blinky\build'" at build time.

If I remove the "CONFIG_SECURE_BOOT=y" from the prj.conf file, the application builds normally,

Regards,

Jerry

Parents
  • Hi,

    I have tested myself when nRF Secure Immutable Bootloader (NSIB) as immutable bootloader is set to be used, with following configuration option

    CONFIG_SECURE_BOOT=y


    and when adding mcuboot as upgradable bootloader is chosen with configuration options given below.
    CONFIG_SECURE_BOOT=y
    CONFIG_BOOTLOADER_MCUBOOT=y


    I could not reproduce your issue and did not see build error.

    You could try building your application from both VS Code and command line using "west build". In addition, you could try using NCS v2.4.0 instead of v2.3.0. Lastly, check if your build environment is working correctly.

    Best regards,
    Dejan

  • Hi Dejan,

    I am using sdk version

    Below is a screen snippet which shows an error:

    This is supposed to be fixed by a pristine build; it isn't.

    I have pasted in several of my project files; I apologize, but I can't figure out hoe to attach files to this interface.

    Here is my prj.conf file:

    CONFIG_USB_DEVICE_STACK=y
    CONFIG_USB_DEVICE_PRODUCT="Zephyr USB console sample"
    CONFIG_USB_DEVICE_PID=0x0004
    #CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n

    #CONFIG_SERIAL=y
    CONFIG_CONSOLE=y
    CONFIG_UART_CONSOLE=y
    CONFIG_UART_LINE_CTRL=y
    CONFIG_SECURE_BOOT=y
    CONFIG_BOOTLOADER_MCUBOOT=y

    Here is my terminal log for a pristine build:

    CMake Warning at C:/ncs/v2.4.0/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
    CONFIG_USB_DEVICE_VID has default value 0x2FE3.

    This value is only for testing and MUST be configured for USB products.


    CMake Warning at C:/ncs/v2.4.0/zephyr/subsys/usb/device/CMakeLists.txt:28 (message):
    CONFIG_USB_DEVICE_PID has default value 0x100.

    This value is only for testing and MUST be configured for USB products.


    CMake Warning at C:/ncs/v2.4.0/nrf/lib/flash_patch/CMakeLists.txt:8 (message):

    ----------------------------------------------------------
    --- WARNING: To maintain the integrity of secure boot, ---
    --- enable CONFIG_DISABLE_FLASH_PATCH in production. ---
    ----------------------------------------------------------


    CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:838 (message):
    No SOURCES given to Zephyr library: lib__libc__common

    Excluding target from build.


    MCUBoot bootloader key file: C:/ncs/v2.4.0/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Nordic/MyApps/console_example/build_dongle_db/mcuboot
    === child image mcuboot - end ===

    CMake Warning at C:/ncs/v2.4.0/nrf/modules/mcuboot/CMakeLists.txt:310 (message):

    ---------------------------------------------------------
    --- WARNING: Using default MCUBoot key, it should not ---
    --- be used for production. ---
    ---------------------------------------------------------

    CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:838 (message):
    No SOURCES given to Zephyr library: lib__libc__common

    Excluding target from build.


    Traceback (most recent call last):
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 1993, in <module>
    main()
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 1028, in main
    solution.update(solve_region(pm_config, region, region_config,
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 971, in solve_region
    get_region_config(partitions, region_config, static_partitions, system_reqs=pm_config)
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 758, in get_region_config
    solve_complex_region(pm_config, start, size, placement_strategy, region_name, device, static_conf,
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 865, in solve_complex_region
    solution, sub_partitions = resolve(pm_config, dp, system_reqs)
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 308, in resolve
    solve_direction(reqs, sub_partitions, unsolved, solution, 'after')
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 198, in solve_direction
    anchor = current if current in solution else next(solved for solved in reversed(solution)
    StopIteration
    CMake Error at C:/ncs/v2.4.0/nrf/cmake/partition_manager.cmake:304 (message):
    Partition Manager failed, aborting. Command:
    C:/ncs/toolchains/v2.3.0/opt/bin/python.exe;C:/ncs/v2.4.0/nrf/scripts/partition_manager.py;--input-f
    Call Stack (most recent call first):
    C:/ncs/v2.4.0/zephyr/cmake/modules/kernel.cmake:247 (include)
    C:/ncs/v2.4.0/zephyr/cmake/modules/zephyr_default.cmake:124 (include)
    C:/ncs/v2.4.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
    C:/ncs/v2.4.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    CMakeLists.txt:4 (find_package)


    -- Configuring incomplete, errors occurred!
    See also "C:/Nordic/MyApps/console_example/build_dongle_db/CMakeFiles/CMakeOutput.log".
    See also "C:/Nordic/MyApps/console_example/build_dongle_db/CMakeFiles/CMakeError.log".
    FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\v2.3.0\opt\bin\cmake.EXE' '-DWEST_PYTHON

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

    This is my nrf52480dongle_nrf52480.dts file:\

    /*
    * Copyright (c) 2018-2023 Nordic Semiconductor ASA
    * Copyright (c) 2017 Linaro Limited
    *
    * SPDX-License-Identifier: Apache-2.0
    */

    /dts-v1/;
    #include <nordic/nrf52840_qiaa.dtsi>
    #include "nrf52840dongle_nrf52840-pinctrl.dtsi"

    / {
    model = "Nordic nRF52840 Dongle NRF52840";
    compatible = "nordic,nrf52840-dongle-nrf52840";

    chosen {
    zephyr,console = &cdc_acm_uart;
    zephyr,shell-uart = &cdc_acm_uart;
    zephyr,uart-mcumgr = &cdc_acm_uart;
    zephyr,bt-mon-uart = &cdc_acm_uart;
    zephyr,bt-c2h-uart = &cdc_acm_uart;
    zephyr,sram = &sram0;
    zephyr,flash = &flash0;
    zephyr,code-partition = &slot0_partition;
    zephyr,ieee802154 = &ieee802154;
    };

    leds {
    compatible = "gpio-leds";
    led0_green: led_0 {
    gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
    label = "Green LED 0";
    };
    led1_red: led_1 {
    gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
    label = "Red LED 1";
    };
    led1_green: led_2 {
    gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
    label = "Green LED 1";
    };
    led1_blue: led_3 {
    gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
    label = "Blue LED 1";
    };
    };

    pwmleds {
    compatible = "pwm-leds";
    red_pwm_led: pwm_led_0 {
    pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
    };
    green_pwm_led: pwm_led_1 {
    pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
    };
    blue_pwm_led: pwm_led_2 {
    pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
    };
    };

    buttons {
    compatible = "gpio-keys";
    button0: button_0 {
    gpios = <&gpio1 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
    label = "Push button switch 0";
    };
    };

    /* These aliases are provided for compatibility with samples */
    aliases {
    sw0 = &button0;
    led0 = &led0_green;
    led1 = &led1_red;
    led2 = &led1_green;
    led3 = &led1_blue;
    led0-green = &led0_green;
    led1-red = &led1_red;
    led1-green = &led1_green;
    led1-blue = &led1_blue;
    pwm-led0 = &red_pwm_led;
    pwm-led1 = &green_pwm_led;
    pwm-led2 = &blue_pwm_led;
    red-pwm-led = &red_pwm_led;
    green-pwm-led = &green_pwm_led;
    blue-pwm-led = &blue_pwm_led;
    mcuboot-button0 = &button0;
    mcuboot-led0 = &led0_green;
    watchdog0 = &wdt0;
    };
    };

    &adc {
    status = "okay";
    };

    &gpiote {
    status = "okay";
    };

    &gpio0 {
    status = "okay";
    };

    &gpio1 {
    status = "okay";
    };

    &uart0 {
    compatible = "nordic,nrf-uarte";
    status = "okay";
    current-speed = <115200>;
    pinctrl-0 = <&uart0_default>;
    pinctrl-1 = <&uart0_sleep>;
    pinctrl-names = "default", "sleep";
    };

    &i2c0 {
    compatible = "nordic,nrf-twi";
    status = "okay";
    pinctrl-0 = <&i2c0_default>;
    pinctrl-1 = <&i2c0_sleep>;
    pinctrl-names = "default", "sleep";
    };

    &i2c1 {
    compatible = "nordic,nrf-twi";
    /* Cannot be used together with spi1. */
    /* status = "okay"; */
    pinctrl-0 = <&i2c1_default>;
    pinctrl-1 = <&i2c1_sleep>;
    pinctrl-names = "default", "sleep";
    };

    &pwm0 {
    status = "okay";
    pinctrl-0 = <&pwm0_default>;
    pinctrl-1 = <&pwm0_sleep>;
    pinctrl-names = "default", "sleep";
    };

    /*
    * By default, not adding all available SPI instances (spi2, spi3) due to
    * limited GPIOs available on dongle board.
    */
    &spi0 {
    compatible = "nordic,nrf-spi";
    /* Cannot be used together with i2c0. */
    /* status = "okay"; */
    pinctrl-0 = <&spi0_default>;
    pinctrl-1 = <&spi0_sleep>;
    pinctrl-names = "default", "sleep";
    };

    &spi1 {
    compatible = "nordic,nrf-spi";
    status = "okay";
    pinctrl-0 = <&spi1_default>;
    pinctrl-1 = <&spi1_sleep>;
    pinctrl-names = "default", "sleep";
    };

    &ieee802154 {
    status = "okay";
    };

    /* Include flash partition table.
    * Two partition tables are available:
    * fstab-stock -compatible with Nordic nRF5 bootloader, default
    * fstab-debugger -to use an external debugger, w/o the nRF5 bootloader
    */
    #include "fstab-stock.dts"

    zephyr_udc0: &usbd {
    compatible = "nordic,nrf-usbd";
    status = "okay";

    cdc_acm_uart: cdc_acm_uart {
    compatible = "zephyr,cdc-acm-uart";
    };
    };

    Here is my cmakelsts.txt file:

    # SPDX-License-Identifier: Apache-2.0

    cmake_minimum_required(VERSION 3.20.0)
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(console)

    FILE(GLOB app_sources src/*.c)
    target_sources(app PRIVATE ${app_sources})

    This is my overlay file:

    /*
    * Copyright (c) 2021 Nordic Semiconductor ASA
    *
    * SPDX-License-Identifier: Apache-2.0
    */

    / {
    chosen {
    zephyr,console = &cdc_acm_uart0;
    };
    };

    &zephyr_udc0 {
    cdc_acm_uart0: cdc_acm_uart0 {
    compatible = "zephyr,cdc-acm-uart";
    };
    };

    This is my main.c file:

    /*
    * Copyright (c) 2016 Intel Corporation.
    *
    * SPDX-License-Identifier: Apache-2.0
    */

    #include <zephyr/kernel.h>
    #include <zephyr/sys/printk.h>
    #include <zephyr/usb/usb_device.h>
    #include <zephyr/usb/usbd.h>
    #include <zephyr/drivers/uart.h>
    #include <stdio.h>

    BUILD_ASSERT(DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_console), zephyr_cdc_acm_uart),
    "Console device is not ACM CDC UART device");

    #if IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT)
    USBD_CONFIGURATION_DEFINE(config_1,
    USB_SCD_SELF_POWERED,
    200);

    USBD_DESC_LANG_DEFINE(sample_lang);
    USBD_DESC_STRING_DEFINE(sample_mfr, "ZEPHYR", 1);
    USBD_DESC_STRING_DEFINE(sample_product, "Zephyr USBD ACM console", 2);
    USBD_DESC_STRING_DEFINE(sample_sn, "0123456789ABCDEF", 3);

    USBD_DEVICE_DEFINE(sample_usbd,
    DEVICE_DT_GET(DT_NODELABEL(zephyr_udc0)),
    0x2fe3, 0x0001);

    static int enable_usb_device_next(void)
    {
    int err;

    err = usbd_add_descriptor(&sample_usbd, &sample_lang);
    if (err) {
    return err;
    }

    err = usbd_add_descriptor(&sample_usbd, &sample_mfr);
    if (err) {
    return err;
    }

    err = usbd_add_descriptor(&sample_usbd, &sample_product);
    if (err) {
    return err;
    }

    err = usbd_add_descriptor(&sample_usbd, &sample_sn);
    if (err) {
    return err;
    }

    err = usbd_add_configuration(&sample_usbd, &config_1);
    if (err) {
    return err;
    }

    err = usbd_register_class(&sample_usbd, "cdc_acm_0", 1);
    if (err) {
    return err;
    }

    err = usbd_init(&sample_usbd);
    if (err) {
    return err;
    }

    err = usbd_enable(&sample_usbd);
    if (err) {
    return err;
    }

    return 0;
    }
    #endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT) */

    void main(void)
    {
    const struct device *const dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console));
    uint32_t dtr = 0;

    #if IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT)
    #warning "CONFIG_USB_DEVICE_STACK_NEXT is enabled."
    if (enable_usb_device_next()) {
    return;
    }
    #else
    #warning "CONFIG_USB_DEVICE_STACK_NEXT is disabled."
    if (usb_enable(NULL)) {
    return;
    }
    #endif

    /* Poll if the DTR flag was set */
    while (!dtr) {
    uart_line_ctrl_get(dev, UART_LINE_CTRL_DTR, &dtr);
    /* Give CPU resources to low priority threads. */
    printf("waiting for DTR\n");
    k_sleep(K_MSEC(100));
    }

    while (1) {
    printf("Hello World! %s %s\n", CONFIG_ARCH, CONFIG_BOARD);
    k_sleep(K_SECONDS(1));
    }
    }

    Regards,

    Jerry

  • I thought I might be getting this error because my SDK was damaged somehow so, using the toolchain manager, removed both V2.3.0 and V2.4.0 and then reinstalled V2.4.0.  The problem persisted.

    Regards,

    Jerry

  • In order to isolate this problem I created a new project with the same main.c file as was above and with a prj.conf file san the two boot loader statements:

    CONFIG_SECURE_BOOT=y
    CONFIG_BOOTLOADER_MCUBOOT=y

    I could build for both the nRF52480-dk and the nRF52480-dongle without issue.

    When I add these two statements to the prj.conf fie

    CONFIG_SECURE_BOOT=y
    CONFIG_BOOTLOADER_MCUBOOT=y

    Builds for both boards fail, Further, if I then remove the two bootloader statements, both boards STILL fail on build.  The addition of these two statements somehow irreversibly damages the build system files.

    Regards,

    Jerry 

  • More confusing information;

    I built the Lesson 3 sample project from your BLE course; I built and executed fine.  I then added the two bootloader statements as above; the build failed. I removed the two bootloader statements and, surprisingly, it built and executed fine. This result differs from that above.

    Regards,

    Jerry 

  • Hi,

    Jerry Easley said:
    Builds for both boards fail, Further, if I then remove the two bootloader statements, both boards STILL fail on build.

    To resolve this, you could consider removing build folder completely and performing pristine build.


    I think the easiest way to start might be to try building Zephyr hello_world sample with 2 previously mentioned configuration options added to the prj.conf file.

    Best regards,
    Dejan

  • Hi Dejan,

    Here is what I did:

    In the past my code was at "c:\Nordic\MyApps"

    I created a new directory, "C:\Nordic\MUC_BootLoader_Pristine"

    I Opened this folder in VSCODE.

    I used the welcome screen to set the SDK and ToolChain version to 2.4.0

    I created a new project, "Hello World" using the sdk template.

    I created a build configuration for the nRF52840-dongle.

    I did a pristine build; It completed successfully.

    To the prj.conf file I added the two statements following:

    CONFIG_SECURE_BOOT=y
    CONFIG_BOOTLOADER_MCUBOOT=y

    I did a pristine build; it failed. The error messages follow:

    -- Build files have been written to: C:/Nordic/MUC_BootLoader_Pristine/hello_world/build_dongle/mcuboot
    === child image mcuboot - end ===

    CMake Warning at C:/ncs/v2.4.0/nrf/modules/mcuboot/CMakeLists.txt:310 (message):

    ---------------------------------------------------------
    --- WARNING: Using default MCUBoot key, it should not ---
    --- be used for production. ---
    ---------------------------------------------------------

    CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:838 (message):
    No SOURCES given to Zephyr library: lib__libc__common

    Excluding target from build.


    Traceback (most recent call last):
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 1993, in <module>
    main()
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 1028, in main
    solution.update(solve_region(pm_config, region, region_config,
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 971, in solve_region
    get_region_config(partitions, region_config, static_partitions, system_reqs=pm_config)
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 758, in get_region_config
    solve_complex_region(pm_config, start, size, placement_strategy, region_name, device, static_conf, dp, system_reqs)
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 865, in solve_complex_region
    solution, sub_partitions = resolve(pm_config, dp, system_reqs)
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 308, in resolve
    solve_direction(reqs, sub_partitions, unsolved, solution, 'after')
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 198, in solve_direction

    If this is not what you were suggesting I do, just let me know.

    Regards,
    Jerry

Reply
  • Hi Dejan,

    Here is what I did:

    In the past my code was at "c:\Nordic\MyApps"

    I created a new directory, "C:\Nordic\MUC_BootLoader_Pristine"

    I Opened this folder in VSCODE.

    I used the welcome screen to set the SDK and ToolChain version to 2.4.0

    I created a new project, "Hello World" using the sdk template.

    I created a build configuration for the nRF52840-dongle.

    I did a pristine build; It completed successfully.

    To the prj.conf file I added the two statements following:

    CONFIG_SECURE_BOOT=y
    CONFIG_BOOTLOADER_MCUBOOT=y

    I did a pristine build; it failed. The error messages follow:

    -- Build files have been written to: C:/Nordic/MUC_BootLoader_Pristine/hello_world/build_dongle/mcuboot
    === child image mcuboot - end ===

    CMake Warning at C:/ncs/v2.4.0/nrf/modules/mcuboot/CMakeLists.txt:310 (message):

    ---------------------------------------------------------
    --- WARNING: Using default MCUBoot key, it should not ---
    --- be used for production. ---
    ---------------------------------------------------------

    CMake Warning at C:/ncs/v2.4.0/zephyr/CMakeLists.txt:838 (message):
    No SOURCES given to Zephyr library: lib__libc__common

    Excluding target from build.


    Traceback (most recent call last):
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 1993, in <module>
    main()
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 1028, in main
    solution.update(solve_region(pm_config, region, region_config,
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 971, in solve_region
    get_region_config(partitions, region_config, static_partitions, system_reqs=pm_config)
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 758, in get_region_config
    solve_complex_region(pm_config, start, size, placement_strategy, region_name, device, static_conf, dp, system_reqs)
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 865, in solve_complex_region
    solution, sub_partitions = resolve(pm_config, dp, system_reqs)
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 308, in resolve
    solve_direction(reqs, sub_partitions, unsolved, solution, 'after')
    File "C:/ncs/v2.4.0/nrf/scripts/partition_manager.py", line 198, in solve_direction

    If this is not what you were suggesting I do, just let me know.

    Regards,
    Jerry

Children
  • Hi,

    If you use nrf52840-dk instead of nrf52840dongle, you should not get errors while building.

    As for the dongle, you can read more from the documentation - nrf52840 dongleprogramming and debugging the dongle and nrf52840 dongle user guide, Additionally, you could also have a look at nrf52840 dongle programming tutorial.

    Best regards,
    Dejan

  • Hi Dejan,

    You are correct, a build for a nRF52840-dk does indeed build without incident.  However, I'm a little flummoxed; what has that got to do with my problem?

    I appreciate the links you provided to the documentation, one particular piece of which describes what I am trying to do; the URL is: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/boards/arm/nrf52840dongle_nrf52840/doc/index.html.   A salient part of which I paste below:

    "This board supports building other Zephyr applications for flashing with MCUboot in this way also. Just make sure CONFIG_BOOTLOADER_MCUBOOT is set when building your application. For example, to compile blinky for loading by MCUboot, use this:

    west build -b nrf52840dongle_nrf52840 -d build/blinky zephyr/samples/basic/blinky -- -DCONFIG_BOOTLOADER_MCUBOOT=y
    

    You can then sign and flash it using the steps above."

    From the above I see that no CONFIG_SECURE_BOOTLOADER statement is required in the prjj.conf file, so I removed it and tried to rebuild the application; it failed just like all the others.

    Everything I am attempting to do is consistent with your documentation; There is a problem with this build process.  Now that we have isolated the problem and you can reproduce it, maybe it's time to escalate it to the team(s) that support the toolchain/SDK.

  • Hi,

    Is there any specific reason why you do not want to use nrf52840-dk but nrf52840 dongle instead?

    Jerry Easley said:
    However, I'm a little flummoxed; what has that got to do with my problem?

    Initially, I thought that you wanted to know how to build your application with MCUboot. However, it seems that you want to use nrf52840 dongle and that you are looking into dongle programming options which are specified in this guide. It would be beneficial if you provide more information about your aim. What exactly are you trying to achieve? 

    Jerry Easley said:
    From the above I see that no CONFIG_SECURE_BOOTLOADER statement is required in the prjj.conf file, so I removed it and tried to rebuild the application; it failed just like all the others.

    Configuration option CONFIG_SECURE_BOOTLOADER=y is required, but you can specify it either in prj.conf or with       -DCONFIG_BOOTLOADER_MCUBOOT=y in "west build" command.

    Best regards,
    Dejan

  • Hi Dejan,

    I did nor realize one had to get approval or clearance to use the nRF52480-dongle in some particular way; at least such was not made made known to me at the time of purchase. I was laboring under the apparent misconception that I could use it in any way I pleased.

    So here is what I want to do, I want to combine an application with the MCU Bootloader in a way consistent with Nordic's documentation.

    There is a bug in the build system that is preventing me from doing that.  In this situation Nordic can respond to my plea for help in one of several ways.  For instance, Nordic could tell me that it won't work and that I needed to seek another solution. Or Nordic could say there is no bug and that I am hallucinating.  It could say yes there is a bug and that they are working on a solution.  You see there are several options open to Nordic that are appropriate, but gaslighting you customer is not one of them.

    I request that you assign this ticket to a different support engineer for resolution, because I don't feel you are willing to help me.

    Respectfully,

    Jerry

  • Hi Jerry,

    Jerry Easley said:
    I did nor realize one had to get approval or clearance to use the nRF52480-dongle in some particular way; at least such was not made made known to me at the time of purchase. I was laboring under the apparent misconception that I could use it in any way I pleased.

    I am not aware of any approval or clearance for using the nrf52840 dongle device. You can use any device that you bought the way how you want. However, not all features are available on all devices. Additionally, devices may have some specific requirements regarding programming. That is why I provided you with the links to the nrf52840 dongle documentation. However, I forgot to mention that mcuboot is added to the project as a child image. You can find below the result of my testing where I provide more information on how to add mcuboot to your project.

    Jerry Easley said:
    So here is what I want to do, I want to combine an application with the MCU Bootloader in a way consistent with Nordic's documentation.

    I have done some testing where I built Zephyr hello_world project with the following configuration:

    //should be put in prj.conf file
    CONFIG_BOOTLOADER_MCUBOOT=y

    Additionally, you should make child_image folder in your project directory and make mcuboot.conf inside child_image folder with the following configuration:
    //should be put in mcuboot.conf file
    CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x7B800

    Please note that this is not default mcuboot partition size. Due to flash overflow error, increasing the mcuboot partition size is necessary.

    Jerry Easley said:
    There is a bug in the build system that is preventing me from doing that.  In this situation Nordic can respond to my plea for help in one of several ways.  For instance, Nordic could tell me that it won't work and that I needed to seek another solution. Or Nordic could say there is no bug and that I am hallucinating.  It could say yes there is a bug and that they are working on a solution.  You see there are several options open to Nordic that are appropriate, but gaslighting you customer is not one of them.

    As we strive to help our customers to the best of our ability, I am sorry to hear that you are not satisfied with our support. The purpose of this discussion is for me to help you. In case of a bug, I would not hesitate to report it internally so that we can fix it and improve both our product and your experience.

    Jerry Easley said:
    I request that you assign this ticket to a different support engineer for resolution, because I don't feel you are willing to help me.

    I am sorry to hear that you feel this way, but I am willing to help you. Please let me know if you need any further assistance.

    Best regards,
    Dejan

Related