[Bug] Errors in template for sd_diskio.c in STM32CubeMX 5.6.0/1
Hi,
I was hoping that this will be fixed in 5.6.1, but it's still there.
In function "DRESULT SD_read" is this part of code:
#if defined(ENABLE_SCRATCH_BUFFER)
}
else
{
/* Slow path, fetch each sector a part and memcpy to destination buffer */
int i;
for (i = 0; i < count; i++)
{
ret = BSP_SD_ReadBlocks_DMA((uint32_t*)scratch, (uint32_t)sector++, 1);
if (ret == MSD_OK )
{The problem is that variable "ret" is not defined and I have to define it manually after each code generation.
My settings are FreeRTOS, DMA and defined ENABLE_SCRATCH_BUFFER and ENABLE_SD_DMA_CACHE_MAINTENANCE
Also in addition to this, on line 78 is this code with missing USER CODE END comment.
/* USER CODE BEGIN enableSDDmaCacheMaintenance */
#define ENABLE_SD_DMA_CACHE_MAINTENANCE 1
/* USER CODE BEGIN enableSDDmaCacheMaintenance */The last thing is that I have defined symbol in project tool settings / Preprocessor "MBEDTLS_CONFIG_FILE="mbedtls_config.h" and this symbol disappear from the project settings every time the CubeMX code is generated, does anyone have any idea why is that happening?
Thanks,
Petr
