Skip to content

Commit 9c6466c

Browse files
committed
Fix build failure for boards with less memory
1 parent 180b485 commit 9c6466c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

supervisor/shared/filesystem.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,13 @@ static void make_empty_file(FATFS *fatfs, const char *path) {
7171

7272

7373
static void make_sample_code_file(FATFS *fatfs) {
74-
FIL fs;
75-
UINT char_written = 0;
76-
const byte buffer[] = "print('Hello World!')\n";
77-
7874
#if CIRCUITPY_FULL_BUILD == 0
79-
make_empty_file(&vfs_fat->fatfs, "/code.py");
75+
make_empty_file(fatfs, "/code.py");
8076

8177
#else
78+
FIL fs;
79+
UINT char_written = 0;
80+
const byte buffer[] = "print('Hello World!')\n";
8281
//Create or modify existing code.py file
8382
f_open(fatfs, &fs, "/code.py", FA_WRITE | FA_CREATE_ALWAYS);
8483
f_write(&fs, buffer, sizeof(buffer) - 1, &char_written);

0 commit comments

Comments
 (0)