SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download two short videos (registration required) highlighting:

System Workbench for STM32

Creating new Project for STM32F407 Discovery board and HAL driver with FatFs

i have a dicovrey f4 fattfs + usb msc + micro-sd ( +free rtos) running
i started from an old cubemx generated project (more than a year ago)
I remenber i had look at the cubef4 exemples to undertand a few things
and make it works in dma mode
but it was builing and almost working straigth away.

look like your are missing the BSP side that is “your wrapper arround sd and fatfts”
on my project source are in \Src\bsp_driver_sd.c
proto in “bsp_driver_sd.h”
this header is inlcude on “ffconf.h” that is referecne from fatfts middleware

few stuff in the header related to errors you’r getting

/* Includes ----------------------*/

  1. include “stm32f4xx_hal.h”

/* Exported constants --------------------*/

* @brief SD status structure definition

  1. define MSD_OK 0x00
  2. define MSD_ERROR 0x01

  1. ifndef SD_CardInfo

#define SD_CardInfo HAL_SD_CardInfoTypedef

  1. endif

/** @defgroup STM324x9I_EVAL_SD_Exported_Constants
* @{

  1. define SD_DATATIMEOUT ((uint32_t)0xFFFFFFFF)

  1. define SD_PRESENT ((uint8_t)0x01)
  2. define SD_NOT_PRESENT ((uint8_t)0x00)