This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

littleFS library with STM32H7 memory issue?

Hello,

I'm using STM32H753 eval board, earlier I was using STM32CubeIDE wherein I've successfully tested littleFS(File system) library with external flash. 

littleFS - https://github.com/littlefs-project/littlefs

this code works ok in debug mode and normal mode(without debugger) if I compile it through STM32CubeIDE.

then I've switched to Keil MDK - version 5.33, ported all the application function, in debug mode this code working ok, I'm able to format external flash with littleFS, mount it and create/ read/ write files. 

if I download code in normal mode(without debugger) then the board is not coming up it means execution is not reaching even to GPIO initialization as I've just put one LED ON in GPIO initialization. 

earlier I thought it might be watchdog reset issue but same code without initializing littleFS works ok in normal mode.

then, I tried increasing stack and heap size to max extent but it did not helped.

this littleFS library is based on nested function calls and structures are passed as input parameters to each function.

I've checked in compiler user guide, if any limitations are given on passing structures, those are general limitations only.

my code is:

int main(void)
{
/* USER CODE BEGIN 1 */
uint8_t res;
/* USER CODE END 1 */

/* MCU Configuration--------------------------------------------------------*/

/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();

/* USER CODE BEGIN Init */

/* USER CODE END Init */

/* Configure the system clock */
SystemClock_Config();

/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */

/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_MDMA_Init();
MX_QUADSPI_Init();
/* USER CODE BEGIN 2 */
// resetSlave();
//GPIOF->ODR ^= LED1_RGB_Pin;
//HAL_Delay(10);
res = extFlashInit();/* TODO: handle exception */
if(res == 0)
{
GPIOF->ODR ^= LED1_RGB_Pin;
lfsInit();/* TODO: handle exception */
}

/* USER CODE END 2 */

/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{

}

}

did anybody used littleFS with Keil?

thanks,