Getting "no such file or directory" for lfs and lvgl when upgrading to 2.6.1

I just upgraded my nRF Connect for VSC to 2.6.1 and now am getting these errors:

/opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/fs/littlefs.h:14:10: fatal error: lfs.h: No such file or directory
   14 | #include <lfs.h>
      |          ^~~~~~~

and 

/Users/lj/Projects/GitHub/lj/test1/src/main.c:9:10: fatal error: lvgl.h: No such file or directory
    9 | #include <lvgl.h>

I saw this as well:

warning: ST7789V (defined at drivers/display/Kconfig.st7789v:6) was assigned the value 'y' but got
the value 'n'. Check these unsatisfied dependencies: DISPLAY (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_ST7789V and/or look up ST7789V 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.

but I have CONFIG_DISPLAY=y in the prj.conf. This also followed but could be related to the prior error:

warning: The choice symbol ST7789V_RGB565 (defined at drivers/display/Kconfig.st7789v:24) was
selected (set =y), but no symbol ended up as the choice selection. See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_ST7789V_RGB565 and/or look up
ST7789V_RGB565 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.

Parents
  • Hi Leo

    What did you upgrade from? Did you remember to also upgrade the toolchain? 

    Could you post your prj.conf and your overlay? 

    Regards

    Runar

  • prj.conf:

    # memory settings
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    CONFIG_HEAP_MEM_POOL_SIZE=25000
    
    # MCU
    CONFIG_BOOTLOADER_MCUBOOT=n
    CONFIG_MULTITHREADING=y
    
    # Enable Flash
    CONFIG_FLASH=y
    CONFIG_FLASH_MAP=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    
    # file system
    CONFIG_FILE_SYSTEM=y
    CONFIG_FILE_SYSTEM_LITTLEFS=y
    
    #SPI FLASH
    CONFIG_SPI=n
    CONFIG_NORDIC_QSPI_NOR=y
    
    #DT_HAS_JEDEC_SPI_NOR_ENABLED=y
    CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n
    
    # MCUBOOT
    CONFIG_IMG_MANAGER=n
    CONFIG_MCUBOOT_IMG_MANAGER=n   # turning off for now
    CONFIG_IMG_ERASE_PROGRESSIVELY=n   # turning off for now
    
    # debug (mcu needs to be off or will overload flash)
    CONFIG_LOG=y
    CONFIG_LOG_MODE_MINIMAL=y
    CONFIG_LOG_MODE_IMMEDIATE=y
    CONFIG_DEBUG=y
    
    #BASIC CONFIG
    CONFIG_MAIN_STACK_SIZE=4096
    
    CONFIG_DISPLAY=y
    CONFIG_DISPLAY_LOG_LEVEL_ERR=y
    
    # lvgl
    CONFIG_LV_Z_MEM_POOL_SIZE=16384
    CONFIG_LVGL=y
    CONFIG_LV_USE_LOG=y
    CONFIG_LV_MEM_CUSTOM=y
    CONFIG_LV_USE_LABEL=y
    CONFIG_LV_USE_BTN=y
    CONFIG_LV_USE_IMG=y
    CONFIG_LV_FONT_DEFAULT_MONTSERRAT_18=y
    CONFIG_LV_FONT_MONTSERRAT_20=y
    CONFIG_LV_FONT_MONTSERRAT_24=y
    CONFIG_LV_FONT_MONTSERRAT_28=y
    CONFIG_LV_FONT_MONTSERRAT_48=y
    
    CONFIG_LV_COLOR_16_SWAP=y
    CONFIG_LV_COLOR_DEPTH_16=y
    
    # Display (for the st7789 build)
    #CONFIG_SPI=y
    CONFIG_ST7789V=y
    CONFIG_ST7789V_RGB565=y
    #CONFIG_HAS_SITRONIX_ST7789V=y
    
    # printing/debugging
    CONFIG_PRINTK=y
    
    # zbus
    CONFIG_ZBUS=y
    CONFIG_ZBUS_RUNTIME_OBSERVERS=y
    CONFIG_ZBUS_LOG_LEVEL_ERR=y
    CONFIG_ZBUS_LOG_LEVEL_INF=y
    CONFIG_ZBUS_LOG_LEVEL_DBG=y
    CONFIG_ZBUS_OBSERVER_NAME=y
    CONFIG_ZBUS_CHANNEL_NAME=y
    
    # config date/time
    CONFIG_NEWLIB_LIBC=y
    CONFIG_POSIX_API=y
    
    # BLE
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME="Test BLE"
    CONFIG_BT_RX_STACK_SIZE=4096
    
    CONFIG_RESET_ON_FATAL_ERROR=n
    

    nrf5340dk_nrf5340_cpuapp.overlay:

    &pinctrl {
    
        spi4_default: spi4_default {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 0, 6)>,
                    <NRF_PSEL(SPIM_MOSI, 0, 25)>;
            };
        };
    
        spi4_sleep: spi4_sleep {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 0, 6)>,
                    <NRF_PSEL(SPIM_MOSI, 0, 25)>;
                low-power-enable;
            };
        };
    
        // Set to I2C pins that the touch screen is connected to
        i2c2_default: i2c2_default {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 1, 2)>,
                    <NRF_PSEL(TWIM_SCL, 1, 3)>;
            };
        };
    
        i2c2_sleep: i2c2_sleep {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 1, 2)>,
                    <NRF_PSEL(TWIM_SCL, 1, 3)>;
                low-power-enable;
            };
        };
    };
    
    &spi4 {
    	compatible = "nordic,nrf-spim";
    	status = "okay";
    	pinctrl-0 = <&spi4_default>;
    	pinctrl-1 = <&spi4_sleep>;
        pinctrl-names = "default", "sleep";
    	cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
    
        st7789v_st7789v_tl019fqv01: st7789v@0 {
            compatible = "sitronix,st7789v";
            spi-max-frequency = <20000000>;
            reg = <0>;
            cmd-data-gpios = < &gpio1 11 GPIO_ACTIVE_LOW>;
            reset-gpios = < &gpio1 10 GPIO_ACTIVE_LOW>;
            width = <240>;
            height = <240>;
            x-offset = <0>;
            y-offset = <0>;
            vcom = <0x19>;
            gctrl = <0x35>;
            vrhs = <0x12>;
            vdvs = <0x20>;
            mdac = <0x00>;
            gamma = <0x01>;
            colmod = <0x05>;
            lcm = <0x2c>;
            porch-param = [0c 0c 00 33 33];
            cmd2en-param = [5a 69 02 01];
            pwctrl1-param = [a4 a1];
            pvgam-param = [D0 04 0D 11 13 2B 3F 54 4C 18 0D 0B 1F 23];
            nvgam-param = [D0 04 0C 11 13 2C 3F 44 51 2F 1F 1F 20 23];
            ram-param = [00 F0];
            rgb-param = [CD 08 14];
    	};
    };
    
    
    &i2c2 {
        compatible = "nordic,nrf-twim";
        status = "okay";
        clock-frequency = <I2C_BITRATE_FAST>;
        pinctrl-0 = <&i2c2_default>;
        pinctrl-1 = <&i2c2_sleep>;
        pinctrl-names = "default", "sleep";
    
        cst816s: cst816s@15 {
            compatible = "hynitron,cst816s";
            reg = <0x15>;
            irq-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
            rst-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
        };
    };
    
    / {
    	fstab {
    		compatible = "zephyr,fstab";
    		lfs: lfs {
    			compatible = "zephyr,fstab,littlefs";
    			mount-point = "/lfs";
    			partition = <&littlefs_storage>;
    			automount;
                read-size = <16>;
    			prog-size = <16>;
    			cache-size = <64>;
    			lookahead-size = <32>;
    			block-cycles = <512>;
    		};
    	};
    };
    
    /delete-node/ &storage_partition;
    
    &mx25r64 {
    	partitions {
    		compatible = "fixed-partitions";
    		#address-cells = <1>;
    		#size-cells = <1>;
    
    		littlefs_storage: partition@0 {
    			label = "littlefs_storage";
    			reg = <0x00000000 0x00200000>;
    		};
    		lvgl_raw_partition: partition@200000 {
    			label = "lvgl_raw_partition";
    			reg = <0x00200000 0x00200000>;
    		};
            settings_partition: partition@400000 {
                label = "settings_partition";
                reg = <0x400000 0x100000 >;
            };
    	};
    };
    
    / {
        chosen {
            nordic,pm-ext-flash = &mx25r64;
            zephyr,display = &st7789v_st7789v_tl019fqv01;
            zephyr,keyboard-scan = &cst816s;
        };
    
        /* 
        aliases {
            vibrator_pwm = &led0;
        };
        */
    
        vib_pwr: vib-pwr-ctrl {
            compatible = "regulator-fixed";
            regulator-name = "vib-pwr-ctrl";
            enable-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
        };
    };

  • You have not enabled SPI in your overlay. Both CONFIG_SPI is set to n. Try to set CONFIG_SPI=y and do a prestin build. 

    Regards

    Runar

Reply Children
Related