CONFIG_SPI_NOR was assigned the value y, but got the value n.

Hello,

I am trying to implement littlefs in my external flash memory. I am using nrf52832 and try to implement the littlefs sample code. 

When I am trying to enable Config_spi_nor then I found CONFIG_SPI_NOR was assigned the value y, but got the value n. Could you please help me how I can enable this configuration? 

I am also attaching my overlay file and prj file. Please have a look. 

 

Thank you.

Best regards

FS

CONFIG_FLASH=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y

CONFIG_MAIN_STACK_SIZE=4096

# Let __ASSERT do its job
CONFIG_DEBUG=y

CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y

CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y

CONFIG_SETTINGS=y
CONFIG_SETTINGS_FS=y
CONFIG_SETTINGS_FS_DIR="/lfs/settings"
CONFIG_SETTINGS_FS_FILE="/lfs/settings/run"

Parents
  • // To get started, press Ctrl+Space to bring up the completion menu and view the available nodes.
    
    // You can also use the buttons in the sidebar to perform actions on nodes.
    // Actions currently available include:
    
    // * Enabling / disabling the node
    // * Adding the bus to a bus
    // * Removing the node
    // * Connecting ADC channels
    
    // For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html
    // You can also visit the nRF DeviceTree extension documentation at https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/guides/ncs_configure_app.html#devicetree-support-in-the-extension
    &spi2 {
        IS25LP128: IS25LP128@0 {
           compatible = "jedec,spi-nor";
           label = "25LP128";
           reg = <0>;
           spi-max-frequency = <40000000>; /* Adjust based on your flash specifications *//* Adjust based on your flash JEDEC ID */
           size = <0x8000000>; /* Adjust based on your flash size */
           has-dpd;
           t-enter-dpd = <3000>;
           t-exit-dpd = <3000>;
           jedec-id = [9d 60 18]; 
           partitions {
               compatible = "fixed-partitions";
               #address-cells = <1>;
               #size-cells = <1>;
    
              lfs1_part: partition@0 {
              label = "littlefs_storage";
              reg = <0x00000000 0x01000000>;
           };
        };  
      };
    };
     
    
     / {
         fstab {
             compatible = "zephyr,fstab";
             lfs1: lfs1 {
                 compatible = "zephyr,fstab,littlefs";
                 mount-point = "/lfs1";
                 partition = <&lfs1_part>;
                 automount;
                 read-size = <16>;
                 prog-size = <16>;
                 cache-size = <64>;
                 lookahead-size = <32>;
                 block-cycles = <512>;
             };
         };
     };
    
    /{
       chosen {
           nordic,pm-ext-flash = &IS25LP128;
       };
     };

  • Hi,

    Which board are you using?

    Does this board have an external flash on it?

    Is the SPI DTS node you use enabled (status = "okay")?

    Regards,
    Sigurd Hellesvik

  • I tried on my end.

    To build the hello world sample with the overlay and prj.conf you supplied earlier in this ticket. Building for nrf52dk_nrf52832.

    And it builds without error on my side.
    Do you see the same if you do this with the hello world sample?

  •  I also did the same with my hello world sample and getting the same result. 

  • Could you zip that and upload it here so I can try the exact same?

  • 8765.littlefs.zip Hi, I have uploaded the zip file. I am using the little fs sample code and modify the overlay file and prj file for my nrf52832. 

    I am getting the waring every time. 

  • It works for me as you can see below.
    Have you changed anything in the SDK?

    west build -p -b nrf52dk_nrf52832
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/sihe/Downloads/tmp/littlefs
    -- CMake version: 3.30.2
    -- Found Python3: /usr/bin/python3 (found suitable version "3.10.12", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /home/sihe/.cache/zephyr
    -- Zephyr version: 3.5.99 (/home/sihe/ncs/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52dk_nrf52832
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.16.8 (/home/sihe/zephyr-sdk-0.16.8)
    -- Found toolchain: zephyr 0.16.8 (/home/sihe/zephyr-sdk-0.16.8)
    -- Found Dtc: /usr/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /home/sihe/ncs/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
    -- Found devicetree overlay: /home/sihe/Downloads/tmp/littlefs/nrf52dk_nrf52832.overlay
    'label' is marked as deprecated in 'properties:' in /home/sihe/ncs/zephyr/dts/bindings/mtd/jedec,spi-nor.yaml for node /soc/spi@40023000/IS25LP128@0.
    -- Generated zephyr.dts: /home/sihe/Downloads/tmp/littlefs/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /home/sihe/Downloads/tmp/littlefs/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /home/sihe/Downloads/tmp/littlefs/build/zephyr/dts.cmake
    
    warning: Deprecated symbol SETTINGS_FS is enabled.
    
    Parsing /home/sihe/Downloads/tmp/littlefs/Kconfig
    Loaded configuration '/home/sihe/ncs/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832_defconfig'
    Merged configuration '/home/sihe/Downloads/tmp/littlefs/prj.conf'
    Configuration saved to '/home/sihe/Downloads/tmp/littlefs/build/zephyr/.config'
    Kconfig header saved to '/home/sihe/Downloads/tmp/littlefs/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /home/sihe/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/sihe/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /usr/bin/ccache
    -- Configuring done (2.8s)
    -- Generating done (0.1s)
    -- Build files have been written to: /home/sihe/Downloads/tmp/littlefs/build
    -- west build: building application
    [1/161] Preparing syscall dependency handling
    
    [3/161] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/home/sihe/ncs/zephyr), build: v3.5.99-ncs1-1
    [161/161] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       62608 B       512 KB     11.94%
                 RAM:       11360 B        64 KB     17.33%
            IDT_LIST:          0 GB        32 KB      0.00%
    

Reply
  • It works for me as you can see below.
    Have you changed anything in the SDK?

    west build -p -b nrf52dk_nrf52832
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/sihe/Downloads/tmp/littlefs
    -- CMake version: 3.30.2
    -- Found Python3: /usr/bin/python3 (found suitable version "3.10.12", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /home/sihe/.cache/zephyr
    -- Zephyr version: 3.5.99 (/home/sihe/ncs/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52dk_nrf52832
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.16.8 (/home/sihe/zephyr-sdk-0.16.8)
    -- Found toolchain: zephyr 0.16.8 (/home/sihe/zephyr-sdk-0.16.8)
    -- Found Dtc: /usr/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /home/sihe/ncs/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
    -- Found devicetree overlay: /home/sihe/Downloads/tmp/littlefs/nrf52dk_nrf52832.overlay
    'label' is marked as deprecated in 'properties:' in /home/sihe/ncs/zephyr/dts/bindings/mtd/jedec,spi-nor.yaml for node /soc/spi@40023000/IS25LP128@0.
    -- Generated zephyr.dts: /home/sihe/Downloads/tmp/littlefs/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /home/sihe/Downloads/tmp/littlefs/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /home/sihe/Downloads/tmp/littlefs/build/zephyr/dts.cmake
    
    warning: Deprecated symbol SETTINGS_FS is enabled.
    
    Parsing /home/sihe/Downloads/tmp/littlefs/Kconfig
    Loaded configuration '/home/sihe/ncs/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832_defconfig'
    Merged configuration '/home/sihe/Downloads/tmp/littlefs/prj.conf'
    Configuration saved to '/home/sihe/Downloads/tmp/littlefs/build/zephyr/.config'
    Kconfig header saved to '/home/sihe/Downloads/tmp/littlefs/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /home/sihe/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/sihe/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /usr/bin/ccache
    -- Configuring done (2.8s)
    -- Generating done (0.1s)
    -- Build files have been written to: /home/sihe/Downloads/tmp/littlefs/build
    -- west build: building application
    [1/161] Preparing syscall dependency handling
    
    [3/161] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/home/sihe/ncs/zephyr), build: v3.5.99-ncs1-1
    [161/161] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       62608 B       512 KB     11.94%
                 RAM:       11360 B        64 KB     17.33%
            IDT_LIST:          0 GB        32 KB      0.00%
    

Children
Related