MCUBoot DFU Interference with ExFat Filesystem

Hi Folks!

I've got a rather bulky project that's having a rather bulky project. In short, my project tries to enable both MCUBoot DFU and an ExFat Filesystem. I've narrowed the problem down to some kind of conflict happening between KConfig option for enabling each of these features.

In particular, CONFIG_DISK_DRIVER_FLASH, an implication by CONFIG_APP_MSC_STORAGE_FLASH_FATFS, causes a cascade of errors.

I've created a public Github repo that includes my entire project, configuration settings and files, and a readme that details how to set up my project and enable both of these features at once.

That's located here: https://github.com/FinnWBiggs/mini_desktop

I would be quite grateful for any help detangling DFU and Filesystem options.

Best,

    - Finn

  • Hi Sigurd,

    Thank you so much, great find on that solution. You're right that that solves the USB sample.

    In a bizarre twist, I sunk my entire workday into trying to get my GitHub repo to build and compile and ended up in a strange state where I was getting very opaque assembler errors.

    [55/180] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    FAILED: zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj 
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF52840_XXAA -DPICOLIBC_INTEGER_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/zephyr/kernel/include -IC:/ncs/v2.5.0/zephyr/arch/arm/include -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/zephyr/subsys/usb/device -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/tests/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/modules/debug/segger/SEGGER -IC:/ncs/v2.5.0/modules/debug/segger/Config -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros C:/Users/finnb/Documents/auli/MCUBoot_ExFat/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.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:/Users/finnb/Documents/auli/MCUBoot_ExFat=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj -MF zephyr\CMakeFiles\zephyr.dir\misc\generated\configs.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj -c zephyr/misc/generated/configs.c
    C:\Users\finnb\AppData\Local\Temp\ccu25E1Q.s: Assembler messages:
    C:\Users\finnb\AppData\Local\Temp\ccu25E1Q.s:43: Error: missing expression
    [76/180] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_complete.c.obj
    ninja: build stopped: subcommand failed

    Luckily, I've been saved by a coworker, who tried this out by starting from a clean mass sample and made it simply work using your suggestions.

    Here is a link to a solution. (https://github.com/FinnWBiggs/mass_pm). To any and all future readers: please feel free to do anything you like with it. . 

    I've added a warning to the malfunctioning ReadMe of that repo to let future viewers know, and will leave both repos up so that future viewers of this post still have a reference.

    If you look at what's in my included error or in the repo (https://github.com/FinnWBiggs/MCUBoot_ExFat) and see an obvious problem, I'd be happy to know why I'm getting assembler errors.

    If it looks complicated to ID a problem, then let's just close this ticket -- I'm able to continue on my project.

    Regardless, I'm very glad to have a working filesystem, and I think we can close this ticket. Thank you Sigurd, you've been amazingly helpful. I hope you had a lovely and relaxing vacation.

    Best regards,

        - Finn

Related