Open ethancheez opened 4 months ago
I also had to comment out two lines in fprime/Os/CMakeLists.txt:87
to:
if (FPRIME_USE_BAREMETAL_SCHEDULER)
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Baremetal/TaskRunner/")
foreach (ITER_ITEM IN LISTS SOURCE_FILES)
if (ITER_ITEM MATCHES "Task\\.cpp$")
list(REMOVE_ITEM SOURCE_FILES "${ITER_ITEM}")
endif()
endforeach()
# list(APPEND SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Baremetal/File.cpp")
# list(APPEND SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Baremetal/FileSystem.cpp")
list(APPEND SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Baremetal/IntervalTimer.cpp")
list(APPEND SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Baremetal/Mutex.cpp")
list(APPEND SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Baremetal/Queue.cpp")
list(APPEND SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Baremetal/SystemResources.cpp")
list(APPEND SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Baremetal/Task.cpp")
endif()
These lines would force the use of the Baremetal versions of File.cpp and FileSystem.cpp and would prevent my Arduino versions to be used. Unsure if there is a better way to do this.
Add support for a file system on Arduino platforms, using an SD card.
See these additions:
@LeStarch I would like your expertise/opinion on this. Do you think this is worth adding? Or is work being done to implement a microFS within FPrime that would perform better (or make more sense) compared to an SD card instance?
So far I have done small tests with this and was able to read/write multiple files, create directories, delete files, move files etc.
A possible design flaw with this is that I had to use
new ::File
within the constructor and store the Arduino File class as a pointer tom_fd
.Adding this new feature will hopefully allow the integrating of FileUplink and FileDownlink for Baremetal applications. Edit: FileDownlink and Uplink works