cancel
Showing results for 
Search instead for 
Did you mean: 

Problem where fopen() a bitmap file returns "Not enough space"

t-oka
Associate III
Hello community,
 
■Problems occurring:
When I tried to open a bitmap file with the fopen function as shown below, 
I encountered a problem that returned "Not enough space".
Do I need to change any settings on the STM32CubeID side?
Please help us solve it.
*1. It has been confirmed that the target directory and file exist.
*2. There is enough free space on C drive.
 
■Environment:
・Windows
・STM32CubeIDE_1.12.1
・nucleo-f207zgt6
・C language
・001.bmp (225 KB (230,538 bytes))
 
■Code:
char* path = "C:\\〇〇";
fileName = "C:\\〇〇\\001.bmp";
    if (access(path, F_OK) == 0) {
        struct stat st;
        if (stat(fileName, &st) == 0) {
        if ((BmpFp = fopen(filename,"rb"))==NULL) {
            // Result of the following processing: Not enough space
            char* er = strerror( errno );
            exit(1);
        }
    }
}
10 REPLIES 10

Hello Oskar_H

Sorry for the late confirmation.

Thank you, the problem has been resolved.
I was able to open a bitmap with an image on a microSD card inserted into a slot using FATFS.

Thank you for your help in resolving the issue.