ff.h no such file or directory

Hi, 

I am working with nRF5340 and nRF Connect v2.7.0. When I try the mass sample it works fine. When I take the code to my custom project, I have 

ff.h no such file or directory

I have seen other threads that speak of the issue and the fact that there are issue witrh out of tree build, but I didn't found any solution to this. I assume it is because the files containing the code are not sourced to app directly, but linked like this : 

zephyr_link_libraries(MassStorageLib)

The MassStorageLib contain the files mass_storage.c and mass_storage.h that are mostly inspired by the working sample. 

How can I make it work ? As a subsidiary question, is it the recommended way to make a mass storage out of the nRf5340? 

Thank you for your help

Parents
  • Hello,

    As a subsidiary question, is it the recommended way to make a mass storage out of the nRf5340?

    If you get it to work with an adequate size of flash, then I don't see why not. 

    Most files are included using the configurations in prj.conf, or whatever .conf file you have included in your application. 

    Compare the prj.conf file of the mass sample with the prj.conf of your project, and also the build command (if you used any special arguments in your build command when building the mass sample). 

    Obviously, there will be some differences, but try to include the relevant configs from the mass sample into your project. Let me know if it still doesn't work.

    Best regards,

    Edvin

  • Hi, thank you for your feedback. At first sight, I don't see any config that is not on the non working project.

    working prj.conf : 

    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_USE_SEGGER_RTT=y
    CONFIG_USB_MASS_STORAGE=y
    CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
    CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
    CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR=y
    CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
    
    CONFIG_DISK_DRIVER_FLASH=y
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    
    CONFIG_FAT_FILESYSTEM_ELM=y
    # CONFIG_FILE_SYSTEM_LITTLEFS=y
    CONFIG_FILE_SYSTEM=y
    
    CONFIG_SIZE_OPTIMIZATIONS=n
    
    
    CONFIG_MAIN_STACK_SIZE=1536
    

    Non working prj.conf : 

    # Peripheral drivers
    
    # I2C
    CONFIG_NRFX_TWIM2=y
    
    # Timer
    CONFIG_NRFX_TIMER2=y
    
    # GPIO
    CONFIG_NRFX_GPIOTE0=y
    CONFIG_NRFX_GPIOTE_NUM_OF_EVT_HANDLERS=5
    
    # Flash 
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_MPU_ALLOW_FLASH_WRITE=y
    
    # Others 
    CONFIG_NRFX_PWM0=y
    CONFIG_NRFX_SPIM4=y
    CONFIG_NRFX_RNG=y
    CONFIG_NRFX_UARTE0=y
    CONFIG_NRFX_NVMC=y
    
    # BLE
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME_DYNAMIC=y
    CONFIG_BT_CTLR_CONN_RSSI=y
    CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
    CONFIG_BT_MAX_CONN=1
    
    # System settings 
    CONFIG_INIT_STACKS=y
    
    # Power management
    CONFIG_POWEROFF=y
    CONFIG_RESET_ON_FATAL_ERROR=n
    
    # Logging
    CONFIG_USE_SEGGER_RTT=y
    
    # Enable printf floating point support beware this take up to 7ko of flash
    CONFIG_CBPRINTF_FP_SUPPORT=y
    
    # Build options
    CONFIG_BUILD_NO_GAP_FILL=y
    CONFIG_MAIN_STACK_SIZE=8192
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    CONFIG_USB_DEVICE_STACK=y
    CONFIG_USB_DEVICE_PRODUCT="Zephyr MSC sample"
    CONFIG_USB_DEVICE_PID=0x0008
    CONFIG_USB_MASS_STORAGE=y
    CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
    
    CONFIG_DISK_DRIVER_FLASH=y
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    
    CONFIG_FAT_FILESYSTEM_ELM=y
    
    CONFIG_FILE_SYSTEM=y
    CONFIG_SIZE_OPTIMIZATIONS=n
    
    
    
    

    I tried to remove 

    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_MPU_ALLOW_FLASH_WRITE=y 
    Just in case as it was not on the working prj.conf, but it wasn't any better.

    Thank you for your help

    EDIT : I forgot to incude the build commands. Obviously on the working projet, I have 

    -IC:/ncs/v2.7.0/modules/fs/fatfs/include

    I also have -DZEPHYR_CONFIG_OVERRIDE=zephyr_fatfs_config.h that is not on the failing command line.

    I give you both commands in two separate file.

    Thank you for your help

    C:\ncs\toolchains\ce3b5ff664\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0 -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DZEPHYR_CONFIG_OVERRIDE=zephyr_fatfs_config.h -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.7.0/zephyr/include -IC:/Users/Documents/Project/app/zephyr_poc/mass/build/zephyr/include/generated -IC:/ncs/v2.7.0/zephyr/soc/nordic -IC:/ncs/v2.7.0/zephyr/soc/nordic/nrf53/. -IC:/ncs/v2.7.0/zephyr/soc/nordic/common/. -IC:/ncs/v2.7.0/zephyr/subsys/usb/device -IC:/ncs/v2.7.0/zephyr/drivers/usb/common/nrf_usbd_common/. -IC:/ncs/v2.7.0/nrf/include -IC:/ncs/v2.7.0/nrf/tests/include -IC:/ncs/v2.7.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.7.0/zephyr/modules/cmsis/. -IC:/ncs/v2.7.0/modules/hal/nordic/nrfx -IC:/ncs/v2.7.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.7.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.7.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.7.0/modules/debug/segger/SEGGER -IC:/ncs/v2.7.0/modules/debug/segger/Config -IC:/ncs/v2.7.0/zephyr/modules/fatfs -IC:/ncs/v2.7.0/modules/fs/fatfs/include -isystem C:/ncs/v2.7.0/zephyr/lib/libc/common/include -isystem C:/ncs/v2.7.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/Users/Documents/Project/app/zephyr_poc/mass/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.7.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/Users/Documents/Project/app/zephyr_poc/mass=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.7.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.7.0=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c C:/Users/Documents/Project/app/zephyr_poc/mass/src/main.c
      
    C:\ncs\toolchains\ce3b5ff664\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DBOARD_PCA10143=1 -DCONFIG_NRF_WIFI_FW_BIN=C:/ncs/v2.7.0/nrfxlib/nrf_wifi/fw_bins/default/nrf70.bin -DCONFIG_ZEPHYR -DDEBUG=1 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=153000 -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_PSA_CRYPTO_CONFIG -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\"nrf-psa-crypto-want-config.h\" -DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=\"nrf-psa-crypto-config.h\" -DNRF52_ERRATA_215_ENABLE_WORKAROUND=0 -DNRF5340_XXAA_APPLICATION -DNRF53_ERRATA_159_ENABLE_WORKAROUND=0 -DNRF53_ERRATA_43_ENABLE_WORKAROUND=0 -DNRF_LOG_USES_UART=1 -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DOSBUILD_OEM=0 -DPICOLIBC_DOUBLE_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D_USE_LONG_TIME_T=1 -D__HEAP_SIZE=0 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Users/Documents/Project/lib/hal/nRFConnect/wifi -IC:/Users/Documents/Project/lib/hal/nRFConnect -IC:/Users/Documents/Project/lib/hal/nRFConnect/utils -IC:/Users/Documents/Project/lib/hal/nRFConnect/nrf5340 -IC:/Users/Documents/Project/lib/hal -IC:/Users/Documents/Project/lib/components -IC:/Users/Documents/Project/lib/peripherals/hardware -IC:/Users/Documents/Project/lib/peripherals/common -IC:/Users/Documents/Project/lib/peripherals/common/lora -IC:/Users/Documents/Project/lib/peripherals -IC:/Users/Documents/Project/boards -IC:/ncs/v2.7.0/zephyr/include -IC:/Users/Documents/Project/_build/zephyr/include/generated -IC:/ncs/v2.7.0/modules/soc-hwmv1/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.7.0/zephyr/include/zephyr/posix -IC:/ncs/v2.7.0/modules/soc-hwmv1/soc/arm/nordic_nrf/nrf53/. -IC:/ncs/v2.7.0/modules/soc-hwmv1/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.7.0/zephyr/subsys/usb/device -IC:/ncs/v2.7.0/zephyr/subsys/bluetooth -IC:/ncs/v2.7.0/zephyr/subsys/net/l2 -IC:/ncs/v2.7.0/zephyr/subsys/net/lib/dns/. -IC:/ncs/v2.7.0/zephyr/subsys/net/ip -IC:/ncs/v2.7.0/zephyr/drivers/usb/common/nrf_usbd_common/. -IC:/ncs/v2.7.0/nrf/include -IC:/ncs/v2.7.0/nrf/modules/hostap/src -IC:/ncs/v2.7.0/nrf/modules/hostap/../../../modules/lib/hostap -IC:/ncs/v2.7.0/nrf/modules/hostap/../../../modules/lib/hostap/wpa_supplicant -IC:/ncs/v2.7.0/nrf/modules/hostap/../../../modules/lib/hostap/src -IC:/ncs/v2.7.0/nrf/drivers/wifi/nrf700x/inc -IC:/ncs/v2.7.0/nrfxlib/nrf_wifi/utils/inc -IC:/ncs/v2.7.0/nrfxlib/nrf_wifi/os_if/inc -IC:/ncs/v2.7.0/nrfxlib/nrf_wifi/bus_if/bus/qspi/inc -IC:/ncs/v2.7.0/nrfxlib/nrf_wifi/bus_if/bal/inc -IC:/ncs/v2.7.0/nrfxlib/nrf_wifi/fw_if/umac_if/inc -IC:/ncs/v2.7.0/nrfxlib/nrf_wifi/fw_load/mips/fw/inc -IC:/ncs/v2.7.0/nrfxlib/nrf_wifi/hw_if/hal/inc -IC:/ncs/v2.7.0/nrf/drivers/wifi/nrf700x/src/qspi/inc -IC:/ncs/v2.7.0/nrfxlib/nrf_wifi/hw_if/hal/inc/fw -IC:/ncs/v2.7.0/nrfxlib/nrf_wifi/fw_if/umac_if/inc/fw -IC:/ncs/v2.7.0/nrfxlib/nrf_wifi/fw_if/umac_if/inc/default -IC:/ncs/v2.7.0/nrf/tests/include -IC:/ncs/v2.7.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.7.0/zephyr/modules/cmsis/. -IC:/ncs/v2.7.0/modules/hal/nordic/nrfx -IC:/ncs/v2.7.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.7.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.7.0/zephyr/modules/hal_nordic/nrfx/. -IC:/Users/Documents/Project/_build/modules/libmetal/libmetal/lib/include -IC:/ncs/v2.7.0/modules/lib/open-amp/open-amp/lib/include -IC:/ncs/v2.7.0/modules/debug/segger/SEGGER -IC:/ncs/v2.7.0/modules/debug/segger/Config -IC:/ncs/v2.7.0/modules/crypto/tinycrypt/lib/include -IC:/Users/Documents/Project/_build/modules/nrf/subsys/nrf_security/src/include/generated -IC:/ncs/v2.7.0/nrf/subsys/nrf_security/include -IC:/ncs/v2.7.0/modules/crypto/oberon-psa-crypto/include -IC:/ncs/v2.7.0/modules/crypto/oberon-psa-crypto/library -IC:/ncs/v2.7.0/modules/crypto/mbedtls/library -IC:/ncs/v2.7.0/modules/crypto/mbedtls/include -IC:/ncs/v2.7.0/modules/crypto/mbedtls/include/library -IC:/ncs/v2.7.0/nrfxlib/crypto/nrf_oberon/include -IC:/ncs/v2.7.0/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.7.0/modules/crypto/oberon-psa-crypto/oberon/drivers -IC:/ncs/v2.7.0/nrfxlib/softdevice_controller/include -isystem C:/ncs/v2.7.0/zephyr/lib/libc/common/include -isystem C:/ncs/v2.7.0/nrfxlib/crypto/nrf_cc312_platform/include -g -Wno-enum-compare -Wunused-variable -Wunused-but-set-variable -Wno-unused-function -w -fno-strict-aliasing -Og -imacros C:/Users/Documents/Project/_build/zephyr/include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.7.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/Users/Documents/BTM=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.7.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.7.0=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -D_POSIX_THREADS -std=c99 -MD -MT lib/hal/CMakeFiles/BTMHalLib.dir/nRFConnect/nrf5340/drv_mass_storage.c.obj -MF lib\hal\CMakeFiles\BTMHalLib.dir\nRFConnect\nrf5340\drv_mass_storage.c.obj.d -o lib/hal/CMakeFiles/BTMHalLib.dir/nRFConnect/nrf5340/drv_mass_storage.c.obj -c C:/Users/Documents/Project/lib/hal/nRFConnect/nrf5340/drv_mass_storage.c
    In file included from C:/Users/Documents/Project/lib/hal/nRFConnect/nrf5340/drv_mass_storage.c:1:
       

  • Oh, ok. I got it after a couple of tries. 

    I am actually quite puzzled about this. I spent a lot (!) of time trying to understand it yesterday, trying to make your application find the ff.h and successfully include it

    I believe my CMake skills comes to short. However, I see that the way that you include your files in CMake seems quite intricate, and I can't tell whether it is correct or not. I saw that parts of your application were added as static libraries, for example. Perhaps that in some way confuses Zephyr so that it doesn't include the file system correctly. 

    I would advice that you try out a simpler approach, such as the NCS\zephyr\samples\subsys\usb\mass example does. At least this one builds fine with me, also when I build it outside the SDK.

    Best regards,

    Edvin

  • Hi, thank you for your time. I though the instructions and the comments in the code would be clear enough, sorry, I edited previous post to clarify. I will go for the method 1 then, as it seems the best way for now.

    What about the second issue I addressed? The one with the flashdisk log I gave? 

    As I said, this one doesn't comes from the way I build the project, because adding BLE to the working sample project leads to the same error.(the sample is located at fs_app\app\zephyr_poc\mass).

    By adding BLE, I mean, add these : 

    # BLE
    CONFIG_BT=y
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_DEVICE_NAME_DYNAMIC=y
    CONFIG_BT_CTLR_CONN_RSSI=y
    CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
    CONFIG_BT_MAX_CONN=1

    to fs_app\app\zephyr_poc\mass\prj.conf

    Regards

  • Sorry, I missed that part. I adjusted quite heavily while testing your application, so I forgot parts of what I did. 

    It is difficult to say exactly what is missing, but if you give the entire build log (including the warnings close to the beginning, it is easier to say where to start. But if I recall correctly, you need to add one of these to your prj.conf (or one of the other .conf files that are being used):

    CONFIG_APP_MSC_STORAGE_NONE
    CONFIG_APP_MSC_STORAGE_RAM
    CONFIG_APP_MSC_STORAGE_FLASH_FATFS
    CONFIG_APP_MSC_STORAGE_FLASH_LITTLEFS
    CONFIG_APP_MSC_STORAGE_SDCARD

    Note: Only one of them. 

    To add them, you also need to add the Kconfig file from the NCS\zephyr\samples\subsys\usb\mass\Kconfig so that these configs are defined somewhere. If you have a Kconfig file, just copy the content from this one at the end of your own. If you don't have one, then just copy the one in the "mass" sample. 

    As for the BLE part, not all of these are intended for the application core on the nRF5340. The build log should state that some of them are not defined, or they have some missing dependencies. I believe it was the CONFIG_BT_CTLR_CONN_RSSI and CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL that you can take out of your prj.conf file, and insert into child_image\hci_ipc.conf file. 

    And I really recommend that you stick to 2.6.1, at least until you get this up and running, unless there are specific 2.7.0 features that you require for this. A lot changed between these two, including parts of the build system and board configuration, so to make sure that you are not trying to do something that isn't working, test it with something that we know works first. 

    Best regards,

    Edvin

  • Hi,

    By looking at the KConfig, we can make the following table : 

    And by looking at fs_app/app/mass_storage_overlay.conf I can't see any conflicting option given. Can you confirm this please?

    More generally, were you able to build the mass storage sample with BLE enabled? If yes, is it possible to provide the project? I give you my app I can't make to work (you still can find it inside fs_app I gave earlier). I replaced the config options by the config_APP options, and I switched to ncs2.6.0 but it changed nothing (I already tried this, see previous post). I give you the complete logs also as asked. 

    zephyr_poc.zip

    Complete log :

         

    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: C:/Documents/Project/app/zephyr_poc/mass
    -- CMake version: 3.21.0
    -- Cache files will be written to: C:/ncs/v2.6.0/zephyr/.cache
    -- Zephyr version: 3.5.99 (C:/ncs/v2.6.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf7002dk_nrf5340_cpuapp
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v2.6.0/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp.dts
    -- Found devicetree overlay: boards/nrf5340dk_nrf5340_cpuapp.overlay
    -- Generated zephyr.dts: C:/Documents/Project/app/zephyr_poc/mass/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/Documents/Project/app/zephyr_poc/mass/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/Documents/Project/app/zephyr_poc/mass/build/zephyr/dts.cmake
    warning: BT_CTLR_TX_PWR_DYNAMIC_CONTROL (defined at subsys/bluetooth\controller/Kconfig:423) was
    assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: BT_CTLR (=n).
    See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL and/or
    look up BT_CTLR_TX_PWR_DYNAMIC_CONTROL 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: BT_CTLR_CONN_RSSI (defined at subsys/bluetooth\controller/Kconfig:524) was assigned the
    value 'y' but got the value 'n'. Check these unsatisfied dependencies: BT_CTLR_CONN_RSSI_SUPPORT
    (=n), BT_CTLR (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_CTLR_CONN_RSSI
    and/or look up BT_CTLR_CONN_RSSI 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.
    
    Parsing C:/Documents/Project/app/zephyr_poc/mass/Kconfig
    Loaded configuration 'C:/ncs/v2.6.0/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'c:/Documents/Project/app/zephyr_poc/mass/prj.conf'
    No change to configuration in 'C:/Documents/Project/app/zephyr_poc/mass/build/zephyr/.config'
    No change to Kconfig header in 'C:/Documents/Project/app/zephyr_poc/mass/build/zephyr/include/generated/autoconf.h'
    CMake Warning at C:/ncs/v2.6.0/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
      CONFIG_USB_DEVICE_VID has default value 0x2FE3.
    
      This value is only for testing and MUST be configured for USB products.
    
    === child image hci_ipc - CPUNET begin ===
    loading initial cache file C:/Documents/Project/app/zephyr_poc/mass/build/hci_ipc/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: C:/ncs/v2.6.0/zephyr/samples/bluetooth/hci_ipc
    -- CMake version: 3.21.0
    -- Cache files will be written to: C:/ncs/v2.6.0/zephyr/.cache
    -- Zephyr version: 3.5.99 (C:/ncs/v2.6.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf7002dk_nrf5340_cpunet
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/ncs/v2.6.0/nrf/boards/arm/nrf7002dk_nrf5340/nrf7002dk_nrf5340_cpunet.dts
    -- Generated zephyr.dts: C:/Documents/Project/app/zephyr_poc/mass/build/hci_ipc/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/Documents/Project/app/zephyr_poc/mass/build/hci_ipc/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/Documents/Project/app/zephyr_poc/mass/build/hci_ipc/zephyr/dts.cmake
    Parsing C:/ncs/v2.6.0/zephyr/Kconfig
    Loaded configuration 'C:/Documents/Project/app/zephyr_poc/mass/build/hci_ipc/zephyr/.config'
    No change to configuration in 'C:/Documents/Project/app/zephyr_poc/mass/build/hci_ipc/zephyr/.config'
    No change to Kconfig header in 'C:/Documents/Project/app/zephyr_poc/mass/build/hci_ipc/zephyr/include/generated/autoconf.h'
    -- libmetal version: 1.4.0 (C:/ncs/v2.6.0/zephyr/samples/bluetooth/hci_ipc)
    -- Build type:  
    -- Host:    Windows/AMD64
    -- Target:  Generic/arm
    -- Machine: arm
    -- open-amp version: 1.4.0 (C:/ncs/v2.6.0/modules/lib/open-amp/open-amp)
    -- Host:    Windows/AMD64
    -- Target:  Generic/arm
    -- Machine: arm
    -- C_FLAGS :  -Wall -Wextra
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Documents/Project/app/zephyr_poc/mass/build/hci_ipc
    === child image hci_ipc - CPUNET end ===
    
    -- libmetal version: 1.4.0 (C:/Documents/Project/app/zephyr_poc/mass)
    -- Build type:  
    -- Host:    Windows/AMD64
    -- Target:  Generic/arm
    -- Machine: arm
    -- open-amp version: 1.4.0 (C:/ncs/v2.6.0/modules/lib/open-amp/open-amp)
    -- Host:    Windows/AMD64
    -- Target:  Generic/arm
    -- Machine: arm
    -- C_FLAGS :  -Wall -Wextra
    -- Found partition manager static configuration: C:/Documents/Project/app/zephyr_poc/mass/pm_static.yml
    Partition 'rpmsg_nrf53_sram' is not included in the dynamic resolving since it is statically defined.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Documents/Project/app/zephyr_poc/mass/build
    [13/15] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      175196 B       256 KB     66.83%
                 RAM:       41796 B        64 KB     63.78%
               SRAM1:          0 GB        64 KB      0.00%
            IDT_LIST:          0 GB        32 KB      0.00%
    [8/92] Building C object zephyr/drivers/disk/CMakeFiles/drivers__disk.dir/flashdisk.c.obj
    FAILED: zephyr/drivers/disk/CMakeFiles/drivers__disk.dir/flashdisk.c.obj 
    C:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -IC:/ncs/v2.6.0/zephyr/include -IC:/Documents/Project/app/zephyr_poc/mass/build/zephyr/include/generated -IC:/ncs/v2.6.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.6.0/zephyr/soc/common/nordic_nrf/. -IC:/ncs/v2.6.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.6.0/zephyr/subsys/usb/device -IC:/ncs/v2.6.0/zephyr/subsys/bluetooth -IC:/ncs/v2.6.0/zephyr/drivers/usb/common/nrf_usbd_common/. -IC:/ncs/v2.6.0/nrf/include -IC:/ncs/v2.6.0/nrf/tests/include -IC:/ncs/v2.6.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.6.0/zephyr/modules/cmsis/. -IC:/ncs/v2.6.0/modules/hal/nordic/nrfx -IC:/ncs/v2.6.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.6.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.6.0/zephyr/modules/hal_nordic/nrfx/. -IC:/Documents/Project/app/zephyr_poc/mass/build/modules/libmetal/libmetal/lib/include -IC:/ncs/v2.6.0/modules/lib/open-amp/open-amp/lib/include -IC:/ncs/v2.6.0/modules/debug/segger/SEGGER -IC:/ncs/v2.6.0/modules/debug/segger/Config -IC:/ncs/v2.6.0/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.6.0/nrfxlib/softdevice_controller/include -isystem C:/ncs/v2.6.0/zephyr/lib/libc/common/include -isystem C:/ncs/v2.6.0/nrfxlib/crypto/nrf_cc312_platform/include -Wshadow -fno-strict-aliasing -Os -imacros C:/Documents/Project/app/zephyr_poc/mass/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/Documents/Project/app/zephyr_poc/mass=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.6.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.6.0=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT zephyr/drivers/disk/CMakeFiles/drivers__disk.dir/flashdisk.c.obj -MF zephyr\drivers\disk\CMakeFiles\drivers__disk.dir\flashdisk.c.obj.d -o zephyr/drivers/disk/CMakeFiles/drivers__disk.dir/flashdisk.c.obj -c C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:484:1: error: return type defaults to 'int' [-Werror=implicit-int]
      484 | PM_FOREACH_AFFILIATED_TO_disk(DEFINE_FLASHDISKS_CACHE)
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c: In function 'PM_FOREACH_AFFILIATED_TO_disk':
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:523:30: error: storage class specified for parameter 'flash_disks'
      523 | static struct flashdisk_data flash_disks[] = {
          |                              ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:523:15: error: parameter 'flash_disks' is initialized
      523 | static struct flashdisk_data flash_disks[] = {
          |               ^~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:524:39: error: 'DEFINE_FLASHDISKS_DEVICE' undeclared (first use in this function)
      524 |         PM_FOREACH_AFFILIATED_TO_disk(DEFINE_FLASHDISKS_DEVICE)
          |                                       ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:524:39: note: each undeclared identifier is reported only once for each function it appears in
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:533:1: error: expected declaration specifiers before 'PM_FOREACH_AFFILIATED_TO_disk'
      533 | PM_FOREACH_AFFILIATED_TO_disk(VERIFY_CACHE_SIZE_IS_NOT_ZERO_IF_NOT_READ_ONLY)
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/gcc.h:98,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain.h:50,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/sys/__assert.h:11,
                     from C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:10:
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:141:44: error: storage class specified for parameter '__init_disk_flash_init'
      141 | #define Z_INIT_ENTRY_NAME(init_id) _CONCAT(__init_, init_id)
          |                                            ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
      137 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:141:36: note: in expansion of macro '_CONCAT'
      141 | #define Z_INIT_ENTRY_NAME(init_id) _CONCAT(__init_, init_id)
          |                                    ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:208:17: note: in expansion of macro 'Z_INIT_ENTRY_NAME'
      208 |                 Z_INIT_ENTRY_NAME(name) = {.init_fn = {.sys = (init_fn_)}}
          |                 ^~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:190:9: note: in expansion of macro 'SYS_INIT_NAMED'
      190 |         SYS_INIT_NAMED(init_fn, init_fn, level, prio)
          |         ^~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:563:1: note: in expansion of macro 'SYS_INIT'
      563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
          | ^~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:206:42: error: parameter '__init_disk_flash_init' is initialized
      206 |         static const Z_DECL_ALIGN(struct init_entry)                           \
          |                                          ^~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/common.h:195:55: note: in definition of macro 'Z_DECL_ALIGN'
      195 | #define Z_DECL_ALIGN(type) __aligned(__alignof(type)) type
          |                                                       ^~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:190:9: note: in expansion of macro 'SYS_INIT_NAMED'
      190 |         SYS_INIT_NAMED(init_fn, init_fn, level, prio)
          |         ^~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:563:1: note: in expansion of macro 'SYS_INIT'
      563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
          | ^~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:141:44: error: section attribute not allowed for '__init_disk_flash_init'
      141 | #define Z_INIT_ENTRY_NAME(init_id) _CONCAT(__init_, init_id)
          |                                            ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
      137 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:141:36: note: in expansion of macro '_CONCAT'
      141 | #define Z_INIT_ENTRY_NAME(init_id) _CONCAT(__init_, init_id)
          |                                    ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:208:17: note: in expansion of macro 'Z_INIT_ENTRY_NAME'
      208 |                 Z_INIT_ENTRY_NAME(name) = {.init_fn = {.sys = (init_fn_)}}
          |                 ^~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:190:9: note: in expansion of macro 'SYS_INIT_NAMED'
      190 |         SYS_INIT_NAMED(init_fn, init_fn, level, prio)
          |         ^~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:563:1: note: in expansion of macro 'SYS_INIT'
      563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
          | ^~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:206:42: warning: 'used' attribute ignored [-Wattributes]
      206 |         static const Z_DECL_ALIGN(struct init_entry)                           \
          |                                          ^~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/common.h:195:55: note: in definition of macro 'Z_DECL_ALIGN'
      195 | #define Z_DECL_ALIGN(type) __aligned(__alignof(type)) type
          |                                                       ^~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:190:9: note: in expansion of macro 'SYS_INIT_NAMED'
      190 |         SYS_INIT_NAMED(init_fn, init_fn, level, prio)
          |         ^~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:563:1: note: in expansion of macro 'SYS_INIT'
      563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
          | ^~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:141:44: error: alignment may not be specified for '__init_disk_flash_init'
      141 | #define Z_INIT_ENTRY_NAME(init_id) _CONCAT(__init_, init_id)
          |                                            ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
      137 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:141:36: note: in expansion of macro '_CONCAT'
      141 | #define Z_INIT_ENTRY_NAME(init_id) _CONCAT(__init_, init_id)
          |                                    ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:208:17: note: in expansion of macro 'Z_INIT_ENTRY_NAME'
      208 |                 Z_INIT_ENTRY_NAME(name) = {.init_fn = {.sys = (init_fn_)}}
          |                 ^~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:190:9: note: in expansion of macro 'SYS_INIT_NAMED'
      190 |         SYS_INIT_NAMED(init_fn, init_fn, level, prio)
          |         ^~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:563:1: note: in expansion of macro 'SYS_INIT'
      563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
          | ^~~~~~~~
    In file included from C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:13,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/sw_isr_table.h:18,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/arch/arm/irq.h:19,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/arch/arm/arch.h:27,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/arch/cpu.h:19,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/kernel_includes.h:37,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/kernel.h:17,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/drivers/disk.h:28,
                     from C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:12:
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:563:10: error: 'disk_flash_init' undeclared (first use in this function)
      563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
          |          ^~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:208:64: note: in definition of macro 'SYS_INIT_NAMED'
      208 |                 Z_INIT_ENTRY_NAME(name) = {.init_fn = {.sys = (init_fn_)}}
          |                                                                ^~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:563:1: note: in expansion of macro 'SYS_INIT'
      563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
          | ^~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:484:1: error: type of 'DEFINE_FLASHDISKS_CACHE' defaults to 'int' [-Werror=implicit-int]
      484 | PM_FOREACH_AFFILIATED_TO_disk(DEFINE_FLASHDISKS_CACHE)
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:141:44: error: declaration for parameter '__init_disk_flash_init' but no such parameter
      141 | #define Z_INIT_ENTRY_NAME(init_id) _CONCAT(__init_, init_id)
          |                                            ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
      137 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:141:36: note: in expansion of macro '_CONCAT'
      141 | #define Z_INIT_ENTRY_NAME(init_id) _CONCAT(__init_, init_id)
          |                                    ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:208:17: note: in expansion of macro 'Z_INIT_ENTRY_NAME'
      208 |                 Z_INIT_ENTRY_NAME(name) = {.init_fn = {.sys = (init_fn_)}}
          |                 ^~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/init.h:190:9: note: in expansion of macro 'SYS_INIT_NAMED'
      190 |         SYS_INIT_NAMED(init_fn, init_fn, level, prio)
          |         ^~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:563:1: note: in expansion of macro 'SYS_INIT'
      563 | SYS_INIT(disk_flash_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
          | ^~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:523:30: error: declaration for parameter 'flash_disks' but no such parameter
      523 | static struct flashdisk_data flash_disks[] = {
          |                              ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:565: error: expected '{' at end of input
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:565: warning: control reaches end of non-void function [-Wreturn-type]
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c: At top level:
    C:/ncs/v2.6.0/zephyr/drivers/disk/flashdisk.c:415:37: warning: 'flash_disk_ops' defined but not used [-Wunused-const-variable=]
      415 | static const struct disk_operations flash_disk_ops = {
          |                                     ^~~~~~~~~~~~~~
    cc1.exe: some warnings being treated as errors
    [16/92] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v2.6.0/modules/hal/nordic/nrfx/drivers/src/nrfx_spim.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' --build 'c:\Users\Documents\Project\app\zephyr_poc\mass\build'

    Thank you for you help

  • Hello,

    I spoke to Vidar yesterday, who is handling your other ticket. It seems like this was pretty much the same question as your last question here. Please let me know if you still have some unanswered questions here, after checking out Vidar's reply. 

Reply Children
Related