Skip to content

Commit

Permalink
chore: Remove support for binary storage format (#2900)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelcoeffic authored Dec 23, 2022
1 parent 919b83a commit f9bac7b
Show file tree
Hide file tree
Showing 50 changed files with 248 additions and 23,617 deletions.
2 changes: 2 additions & 0 deletions cmake/toolchain/native.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
if(APPLE)
set(CMAKE_C_FLAGS "-Wno-asm-operand-widths -Wno-deprecated-declarations")
set(CMAKE_CXX_FLAGS "-Wno-asm-operand-widths -Wno-deprecated-declarations")
set(CMAKE_C_FLAGS_DEBUG "-Wno-asm-operand-widths -Wno-deprecated-declarations")
set(CMAKE_CXX_FLAGS_DEBUG "-Wno-asm-operand-widths -Wno-deprecated-declarations")
endif()

if(MINGW OR WIN32)
Expand Down
45 changes: 8 additions & 37 deletions radio/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ option(TBS_RELEASE "Used to build TBS released firmware" OFF)
option(IMRC_RELEASE "Used to build IMRC released firmware" OFF)
option(HARDWARE_TRAINER_MULTI "Allow multi trainer" OFF)
option(BOOTLOADER "Include Bootloader" ON)
option(YAML_STORAGE "Enable YAML storage" ON)

# since we reset all default CMAKE compiler flags for firmware builds, provide an alternate way for user to specify additional flags.
set(FIRMWARE_C_FLAGS "" CACHE STRING "Additional flags for firmware target c compiler (note: all CMAKE_C_FLAGS[_*] are ignored for firmware/bootloader).")
Expand Down Expand Up @@ -149,45 +148,17 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/bitmaps/${BITMAPS_DIR})

include(gui/CMakeLists.txt)

# TODO: move to storage/
set(SRC ${SRC} storage/storage_common.cpp)

include(storage/conversions/CMakeLists.txt)

if(${STORAGE} STREQUAL SDCARD)
set(SRC ${SRC} storage/sdcard_common.cpp)
if(${STORAGE_FORMAT} STREQUAL RAW)
set(SRC ${SRC} storage/modelslist.cpp storage/sdcard_raw.cpp)
add_definitions(-DSDCARD_RAW)
elseif(${STORAGE_FORMAT} STREQUAL YAML)
set(SRC ${SRC} storage/sdcard_yaml.cpp)
add_definitions(-DSDCARD_YAML)
include(storage/yaml/CMakeLists.txt)
if (${STORAGE_CONVERT} STREQUAL EEPROM_RLC)
if (STORAGE_CONVERSIONS LESS 221)
set(SRC ${SRC} storage/eeprom_rlc.cpp)
add_definitions(-DEEPROM_RLC)
endif()
else(${STORAGE_CONVERT} STREQUAL RAW)
set(SRC ${SRC} storage/sdcard_raw.cpp)
endif()
endif()
if(STORAGE_MODELSLIST)
set(SRC ${SRC} storage/modelslist.cpp)
add_definitions(-DSTORAGE_MODELSLIST)
endif()
elseif(${STORAGE} STREQUAL EEPROM)
set(SRC ${SRC} storage/eeprom_common.cpp)
add_definitions(-DEEPROM)
if(${STORAGE_FORMAT} STREQUAL RLC)
set(SRC ${SRC} storage/eeprom_rlc.cpp)
add_definitions(-DEEPROM_RLC)
else()
set(SRC ${SRC} storage/eeprom_none.cpp)
add_definitions(-DEEPROM_NONE)
endif()
set(SRC ${SRC} storage/sdcard_common.cpp)
set(SRC ${SRC} storage/sdcard_yaml.cpp)
add_definitions(-DSDCARD_YAML)
include(storage/yaml/CMakeLists.txt)
if(STORAGE_MODELSLIST)
set(SRC ${SRC} storage/modelslist.cpp)
add_definitions(-DSTORAGE_MODELSLIST)
endif()


if(RTC_BACKUP_RAM)
add_definitions(-DRTC_BACKUP_RAM)

Expand Down
20 changes: 0 additions & 20 deletions radio/src/storage/conversions/CMakeLists.txt

This file was deleted.

288 changes: 0 additions & 288 deletions radio/src/storage/conversions/conversions.cpp

This file was deleted.

Loading

0 comments on commit f9bac7b

Please sign in to comment.