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

Segger Embedded Studio: Debug and Release build configurations

I created two build configurations a Debug and a Release in SES IDE.

Build > Build Configurations...

I wanted to select the  DEBUG_OPTIMIZATIONS level for the Debug build configuration and the SPEED_OPTIMIZATIONS for the Release one.

In Project Explorer, select the top Solution then select the 'Debug' build Configuration

Project > Configure nRF Connect Project... > DEBUG_OPTIMIZATIONS > Configure > Save solution (if prompted)

Then in Project Explorer, select the top Solution then select the 'Release' build Configuration

Project > Configure nRF Connect Project... > SIZE_OPTIMIZATIONS > Configure > Save solution (if prompted)

However, when I go back and select the 'Debug' build configuration to view its optimisation setting I find

Project > Configure nRF Connect Project... > SIZE_OPTIMIZATIONS   

NOT DEBUG_OPTIMIZATIONS as expected.

It looks like whichever build configuration is set last overwrites the other one.

Can you please tell me what I am doing wrong.

Thank you.

Mohamed Belaroussi

Parents
  • This seems like a bug in SES, I can report it, I assume you are using v4.52?

    In the meantime you can also control this in prj.conf by setting e.g. CONFIG_DEBUG_OPMTIMIZATIONS=y

  • Thank you Kenneth.

    I don't use the command line tools. I am using SES IDE and like any other IDE I used before I should be able to set debug and release configurations within SES Nordic Edition. I tried to get help from Segger but they directed me to Nordic because SES (Nordic Edition) is not supported by Segger. 

    I don't know how this can be done in SES, but

    If you don't know how it can be done maybe you can ask one of your colleagues or even Segger.

    I asked this question over six months ago, I was hoping by now someone somewhere would have figured out how to do this within SES. As I said earlier Segger were not willing to help me but if someone from Nordic approached them they might be be more accommodating.

    While waiting for a resolution to my ticket I am using two project configuration files prj-debug,conf and prj-release.conf, an extract from the two variants is shown below. My question is this,

    Do I need to remove the logging configurations (text in blue below) from the release project file prj-release.conf ?

    prj-debug.conf

    ---------------------

    ...

    ### COMPILER OPTIONS ###
    #
    CONFIG_DEBUG_OPTIMIZATIONS=y

    ### Logging ####
    #
    # For the PID 4 hardware we must set CONFIG_SERIAL=n because otherwise the SPI CS/BUSY
    # pins will be allocated to UART0 CTS/RTS pins.
    CONFIG_SERIAL=n
    CONFIG_LOG=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
    #CONFIG_UART_CONSOLE=n
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
    CONFIG_PRINTK=y

    ...

    prj-release.conf

    ----------------------

    ...

    ### COMPILER OPTIONS ###
    #
    #CONFIG_CODING_GUIDELINE_CHECK is not set
    # CONFIG_NATIVE_APPLICATION is not set
    CONFIG_SIZE_OPTIMIZATIONS=y
    CONFIG_SPEED_OPTIMIZATIONS=y
    CONFIG_DEBUG_OPTIMIZATIONS=n
    # CONFIG_NO_OPTIMIZATIONS is not set
    CONFIG_COMPILER_OPT=""
    # end of Compiler Options

    ### Logging ####
    #
    # For the PID 4 hardware we must set CONFIG_SERIAL=n because otherwise the SPI CS/BUSY
    # pins will be allocated to UART0 CTS/RTS pins.
    CONFIG_SERIAL=n
    CONFIG_LOG=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
    #CONFIG_UART_CONSOLE=n
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
    CONFIG_PRINTK=y

    ...

    Kind regards

    Mohamed

  • Migrating is very easy:
    https://www.youtube.com/watch?v=ptJBEAOIm5w&list=PLx_tBuQ_KSqEt7NK-H7Lu78lT2OijwIMl&index=6 

    That said, the description for SES should be as stated here (seems there are two different ways it can be done in SES if you see the Note also below the first suggestion): https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_modifying.html?highlight=dconf_file#selecting-a-build-type-in-ses 

    Best regards,
    Kenneth

  • Creating solution HomeBeacon_v121+_sb.emProject
    C:/Zypher/v1.7.0/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=nrf52833dk_nrf52833 -DBOARD_DIR=C:\Zypher\v1.7.0\zephyr\boards\arm\nrf52833dk_nrf52833 -BC:\Sandbox\HomeBeacon_v121+_sb\build_nrf52833dk_nrf52833_mcuboot_OTA_rel2 -SC:\Sandbox\HomeBeacon_v121+_sb -DNCS_TOOLCHAIN_VERSION=1.7.0 -DCONF_FILE=prj_release.conf -DDTC_OVERLAY_FILE=C:/Sandbox/HomeBeacon_v121+_sb/nrf52833dk_nrf52833.overlay -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:\Zypher\v1.7.0\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py
    -- Application: C:/Sandbox/HomeBeacon_v121+_sb
    -- Zephyr version: 2.6.99 (C:/Zypher/v1.7.0/zephyr), build: v2.6.99-ncs1
    -- Found Python3: C:/Zypher/v1.7.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- Cache files will be written to: C:/Zypher/v1.7.0/zephyr/.cache
    -- Found dtc: C:/Zypher/v1.7.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/Zypher/v1.7.0/toolchain/opt)
    -- Found BOARD.dts: C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: C:/Sandbox/HomeBeacon_v121+_sb/nrf52833dk_nrf52833.overlay
    -- Generated zephyr.dts: C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/zephyr/dts.cmake
    Parsing C:/Sandbox/HomeBeacon_v121+_sb/Kconfig
    Loaded configuration 'C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'C:/Sandbox/HomeBeacon_v121+_sb/prj_debug.conf'
    Configuration saved to 'C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/zephyr/.config'
    Kconfig header saved to 'C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 9.2.1
    -- The CXX compiler identification is GNU 9.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/Zypher/v1.7.0/toolchain/opt/bin/arm-none-eabi-gcc.exe
    -- Application: C:/Zypher/v1.7.0/bootloader/mcuboot/boot/zephyr
    -- Zephyr version: 2.6.99 (C:/Zypher/v1.7.0/zephyr), build: v2.6.99-ncs1
    -- Found Python3: C:/Zypher/v1.7.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- Cache files will be written to: C:/Zypher/v1.7.0/zephyr/.cache
    -- Found dtc: C:/Zypher/v1.7.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/Zypher/v1.7.0/toolchain/opt)
    -- Found BOARD.dts: C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: C:/Zypher/v1.7.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/mcuboot/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/mcuboot/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/mcuboot/zephyr/dts.cmake
    Parsing C:/Zypher/v1.7.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'C:/Sandbox/HomeBeacon_v121+_sb/cfg/mcuboot.conf'
    Merged configuration 'C:/Zypher/v1.7.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Configuration saved to 'C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/mcuboot/zephyr/.config'
    Kconfig header saved to 'C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/mcuboot/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 9.2.1
    -- The CXX compiler identification is GNU 9.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/Zypher/v1.7.0/toolchain/opt/bin/arm-none-eabi-gcc.exe
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2/mcuboot
    Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
    Dropping partition 'nvs_storage' since its size is 0.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Sandbox/HomeBeacon_v121+_sb/build_nrf52833dk_nrf52833_mcuboot_OTA_rel2
    Including boilerplate (Zephyr base): C:/Zypher/v1.7.0/zephyr/cmake/app/boilerplate.cmake
    -- Using NCS Toolchain 1.7.0 for building. (C:/Zypher/v1.7.0/toolchain/cmake)
    
    warning: UART_CONSOLE (defined at drivers/console/Kconfig:47) was assigned the value 'y' but got the
    value 'n'. Check these unsatisfied dependencies: SERIAL (=n), SERIAL_HAS_DRIVER (=n). See
    http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_UART_CONSOLE.html and/or look up
    UART_CONSOLE 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: I2C_0 (defined at drivers/i2c/Kconfig.esp32:15) was assigned the value 'y' but got the
    value 'n'. Check these unsatisfied dependencies: I2C_ESP32 (=n). See
    http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_I2C_0.html and/or look up I2C_0 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.
    
    
    === child image mcuboot -  begin ===
    Including boilerplate (Zephyr base): C:/Zypher/v1.7.0/zephyr/cmake/app/boilerplate.cmake
    -- Using NCS Toolchain 1.7.0 for building. (C:/Zypher/v1.7.0/toolchain/cmake)
    
    warning: UART_CONSOLE (defined at drivers/console/Kconfig:47) was assigned the value 'y' but got the
    value 'n'. Check these unsatisfied dependencies: SERIAL (=n), SERIAL_HAS_DRIVER (=n). See
    http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_UART_CONSOLE.html and/or look up
    UART_CONSOLE 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.
    
    MCUBoot bootloader key file: C:/Zypher/v1.7.0/bootloader/mcuboot/root-rsa-2048.pem
    === child image mcuboot -  end ===
    
    CMake Warning at C:/Zypher/v1.7.0/nrf/modules/mcuboot/CMakeLists.txt:204 (message):
      
    
            ---------------------------------------------------------
            --- WARNING: Using default MCUBoot key, it should not ---
            --- be used for production.                           ---
            ---------------------------------------------------------
            
    
    
    
    
    Loading solution HomeBeacon_v121+_sb.emProject
    Loading solution build.emProject
    Mapping project information
    Mapping project zephyr/merged.hex
    Mapping project all
    Mapping project app/libapp.a
    Mapping project cmake_object_order_depends_target_app
    Mapping project zephyr/driver_validation_h_target
    Mapping project zephyr/CMakeFiles/driver_validation_h_target
    Mapping project zephyr/include/generated/driver-validation.h
    Mapping project zephyr/parse_syscalls_target
    Mapping project zephyr/CMakeFiles/parse_syscalls_target
    Mapping project zephyr/misc/generated/syscalls.json
    Mapping project C:/Zypher/v1.7.0/zephyr/include/dt-bindings/gpio/gpio.h
    Mapping project C:/Zypher/v1.7.0/zephyr/include/dt-bindings/i2c/i2c.h
    Mapping project zephyr/misc/generated/struct_tags.json
    Mapping project zephyr/kobj_types_h_target
    Mapping project zephyr/CMakeFiles/kobj_types_h_target
    Mapping project zephyr/include/generated/kobj-types-enum.h
    Mapping project zephyr/include/generated/otype-to-str.h
    Mapping project zephyr/include/generated/otype-to-size.h
    Mapping project zephyr/syscall_list_h_target
    Mapping project zephyr/CMakeFiles/syscall_list_h_target
    Mapping project zephyr/include/generated/syscall_list.h
    Mapping project zephyr/include/generated/syscall_dispatch.c
    Mapping project zephyr/zephyr_generated_headers
    Mapping project zephyr/offsets_h
    Mapping project zephyr/CMakeFiles/offsets_h
    Mapping project zephyr/include/generated/offsets.h
    Mapping project zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
    Mapping project cmake_object_order_depends_target_offsets
    Mapping project zephyr/offsets
    Mapping project mcuboot_primary_app_hex
    Mapping project CMakeFiles/mcuboot_primary_app_hex
    Mapping project zephyr/mcuboot_primary_app.hex
    Mapping project zephyr/zephyr.elf
    Mapping project C:/Zypher/v1.7.0/zephyr/misc/empty_file.c
    Mapping project cmake_object_order_depends_target_zephyr_final
    Mapping project cmake_object_order_depends_target_..__nrf__subsys__dfu__dfu_target
    Mapping project cmake_object_order_depends_target_arch__arm__core__aarch32
    Mapping project cmake_object_order_depends_target_arch__arm__core__aarch32__cortex_m
    Mapping project cmake_object_order_depends_target_arch__arm__core__aarch32__mpu
    Mapping project cmake_object_order_depends_target_arch__common
    Mapping project cmake_object_order_depends_target_isr_tables
    Mapping project cmake_object_order_depends_target_drivers__adc
    Mapping project cmake_object_order_depends_target_drivers__entropy
    Mapping project cmake_object_order_depends_target_drivers__flash
    Mapping project cmake_object_order_depends_target_drivers__gpio
    Mapping project cmake_object_order_depends_target_drivers__i2c
    Mapping project cmake_object_order_depends_target_drivers__pwm
    Mapping project cmake_object_order_depends_target_drivers__sensor__nrf5
    Mapping project cmake_object_order_depends_target_drivers__spi
    Mapping project cmake_object_order_depends_target_kernel
    Mapping project cmake_object_order_depends_target_lib__libc__newlib
    Mapping project cmake_object_order_depends_target_lib__posix
    Mapping project cmake_object_order_depends_target_mcuboot_util
    Mapping project cmake_object_order_depends_target_modules__hal_nordic__nrfx
    Mapping project cmake_object_order_depends_target_modules__segger
    Mapping project cmake_object_order_depends_target_soc__arm__common__cortex_m
    Mapping project cmake_object_order_depends_target_soc__arm__nordic_nrf__nrf52
    Mapping project cmake_object_order_depends_target_subsys__bluetooth__common
    Mapping project cmake_object_order_depends_target_subsys__bluetooth__controller
    Mapping project cmake_object_order_depends_target_subsys__bluetooth__host
    Mapping project cmake_object_order_depends_target_subsys__dfu__boot
    Mapping project cmake_object_order_depends_target_subsys__net
    Mapping project cmake_object_order_depends_target_subsys__random
    Mapping project cmake_object_order_depends_target_zephyr
    Mapping project zephyr/dev_handles.c
    Mapping project zephyr/zephyr_prebuilt.elf
    Mapping project cmake_object_order_depends_target_zephyr_prebuilt
    Mapping project zephyr/linker_zephyr_prebuilt_script_target
    Mapping project zephyr/CMakeFiles/linker_zephyr_prebuilt_script_target
    Mapping project zephyr/linker_zephyr_prebuilt.cmd
    Mapping project zephyr/include/generated/autoconf.h
    Mapping project zephyr/libzephyr.a
    Mapping project zephyr/arch/common/libarch__common.a
    Mapping project zephyr/arch/common/libisr_tables.a
    Mapping project zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a
    Mapping project zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a
    Mapping project zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a
    Mapping project zephyr/lib/libc/newlib/liblib__libc__newlib.a
    Mapping project zephyr/lib/posix/liblib__posix.a
    Mapping project zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a
    Mapping project zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a
    Mapping project zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a
    Mapping project zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a
    Mapping project zephyr/subsys/bluetooth/controller/libsubsys__bluetooth__controller.a
    Mapping project zephyr/subsys/dfu/boot/libsubsys__dfu__boot.a
    Mapping project zephyr/subsys/net/libsubsys__net.a
    Mapping project zephyr/subsys/random/libsubsys__random.a
    Mapping project zephyr/drivers/adc/libdrivers__adc.a
    Mapping project zephyr/drivers/gpio/libdrivers__gpio.a
    Mapping project zephyr/drivers/i2c/libdrivers__i2c.a
    Mapping project zephyr/drivers/pwm/libdrivers__pwm.a
    Mapping project zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a
    Mapping project zephyr/drivers/spi/libdrivers__spi.a
    Mapping project zephyr/drivers/flash/libdrivers__flash.a
    Mapping project zephyr/drivers/entropy/libdrivers__entropy.a
    Mapping project modules/nrf/subsys/dfu/dfu_target/lib..__nrf__subsys__dfu__dfu_target.a
    Mapping project modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a
    Mapping project modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a
    Mapping project modules/segger/libmodules__segger.a
    Mapping project zephyr/kernel/libkernel.a
    Mapping project zephyr/linker_zephyr_final_script_target
    Mapping project zephyr/CMakeFiles/linker_zephyr_final_script_target
    Mapping project zephyr/linker.cmd
    Mapping project zephyr/isrList.bin
    Mapping project zephyr/isr_tables.c
    Mapping project zephyr/zephyr.hex
    Mapping project mcuboot_primary_hex
    Mapping project CMakeFiles/mcuboot_primary_hex
    Mapping project zephyr/mcuboot_primary.hex
    Mapping project merged_hex
    Mapping project CMakeFiles/merged_hex
    Mapping project zephyr/merged.hex
    Mapping project mcuboot/zephyr/zephyr.hex
    Mapping project modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-configure
    Mapping project modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-patch
    Mapping project modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-update
    Mapping project modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-download
    Mapping project modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-mkdir
    Mapping project zephyr/app_signed.hex
    Mapping project mcuboot/zephyr/zephyr.elf
    Mapping project modules/mcuboot/mcuboot_sign_target
    Mapping project modules/mcuboot/CMakeFiles/mcuboot_sign_target
    Mapping project zephyr/app_update.bin
    Mapping project zephyr/app_test_update.hex
    Mapping project zephyr/app_moved_test_update.hex
    Mapping project modules/mcuboot/mcuboot_subimage
    Mapping project modules/mcuboot/CMakeFiles/mcuboot_subimage
    Mapping project modules/mcuboot/CMakeFiles/mcuboot_subimage-complete
    Mapping project modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-install
    Mapping project modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build
    Mapping project modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-done
    Mapping project zephyr/all
    Mapping project zephyr/arch/all
    Mapping project zephyr/arch/common/all
    Mapping project zephyr/arch/arch/arm/all
    Mapping project zephyr/arch/arch/arm/core/aarch32/all
    Mapping project zephyr/arch/arch/arm/core/aarch32/cortex_m/all
    Mapping project zephyr/arch/arch/arm/core/aarch32/mpu/all
    Mapping project zephyr/lib/all
    Mapping project zephyr/lib/libc/all
    Mapping project zephyr/lib/libc/newlib/all
    Mapping project zephyr/lib/posix/all
    Mapping project zephyr/lib/gui/all
    Mapping project zephyr/lib/os/all
    Mapping project zephyr/lib/util/all
    Mapping project zephyr/soc/arm/all
    Mapping project zephyr/soc/arm/common/cortex_m/all
    Mapping project zephyr/soc/arm/nordic_nrf/all
    Mapping project zephyr/soc/arm/nordic_nrf/nrf52/all
    Mapping project zephyr/soc/arm/nordic_nrf/common/all
    Mapping project zephyr/boards/all
    Mapping project zephyr/subsys/all
    Mapping project zephyr/subsys/debug/all
    Mapping project zephyr/subsys/logging/all
    Mapping project zephyr/subsys/bluetooth/all
    Mapping project zephyr/subsys/bluetooth/common/all
    Mapping project zephyr/subsys/bluetooth/host/all
    Mapping project zephyr/subsys/bluetooth/services/all
    Mapping project zephyr/subsys/bluetooth/controller/all
    Mapping project zephyr/subsys/fs/all
    Mapping project zephyr/subsys/fs/nvs/all
    Mapping project zephyr/subsys/ipc/all
    Mapping project zephyr/subsys/mgmt/all
    Mapping project zephyr/subsys/dfu/all
    Mapping project zephyr/subsys/dfu/boot/all
    Mapping project zephyr/subsys/dfu/img_util/all
    Mapping project zephyr/subsys/net/all
    Mapping project zephyr/subsys/net/lib/all
    Mapping project zephyr/subsys/net/lib/utils/all
    Mapping project zephyr/subsys/random/all
    Mapping project zephyr/subsys/storage/all
    Mapping project zephyr/subsys/storage/flash_map/all
    Mapping project zephyr/subsys/storage/stream/all
    Mapping project zephyr/subsys/fb/all
    Mapping project zephyr/subsys/portability/all
    Mapping project zephyr/subsys/pm/all
    Mapping project zephyr/subsys/pm/policy/all
    Mapping project zephyr/subsys/stats/all
    Mapping project zephyr/subsys/task_wdt/all
    Mapping project zephyr/subsys/testsuite/all
    Mapping project zephyr/subsys/tracing/all
    Mapping project zephyr/subsys/canbus/all
    Mapping project zephyr/subsys/modbus/all
    Mapping project zephyr/drivers/all
    Mapping project zephyr/drivers/console/all
    Mapping project zephyr/drivers/interrupt_controller/all
    Mapping project zephyr/drivers/misc/all
    Mapping project zephyr/drivers/pcie/all
    Mapping project zephyr/drivers/disk/all
    Mapping project zephyr/drivers/adc/all
    Mapping project zephyr/drivers/clock_control/all
    Mapping project zephyr/drivers/gpio/all
    Mapping project zephyr/drivers/i2c/all
    Mapping project zephyr/drivers/pwm/all
    Mapping project zephyr/drivers/sensor/all
    Mapping project zephyr/drivers/sensor/grove/all
    Mapping project zephyr/drivers/sensor/nrf5/all
    Mapping project zephyr/drivers/spi/all
    Mapping project zephyr/drivers/flash/all
    Mapping project zephyr/drivers/bluetooth/all
    Mapping project zephyr/drivers/bluetooth/hci/all
    Mapping project zephyr/drivers/entropy/all
    Mapping project zephyr/drivers/timer/all
    Mapping project modules/nrf/all
    Mapping project modules/nrf/ext/all
    Mapping project modules/nrf/lib/all
    Mapping project modules/nrf/lib/bin/all
    Mapping project modules/nrf/lib/flash_patch/all
    Mapping project modules/nrf/lib/fatal_error/all
    Mapping project modules/nrf/samples/all
    Mapping project modules/nrf/subsys/all
    Mapping project modules/nrf/subsys/bluetooth/all
    Mapping project modules/nrf/subsys/net/all
    Mapping project modules/nrf/subsys/net/lib/all
    Mapping project modules/nrf/subsys/dfu/all
    Mapping project modules/nrf/subsys/dfu/dfu_target/all
    Mapping project modules/nrf/subsys/debug/all
    Mapping project modules/nrf/subsys/partition_manager/all
    Mapping project modules/nrf/modules/all
    Mapping project modules/nrf/drivers/all
    Mapping project modules/nrf/drivers/sensor/all
    Mapping project modules/nrf/drivers/hw_cc310/all
    Mapping project modules/nrf/drivers/entropy/all
    Mapping project modules/nrf/drivers/flash/all
    Mapping project modules/nrf/drivers/gps/all
    Mapping project modules/nrf/drivers/serial/all
    Mapping project modules/nrf/tests/all
    Mapping project modules/mcuboot/all
    Mapping project modules/mcuboot/dfu_application_zip
    Mapping project modules/mcuboot/CMakeFiles/dfu_application_zip
    Mapping project zephyr/dfu_application.zip
    Mapping project modules/mcuboot/boot/bootutil/zephyr/all
    Mapping project modules/trusted-firmware-m/all
    Mapping project modules/cjson/all
    Mapping project modules/openthread/all
    Mapping project modules/pelion-dm/all
    Mapping project modules/cddl-gen/all
    Mapping project modules/memfault-firmware-sdk/all
    Mapping project modules/CANopenNode/all
    Mapping project modules/civetweb/all
    Mapping project modules/cmsis/all
    Mapping project modules/cmsis/CMSIS/all
    Mapping project modules/cmsis/CMSIS/Core/all
    Mapping project modules/fatfs/all
    Mapping project modules/hal_nordic/all
    Mapping project modules/hal_nordic/nrfx/all
    Mapping project modules/st/all
    Mapping project modules/libmetal/all
    Mapping project modules/littlefs/all
    Mapping project modules/loramac-node/all
    Mapping project modules/lvgl/all
    Mapping project modules/lz4/all
    Mapping project modules/mbedtls/all
    Mapping project modules/mcumgr/all
    Mapping project modules/mipi-sys-t/all
    Mapping project modules/nanopb/all
    Mapping project modules/nrf_hw_models/all
    Mapping project modules/open-amp/all
    Mapping project modules/segger/all
    Mapping project modules/tinycbor/all
    Mapping project modules/tinycrypt/all
    Mapping project modules/TraceRecorder/all
    Mapping project modules/nrfxlib/all
    Mapping project modules/nrfxlib/nrfxlib/all
    Mapping project modules/nrfxlib/nrfxlib/softdevice_controller/all
    Mapping project modules/nrfxlib/nrf_802154/all
    Mapping project modules/connectedhomeip/all
    Mapping project zephyr/kernel/all
    Mapping project zephyr/cmake/flash/all
    Mapping project zephyr/cmake/usage/all
    Mapping project zephyr/cmake/reports/all
    Preparing solution �HomeBeacon_v121+_sb�
    Preparing project �zephyr/merged.hex�
    Preparing solution �build�
    Preparing project �all�
    Preparing project �app/libapp.a�
    Preparing project �zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj�
    Preparing project �zephyr/zephyr.elf�
    Preparing project �zephyr/zephyr_prebuilt.elf�
    Preparing project �zephyr/libzephyr.a�
    Preparing project �zephyr/arch/common/libarch__common.a�
    Preparing project �zephyr/arch/common/libisr_tables.a�
    Preparing project �zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a�
    Preparing project �zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a�
    Preparing project �zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a�
    Preparing project �zephyr/lib/libc/newlib/liblib__libc__newlib.a�
    Preparing project �zephyr/lib/posix/liblib__posix.a�
    Preparing project �zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a�
    Preparing project �zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a�
    Preparing project �zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a�
    Preparing project �zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a�
    Preparing project �zephyr/subsys/bluetooth/controller/libsubsys__bluetooth__controller.a�
    Preparing project �zephyr/subsys/dfu/boot/libsubsys__dfu__boot.a�
    Preparing project �zephyr/subsys/net/libsubsys__net.a�
    Preparing project �zephyr/subsys/random/libsubsys__random.a�
    Preparing project �zephyr/drivers/adc/libdrivers__adc.a�
    Preparing project �zephyr/drivers/gpio/libdrivers__gpio.a�
    Preparing project �zephyr/drivers/i2c/libdrivers__i2c.a�
    Preparing project �zephyr/drivers/pwm/libdrivers__pwm.a�
    Preparing project �zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a�
    Preparing project �zephyr/drivers/spi/libdrivers__spi.a�
    Preparing project �zephyr/drivers/flash/libdrivers__flash.a�
    Preparing project �zephyr/drivers/entropy/libdrivers__entropy.a�
    Preparing project �modules/nrf/subsys/dfu/dfu_target/lib..__nrf__subsys__dfu__dfu_target.a�
    Preparing project �modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a�
    Preparing project �modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a�
    Preparing project �modules/segger/libmodules__segger.a�
    Preparing project �zephyr/kernel/libkernel.a�
    Restoring state from previous session
    Preparing to load data
    Loading session data from file
    SEGGER Embedded Studio is ready to use
    
    SES_Building_Solution_Log.txt

    Thank you Kenneth.

    "You can also specify the build type in the Additional CMake Options field in Tools > Options > nRF Connect. However, the changes will only be applied after re-opening the project. Reloading the project is not sufficient."

    I am not sure what the difference is between re-opening and re-loading a project.

    In SES I did 

    Tools > Options > nRF Connect then added -DCONF_FILE=prj_release.conf

    File > Open nRF Connect SDK Project... to re-open the project

    Then did a new build in a new empty build folder but the .config file is still not being updated with my config that is in prj_release.conf.

    For example I set CONFIG_LOG=n in prj_release.conf but in .config in the new build folder I see CONFIG_LOG=y.

    Looking closely at the logs when opening the project and creating the solution I can see that it is the content of prj_debug.conf that is merged in the configuration NOT prj_release.conf as expected. This is despite the fact that the cmake.exe command line includes -DCONF_FILE=prj_release.conf.
    Creating solution HomeBeacon_dev_sb.emProject
    C:/Zypher/v1.7.0/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=nrf52833dk_nrf52833 -DBOARD_DIR=C:\Zypher\v1.7.0\zephyr\boards\arm\nrf52833dk_nrf52833 -BC:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_release -SC:\Sandbox\HomeBeacon_dev_sb -DNCS_TOOLCHAIN_VERSION=1.7.0 -DCONF_FILE=prj_release.conf -DDTC_OVERLAY_FILE=C:/Sandbox/HomeBeacon_dev_sb/nrf52833dk_nrf52833.overlay -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:\Zypher\v1.7.0\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py
    -- Application: C:/Sandbox/HomeBeacon_dev_sb
    -- Zephyr version: 2.6.99 (C:/Zypher/v1.7.0/zephyr), build: v2.6.99-ncs1
    -- Found Python3: C:/Zypher/v1.7.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- Cache files will be written to: C:/Zypher/v1.7.0/zephyr/.cache
    -- Found dtc: C:/Zypher/v1.7.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/Zypher/v1.7.0/toolchain/opt)
    -- Found BOARD.dts: C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: C:/Sandbox/HomeBeacon_dev_sb/nrf52833dk_nrf52833.overlay
    -- Generated zephyr.dts: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_release/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_release/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_release/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_release/zephyr/dts.cmake
    Parsing C:/Sandbox/HomeBeacon_dev_sb/Kconfig
    Loaded configuration 'C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'C:/Sandbox/HomeBeacon_dev_sb/prj_debug.conf'
    Configuration saved to 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_release/zephyr/.config'
    Kconfig header saved to 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_release/zephyr/include/generated/autoconf.h'
    
    Please explain what is going on here and help sort this problem out.
    Thank you.
    Kind regards
    Mohamed
  • Hi Kenneth,

    That said, the description for SES should be as stated here (seems there are two different ways it can be done in SES if you see the Note also below the first suggestion): https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_modifying.html?highlight=dconf_file#selecting-a-build-type-in-ses 
    From the link you sent me, it is stated in step 4 Do not select Clean Build Directory.
    Why is this the case?
    I thought starting with a clean build folder is often if not always good practice.
    Please clarify.
    Thank you.
    Kind regards
    Mohamed
  • Can you please try building from command line using west and/or transition to Visual Studio code? 

    Best regards,
    Kenneth

  • Good morning Kenneth,

    I appreciate you are trying to get me to migrate to VS Code but unfortunately, the team and management are reluctant to make the switch right now. So, we need to get this sorted as soon as possible. If you cannot solve this problem maybe you can consult with other members in your team.

    These are the outstanding questions I would like help with.

    Q1/ 

    From the link you sent me, it is stated in step 4 Do not select Clean Build Directory.
    Why is this the case?

    Q2/ 

    That said, the description for SES should be as stated here (seems there are two different ways it can be done in SES if you see the Note also below the first suggestion): https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_modifying.html?highlight=dconf_file#selecting-a-build-type-in-ses 

    If I choose to select the project conf file using the second method as shown below

    Tools > Options > nRF Connect > Additional CMake Options -DCONF_FILE=prj_release.conf

    File > Open nRF Connect SDK Project... to re-open the project

    Can I select to do a 'Clean Build Directory'?

    Q3/ 
    What is the difference between re-opening and re-loading a project?

    Q4/ When I open the project after performing the actions in Q2/ above, I see in SES logs that prj_debug.conf is being merged instead of prj_release.conf as specified in -DCONF_FILE=prj_release.conf. See logs below.

    Creating solution HomeBeacon_dev_sb.emProject                                    C:/Zypher/v1.7.0/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=nrf52833dk_nrf52833 -DBOARD_DIR=C:\Zypher\v1.7.0\zephyr\boards\arm\nrf52833dk_nrf52833 -BC:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_rel_v1_3_99 -SC:\Sandbox\HomeBeacon_dev_sb -DNCS_TOOLCHAIN_VERSION=1.7.0 -DCONF_FILE=prj_release.conf -DDTC_OVERLAY_FILE=C:/Sandbox/HomeBeacon_dev_sb/nrf52833dk_nrf52833.overlay -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:\Zypher\v1.7.0\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py
    -- Application: C:/Sandbox/HomeBeacon_dev_sb
    -- Zephyr version: 2.6.99 (C:/Zypher/v1.7.0/zephyr), build: v2.6.99-ncs1
    -- Found Python3: C:/Zypher/v1.7.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- Cache files will be written to: C:/Zypher/v1.7.0/zephyr/.cache
    -- Found dtc: C:/Zypher/v1.7.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/Zypher/v1.7.0/toolchain/opt)
    -- Found BOARD.dts: C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: C:/Sandbox/HomeBeacon_dev_sb/nrf52833dk_nrf52833.overlay
    -- Generated zephyr.dts: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/dts.cmake
    Parsing C:/Sandbox/HomeBeacon_dev_sb/Kconfig
    Loaded configuration 'C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'C:/Sandbox/HomeBeacon_dev_sb/prj_debug.conf'
    Configuration saved to 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/.config'
    Kconfig header saved to 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/include/generated/autoconf.h'

    ...

    Kind regards

    Mohamed

Reply
  • Good morning Kenneth,

    I appreciate you are trying to get me to migrate to VS Code but unfortunately, the team and management are reluctant to make the switch right now. So, we need to get this sorted as soon as possible. If you cannot solve this problem maybe you can consult with other members in your team.

    These are the outstanding questions I would like help with.

    Q1/ 

    From the link you sent me, it is stated in step 4 Do not select Clean Build Directory.
    Why is this the case?

    Q2/ 

    That said, the description for SES should be as stated here (seems there are two different ways it can be done in SES if you see the Note also below the first suggestion): https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_modifying.html?highlight=dconf_file#selecting-a-build-type-in-ses 

    If I choose to select the project conf file using the second method as shown below

    Tools > Options > nRF Connect > Additional CMake Options -DCONF_FILE=prj_release.conf

    File > Open nRF Connect SDK Project... to re-open the project

    Can I select to do a 'Clean Build Directory'?

    Q3/ 
    What is the difference between re-opening and re-loading a project?

    Q4/ When I open the project after performing the actions in Q2/ above, I see in SES logs that prj_debug.conf is being merged instead of prj_release.conf as specified in -DCONF_FILE=prj_release.conf. See logs below.

    Creating solution HomeBeacon_dev_sb.emProject                                    C:/Zypher/v1.7.0/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=nrf52833dk_nrf52833 -DBOARD_DIR=C:\Zypher\v1.7.0\zephyr\boards\arm\nrf52833dk_nrf52833 -BC:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_rel_v1_3_99 -SC:\Sandbox\HomeBeacon_dev_sb -DNCS_TOOLCHAIN_VERSION=1.7.0 -DCONF_FILE=prj_release.conf -DDTC_OVERLAY_FILE=C:/Sandbox/HomeBeacon_dev_sb/nrf52833dk_nrf52833.overlay -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:\Zypher\v1.7.0\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py
    -- Application: C:/Sandbox/HomeBeacon_dev_sb
    -- Zephyr version: 2.6.99 (C:/Zypher/v1.7.0/zephyr), build: v2.6.99-ncs1
    -- Found Python3: C:/Zypher/v1.7.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- Cache files will be written to: C:/Zypher/v1.7.0/zephyr/.cache
    -- Found dtc: C:/Zypher/v1.7.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/Zypher/v1.7.0/toolchain/opt)
    -- Found BOARD.dts: C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: C:/Sandbox/HomeBeacon_dev_sb/nrf52833dk_nrf52833.overlay
    -- Generated zephyr.dts: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/dts.cmake
    Parsing C:/Sandbox/HomeBeacon_dev_sb/Kconfig
    Loaded configuration 'C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'C:/Sandbox/HomeBeacon_dev_sb/prj_debug.conf'
    Configuration saved to 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/.config'
    Kconfig header saved to 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1_3_99/zephyr/include/generated/autoconf.h'

    ...

    Kind regards

    Mohamed

Children
  • Hi,

    I am not sure why the documentation says not to choose clean build directory, unless there are some configurations you have set using menuconfig in SES that you may want to keep. 

    > What is the difference between re-opening and re-loading a project?

    If you close and open the same project with "clean build directory" not chosen, then this can cause items from the cache/build folder to impact configuration, and that changes in prj.conf. cmakelist.txt is not applied. To ensure the changes are applied then CMake must run, which can be done by either of the following:

    - Open the project again with "Open nRF Connect SDK project", make sure to choose "clean build directory".

    OR

    - Run Cmake with Project > Run CMake.

    > When I open the project after performing the actions in Q2/ above, I see in SES logs that prj_debug.conf is being merged instead of prj_release.conf as specified in -DCONF_FILE=prj_release.conf

    This is likely because you don't clean the build folder and/or CMake does not run.

    If you reload the project with Project > Reload <project name>, then CMake does not run.

    Best regards,
    Kenneth

  • Hi Kenneth,

    Thank you for your answers.

    I am not sure why the documentation says not to choose clean build directory, unless there are some configurations you have set using menuconfig in SES that you may want to keep. 
    I am not aware of any configurations I have in SES that I would like to keep.
    How do I check whether I have configurations set in SES using menuconfig?

    > When I open the project after performing the actions in Q2/ above, I see in SES logs that prj_debug.conf is being merged instead of prj_release.conf as specified in -DCONF_FILE=prj_release.conf

    This is likely because you don't clean the build folder and/or CMake does not run.

    I have tried both with and without selecting the 'Clean Build folder' option and I still see prj_debug.conf instead of prj_release.conf being merged in .config. as reported in my previous post.

    Kind regards
    Mohamed

  • Have you tried the other option also? 
    - Run Cmake with Project > Run CMake. 

    Kenneth

  • Yes, I have but no success still.

    In SES I did 

    Tools > Options > nRF Connect then added -DCONF_FILE=prj_release.conf

    File > Open nRF Connect SDK Project... to re-open the project

    Then did a new build in a new empty build folder but the .config file is still not being updated with my config that is in prj_release.conf.

    For example I set CONFIG_LOG=n in prj_release.conf but in .config in the new build folder I see CONFIG_LOG=y.

    I then ran Cmake, as you suggested, 

    Project > Run CMake

    But nothing has changed in the .config file, see extract from the log trace below,

    Creating solution HomeBeacon_dev_sb.emProject
    -- Application: C:/Sandbox/HomeBeacon_dev_sb
    -- Zephyr version: 2.6.99 (C:/Zypher/v1.7.0/zephyr), build: v2.6.99-ncs1
    -- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- Cache files will be written to: C:/Zypher/v1.7.0/zephyr/.cache
    -- Found dtc: C:/Zypher/v1.7.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/Zypher/v1.7.0/toolchain/opt)
    -- Found BOARD.dts: C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: C:/Sandbox/HomeBeacon_dev_sb/nrf52833dk_nrf52833.overlay
    -- Generated zephyr.dts: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/zephyr/dts.cmake
    Parsing C:/Sandbox/HomeBeacon_dev_sb/Kconfig
    Loaded configuration 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/zephyr/.config'
    No change to configuration in 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/zephyr/.config'
    No change to Kconfig header in 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/zephyr/include/generated/autoconf.h'
    -- Application: C:/Zypher/v1.7.0/bootloader/mcuboot/boot/zephyr
    -- Zephyr version: 2.6.99 (C:/Zypher/v1.7.0/zephyr), build: v2.6.99-ncs1
    -- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- Cache files will be written to: C:/Zypher/v1.7.0/zephyr/.cache
    -- Found dtc: C:/Zypher/v1.7.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (C:/Zypher/v1.7.0/toolchain/opt)
    -- Found BOARD.dts: C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: C:/Zypher/v1.7.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Found devicetree overlay: C:/Zypher/v1.7.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/mcuboot/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/mcuboot/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/mcuboot/zephyr/dts.cmake
    Parsing C:/Zypher/v1.7.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/mcuboot/zephyr/.config'
    No change to configuration in 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/mcuboot/zephyr/.config'
    No change to Kconfig header in 'C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/mcuboot/zephyr/include/generated/autoconf.h'
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake/mcuboot
    Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
    Dropping partition 'nvs_storage' since its size is 0.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_rel_v1399_cmake
    Including boilerplate (Zephyr base (cached)): C:/Zypher/v1.7.0/zephyr/cmake/app/boilerplate.cmake
    -- Using NCS Toolchain 1.7.0 for building. (C:/Zypher/v1.7.0/toolchain/cmake)

    === child image mcuboot - begin ===
    Including boilerplate (Zephyr base (cached)): C:/Zypher/v1.7.0/zephyr/cmake/app/boilerplate.cmake
    -- Using NCS Toolchain 1.7.0 for building. (C:/Zypher/v1.7.0/toolchain/cmake)
    MCUBoot bootloader key file: C:/Zypher/v1.7.0/bootloader/mcuboot/root-rsa-2048.pem
    === child image mcuboot - end ===

    CMake Warning at C:/Zypher/v1.7.0/nrf/modules/mcuboot/CMakeLists.txt:204 (message):

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


    Loading solution HomeBeacon_dev_sb.emProject
    Loading solution build.emProject
    Mapping project information
    Mapping project zephyr/merged.hex
    Mapping project all

    ...

    ...

    Let me know if you would like to see the whole trace.
    Kind regards
    Mohamed

  • Have you tried (at least for testing) to compile your project from command line using west and/or visual studio code? That can at least provide information if the issue is related to SES or not.

    Kenneth

Related