CONFIG_APP_MSC_STORAGE_RAM VS FLASH_FATFS

Hi Team,
NCS v2.3.0
nrf52840

my project works as expected with CONFIG_APP_MSC_STORAGE_RAM=y

but I need storage FLASH_FATFS

I set CONFIG_APP_MSC_STORAGE_FLASH_FATFS=y
and the disk does not open in Windows, it gives an error window when connecting nrf USB.

Thank you.

4034.chatDK_update.7z
Parents Reply Children
  • Hi,

    Could you share your changed prj.conf file?

    Best regards,
    Dejan

  • #
    # Copyright (c) 2020 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    # Deffered logging helps improve LPN power consumption
    # when friendship is established.
    CONFIG_LOG_MODE_DEFERRED=y
    
    # General configuration
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    CONFIG_FLASH=y
    CONFIG_FLASH_MAP=y
    #CONFIG_NVS=y
    CONFIG_SETTINGS=y
    CONFIG_HWINFO=y
    CONFIG_DK_LIBRARY=y
    #CONFIG_PM_SINGLE_IMAGE=y
    #CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000
    #CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y
    
    # Bluetooth configuration
    CONFIG_BT=y
    CONFIG_BT_COMPANY_ID=0x0059
    CONFIG_BT_DEVICE_NAME="Mesh Chat"
    CONFIG_BT_L2CAP_TX_MTU=69
    CONFIG_BT_L2CAP_TX_BUF_COUNT=8
    CONFIG_BT_OBSERVER=y
    CONFIG_BT_PERIPHERAL=y
    #CONFIG_BT_SETTINGS=y
    CONFIG_BT_RX_STACK_SIZE=2000
    
    # Disable unused Bluetooth features
    CONFIG_BT_CTLR_DUP_FILTER_LEN=0
    CONFIG_BT_CTLR_LE_ENC=n
    CONFIG_BT_DATA_LEN_UPDATE=n
    CONFIG_BT_PHY_UPDATE=n
    CONFIG_BT_CTLR_CHAN_SEL_2=n
    CONFIG_BT_CTLR_MIN_USED_CHAN=n
    CONFIG_BT_CTLR_PRIVACY=n
    
    # Bluetooth Mesh configuration
    CONFIG_BT_MESH=y
    CONFIG_BT_MESH_RELAY=y
    CONFIG_BT_MESH_FRIEND=y
    CONFIG_BT_MESH_ADV_BUF_COUNT=13
    CONFIG_BT_MESH_RX_SEG_MAX=10
    CONFIG_BT_MESH_TX_SEG_MAX=10
    CONFIG_BT_MESH_PB_GATT=y
    CONFIG_BT_MESH_GATT_PROXY=y
    CONFIG_BT_MESH_DK_PROV=y
    
    # Enable Bluetooth mesh models debug logs
    CONFIG_BT_DEBUG_LOG=y
    CONFIG_BT_MESH_LOG_LEVEL_DBG=y
    
    # Enable Shell module and use UART as a backend
    CONFIG_SHELL=y
    CONFIG_SHELL_BACKEND_SERIAL=y
    
    CONFIG_USE_SEGGER_RTT=y
    
    CONFIG_STDOUT_CONSOLE=y
    
    #USB related configs
    CONFIG_USB_DEVICE_STACK=y
    CONFIG_USB_DEVICE_PRODUCT="Zephyr MSC sample"
    CONFIG_USB_DEVICE_PID=0x0008
    CONFIG_LOG=y
    CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
    CONFIG_USB_MASS_STORAGE=y
    CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
    CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR=y
    CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
    
    CONFIG_MAIN_STACK_SIZE=1536
    CONFIG_APP_MSC_STORAGE_FLASH_FATFS=y
    #CONFIG_APP_MSC_STORAGE_RAM=y
    
    # FOTA FOTA FOTA
    CONFIG_IMG_MANAGER=y
    CONFIG_MCUBOOT_IMG_MANAGER=y
    # Enable point to point DFU over SMP
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_MCUMGR=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    # Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
    CONFIG_MCUMGR_SMP_BT=y
    CONFIG_MCUMGR_SMP_BT_AUTHEN=n
    
    CONFIG_BT_L2CAP_TX_MTU=252
    #CONFIG_BT_L2CAP_RX_MTU=252
    #CONFIG_BT_RX_BUF_LEN=260
    CONFIG_BT_BUF_ACL_RX_SIZE=256
    CONFIG_BT_DATA_LEN_UPDATE=y
    CONFIG_BT_AUTO_DATA_LEN_UPDATE=y
    
    # Some command handlers require a large stack.
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    
    # Enable Extended Advertiser to advertise BT SMP service
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_EXT_ADV_MAX_ADV_SET=4
    
    # One extra connection for mesh GATT/proxy and one for SMP BT.
    CONFIG_BT_MAX_CONN=3
    
    # One extra identity for SMP service
    CONFIG_BT_ID_MAX=2
    # end FOTA FOTA FOTA end
    
    # FOTA External flash
    CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
    
    CONFIG_NVS=n 							
    CONFIG_SETTINGS=n 	
    CONFIG_PM_SINGLE_IMAGE=n 					
    # CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000		
    CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=n 				
    CONFIG_BT_SETTINGS=n
    

  • Hi,

    I have replicated your issue using NCS v2.3.0. There are currently 2 options how you can fix the build error. 

    First option:

    //in prj.conf, comment out configuration option CONFIG_BOOTLOADER_MCUBOOT
    #CONFIG_BOOTLOADER_MCUBOOT=y
    


    Second option:
    //in prj.conf, make a following change to CONFIG_NVS
    CONFIG_NVS=y


    With either one of above-mentioned changes, you should be able to build your project successfully.

    Best regards,
    Dejan

  • Hi,
    #CONFIG_BOOTLOADER_MCUBOOT=y
    mass storage works, but FOTA update stopped working.
    When can we expect a complete solution to the problem?

    Best regards,
    Serhii

  • Hi,

    Could you please describe how you perform FOTA and provide all steps to reproduce your issue?

    Could you provide your new project if there are differences with previously uploaded one?

    Could you also provide log which would show us the error that you get when performing FOTA?

    Due to vacations and potential limited staff availability, I cannot provide the expectation for problem resolution. However, I will look into your problem together with our developers and I will keep you updated with relevant new information. I have already reached out to our developers internally.

    Thank you for your patience and understanding.

    Best regards,
    Dejan

Related