Skip to content

Commit e4a406f

Browse files
committed
Solved the SD card memory bug issue!!!
- Deleted old Mbed5 SDFileSystem and FATFileSystem, replaced with the new builtin MbedCE SDBlockDevice and FATFileSystem - Note that disabling the Keil RTOS (using mbed-baremetal) fixes the memory issue. However, we have no need to keep all the data on the stack, so we simply move it to static mem (or the heap if we want). This way we may still use threading in the future if we want. - Pin configurations are in mbed_app.json
1 parent f4ed0c3 commit e4a406f

24 files changed

+200
-7177
lines changed

Telemetry-SD-Card/CMakeLists.txt

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,6 @@ include(mbed_project_setup)
1313
# Include MBED OS
1414
add_subdirectory(../mbed-os ../mbed-os-build)
1515

16-
# Add FATFileSystem library, link it against mbed-core
17-
add_library(FATFileSystem STATIC FATFileSystem/FATDirHandle.cpp FATFileSystem/FATFileHandle.cpp FATFileSystem/FATFileSystem.cpp FATFileSystem/ChaN/ccsbcs.cpp FATFileSystem/ChaN/diskio.cpp FATFileSystem/ChaN/ff.cpp)
18-
target_include_directories(FATFileSystem
19-
PUBLIC FATFileSystem
20-
PUBLIC FATFileSystem/ChaN)
21-
target_link_libraries(FATFileSystem PUBLIC mbed-core-flags) # needed so the library can access Mbed symbols
22-
23-
# Add SDFileSystem library, link it against FATFileSystem and mbed-core
24-
add_library(SDFileSystem STATIC SDFileSystem/SDFileSystem.cpp)
25-
target_include_directories(SDFileSystem INTERFACE SDFileSystem)
26-
target_link_libraries(SDFileSystem PUBLIC mbed-core-flags) # needed so the library can access Mbed symbols
27-
target_link_libraries(SDFileSystem PUBLIC FATFileSystem) # SDFileSystem depends on FATFileSystem
28-
2916
# # Fetch Nanoarrow - a minimal implementation of Apache Arrow
3017
# include(FetchContent)
3118
# # This enables the nanoarrow IPC extension (required to use Arrow IPC functions)
@@ -46,6 +33,9 @@ add_executable(${PROJECT_NAME} main.cpp)
4633

4734
target_include_directories(${PROJECT_NAME} PUBLIC include)
4835
# target_link_libraries(${PROJECT_NAME} mbed-os FATFileSystem SDFileSystem nanoarrow nanoarrow_ipc)
49-
target_link_libraries(${PROJECT_NAME} mbed-os FATFileSystem SDFileSystem)
36+
# target_link_libraries(${PROJECT_NAME} mbed-baremetal FATFileSystem SDFileSystem)
37+
# target_link_libraries(${PROJECT_NAME} mbed-os FATFileSystem SDFileSystem)
38+
39+
target_link_libraries(${PROJECT_NAME} mbed-os mbed-storage-sd mbed-storage-fat)
5040

5141
mbed_set_post_build(${PROJECT_NAME})

Telemetry-SD-Card/FATFileSystem/.hg_archival.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

Telemetry-SD-Card/FATFileSystem/ChaN/ccsbcs.cpp

Lines changed: 0 additions & 348 deletions
This file was deleted.

Telemetry-SD-Card/FATFileSystem/ChaN/diskio.cpp

Lines changed: 0 additions & 117 deletions
This file was deleted.

Telemetry-SD-Card/FATFileSystem/ChaN/diskio.h

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)