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

SEGGER Embedded Studio bug report

in ~/ncs/zephyr/samples/hello_world/prj.conf
or
in ~/ncs/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_defconfig

CONFIG_I2C=y

in my nrf9160dk_nrf9160ns.overlay
/ {
    chosen {
        zephyr,console = &uart0;
        zephyr,shell-uart = &uart0;
        zephyr,uart-mcumgr = &uart0;
        zephyr,bt-mon-uart = &uart0;
    };
};

&uart0 {
        current-speed = <115200>;
        status = "okay";
        tx-pin = <1>;
        rx-pin = <0>;
        rts-pin = <0xFFFFFFFF>;
        cts-pin = <0xFFFFFFFF>;
};

&uart1 {
        current-speed = <115200>;
        status = "okay";
        tx-pin = <26>;
        rx-pin = <25>;
        rts-pin = <0xFFFFFFFF>;
        cts-pin = <0xFFFFFFFF>;
};

&i2c2 {
        compatible = "nordic,nrf-twim";
    status = "okay";
    sda-gpios = < &gpio0 0x0e 0x0 >;
        scl-gpios = < &gpio0 0x0f 0x0 >;
        clock-frequency = <I2C_BITRATE_STANDARD>;  
};

&i2c3 {
        compatible = "nordic,nrf-twim";
    status = "okay";
    sda-gpios = < &gpio0 0x1e 0x0 >;
        scl-gpios = < &gpio0 0x1f 0x0 >;
        clock-frequency = <I2C_BITRATE_STANDARD>;  
};

//////////////////////////////////////

after add

&spi3 {
        compatible = "nordic,nrf-spim";
        status = "disabled";
        sck-pin = <0xFFFFFFFF>;
        mosi-pin = <0xFFFFFFFF>;
        miso-pin = <0xFFFFFFFF>;
};

project -> configure nrf connect sdk project

check
~/ncs/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/zephyr/.config
#CONFIG_I2C is not set

*CONFIG_I2C set wrong config

////////////////////

and then i delete ~ncs/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/zephyr/.config
project -> configure nrf connect sdk project

check
~/ncs/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/zephyr/.config
CONFIG_I2C=y

*CONFIG_I2C set is correct~

Parents
  • Hi,

    If you have old configurations from an earlier build in your build directory, you can sometimes experience that these configurations are not changed. This can be because things are cached or it loads old configurations. If you build a sample without changing any configurations, then it will load zephyr/.config if that file exists in the build directory. However, if you make changes to prj.conf it should be able to notice that and load and merge nrf9160dk_nrf9160ns_defconfig and prj.conf.

    The best way to make sure you don't have anything cached that will affect your build is to always select Clean Build Directory when opening projects in SES.

    Best regards,

    Marte

Reply
  • Hi,

    If you have old configurations from an earlier build in your build directory, you can sometimes experience that these configurations are not changed. This can be because things are cached or it loads old configurations. If you build a sample without changing any configurations, then it will load zephyr/.config if that file exists in the build directory. However, if you make changes to prj.conf it should be able to notice that and load and merge nrf9160dk_nrf9160ns_defconfig and prj.conf.

    The best way to make sure you don't have anything cached that will affect your build is to always select Clean Build Directory when opening projects in SES.

    Best regards,

    Marte

Children
  • sometimes do twice
    project -> configure nrf connect sdk project
    the .config is setting wrong, either in linux version

  • Hi,

    It seems like I misunderstood the issue, as I thought you were changing the configurations in prj.conf, and that the configurations were not applied to your project, but I I now realize that you are changing the configurations in SES using menuconfig instead.

    Changes made in menuconfig in SES by Configure nRF Connect SDK Project are not permanent. When using this, the configurations are directly set in the .config file in the build folder, but this does not affect the prj.conf file in any way. Therefore, if you reload the project or run CMake again in any way, these changes will disappear and be overwritten by the configurations in prj.conf. If you want the configuration changes to be permanent, you should instead set them in prj.conf. Please be aware that if you make changes in prj.conf, you have to re-run CMake for these changes to be in effect, by reopening or reloading the project, or by clicking run CMake.

    This is something we are aware of already, and it is because of the way Zephyr's Kconfig and menuconfig usage is designed.

    It might be difficult to know which configurations to set in prj.conf, but in menuconfig in SES you can select Save As and save the .config file somewhere, as <file_name>.conf. You can then use this file as your prj.conf, or copy the relevant configurations from this file to the prj.conf file for the project. Please be aware that this file includes more configurations than just what is configured in menuconfig, and you do not need to include everything in that file in prj.conf.

    Best regards,

    Marte

Related