mirror of https://github.com/gkostka/lwext4.git
gkostka
11 years ago
18 changed files with 126 additions and 98 deletions
@ -0,0 +1,5 @@ |
|||
#Blockdev library |
|||
aux_source_directory(filedev BLOCKDEV_SRC) |
|||
aux_source_directory(filedev_win BLOCKDEV_SRC) |
|||
add_library(blockdev ${BLOCKDEV_SRC}) |
|||
|
@ -0,0 +1,4 @@ |
|||
#Generic demo |
|||
add_executable(fileimage_demo main.c) |
|||
target_link_libraries(fileimage_demo lwext4) |
|||
target_link_libraries(fileimage_demo blockdev) |
@ -1,9 +0,0 @@ |
|||
include_directories(blockdev/filedev) |
|||
include_directories(blockdev/filedev_win) |
|||
|
|||
aux_source_directory(blockdev/filedev GENERIC_SRC) |
|||
aux_source_directory(blockdev/filedev_win GENERIC_SRC) |
|||
aux_source_directory(demos/generic GENERIC_SRC) |
|||
|
|||
add_executable(fileimage_demo ${GENERIC_SRC}) |
|||
target_link_libraries(fileimage_demo lwext4) |
@ -0,0 +1,37 @@ |
|||
#Discoery disco demo |
|||
enable_language(ASM) |
|||
set (STM32F429_DEMO_ASM |
|||
startup.S |
|||
) |
|||
|
|||
|
|||
include_directories(.) |
|||
include_directories(cmsis) |
|||
include_directories(stm/lcd_utils) |
|||
include_directories(stm/stm32f4_spl/inc) |
|||
include_directories(stm/stm32f429) |
|||
include_directories(stm/usb_dev/Core/inc) |
|||
include_directories(stm/usb_host/Core/inc) |
|||
include_directories(stm/usb_host/Class/MSC/inc) |
|||
include_directories(stm/usb_otg/inc) |
|||
include_directories(stm/usb_user) |
|||
|
|||
aux_source_directory(. STM32F429_DEMO) |
|||
aux_source_directory(cmsis STM32F429_DEMO) |
|||
aux_source_directory(stm/lcd_utils STM32F429_DEMO) |
|||
aux_source_directory(stm/stm32f4_spl/src STM32F429_DEMO) |
|||
aux_source_directory(stm/stm32f429 STM32F429_DEMO) |
|||
aux_source_directory(stm/usb_host/Core/src STM32F429_DEMO) |
|||
aux_source_directory(stm/usb_host/Class/MSC/src STM32F429_DEMO) |
|||
aux_source_directory(stm/usb_otg/src STM32F429_DEMO) |
|||
aux_source_directory(stm/usb_user STM32F429_DEMO) |
|||
add_executable(stm324f29_demo ${STM32F429_DEMO} ${STM32F429_DEMO_ASM}) |
|||
|
|||
set_target_properties(stm324f29_demo PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter") |
|||
set_target_properties(stm324f29_demo PROPERTIES COMPILE_FLAGS "-Wno-format") |
|||
set_target_properties(stm324f29_demo PROPERTIES COMPILE_DEFINITIONS "STM32F429_439xx") |
|||
|
|||
set_target_properties(stm324f29_demo PROPERTIES LINK_FLAGS "-T${CMAKE_SOURCE_DIR}/demos/stm32f429_disco/stm32f429.ld") |
|||
target_link_libraries(stm324f29_demo lwext4) |
|||
|
|||
add_custom_target(stm32f429_size ALL DEPENDS stm324f29_demo COMMAND ${SIZE} -B stm324f29_demo) |
@ -1,38 +0,0 @@ |
|||
#Discoery disco demo |
|||
enable_language(ASM) |
|||
set (STM32F429_DEMO_ASM |
|||
demos/stm32f429_disco/startup.S |
|||
) |
|||
|
|||
|
|||
include_directories(demos/stm32f429_disco) |
|||
include_directories(demos/stm32f429_disco/cmsis) |
|||
include_directories(demos/stm32f429_disco/stm/lcd_utils) |
|||
include_directories(demos/stm32f429_disco/stm/stm32f4_spl/inc) |
|||
include_directories(demos/stm32f429_disco/stm/stm32f429) |
|||
include_directories(demos/stm32f429_disco/stm/usb_dev/Core/inc) |
|||
include_directories(demos/stm32f429_disco/stm/usb_host/Core/inc) |
|||
include_directories(demos/stm32f429_disco/stm/usb_host/Class/MSC/inc) |
|||
include_directories(demos/stm32f429_disco/stm/usb_otg/inc) |
|||
include_directories(demos/stm32f429_disco/stm/usb_user) |
|||
|
|||
aux_source_directory(demos/stm32f429_disco STM32F429_DEMO) |
|||
aux_source_directory(demos/stm32f429_disco/cmsis STM32F429_DEMO) |
|||
aux_source_directory(demos/stm32f429_disco/stm/lcd_utils STM32F429_DEMO) |
|||
aux_source_directory(demos/stm32f429_disco/stm/stm32f4_spl/src STM32F429_DEMO) |
|||
aux_source_directory(demos/stm32f429_disco/stm/stm32f429 STM32F429_DEMO) |
|||
aux_source_directory(demos/stm32f429_disco/stm/usb_host/Core/src STM32F429_DEMO) |
|||
aux_source_directory(demos/stm32f429_disco/stm/usb_host/Class/MSC/src STM32F429_DEMO) |
|||
aux_source_directory(demos/stm32f429_disco/stm/usb_otg/src STM32F429_DEMO) |
|||
aux_source_directory(demos/stm32f429_disco/stm/usb_user STM32F429_DEMO) |
|||
|
|||
add_executable(stm324f29_demo ${STM32F429_DEMO} ${STM32F429_DEMO_ASM}) |
|||
|
|||
set_target_properties(stm324f29_demo PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter") |
|||
set_target_properties(stm324f29_demo PROPERTIES COMPILE_FLAGS "-Wno-format") |
|||
set_target_properties(stm324f29_demo PROPERTIES COMPILE_DEFINITIONS "STM32F429_439xx") |
|||
|
|||
set_target_properties(stm324f29_demo PROPERTIES LINK_FLAGS "-T${CMAKE_SOURCE_DIR}/demos/stm32f429_disco/stm32f429.ld") |
|||
target_link_libraries(stm324f29_demo lwext4) |
|||
|
|||
add_custom_target(stm32f429_size ALL DEPENDS stm324f29_demo COMMAND ${SIZE} -B stm324f29_demo) |
@ -0,0 +1,12 @@ |
|||
#fs_test executables |
|||
add_executable(lwext4_server lwext4_server.c) |
|||
target_link_libraries(lwext4_server lwext4) |
|||
target_link_libraries(lwext4_server blockdev) |
|||
if(WIN32) |
|||
target_link_libraries(lwext4_server ws2_32) |
|||
endif(WIN32) |
|||
add_executable(lwext4_client lwext4_client.c) |
|||
target_link_libraries(lwext4_client lwext4) |
|||
if(WIN32) |
|||
target_link_libraries(lwext4_client ws2_32) |
|||
endif(WIN32) |
@ -1,17 +0,0 @@ |
|||
include_directories(blockdev/filedev) |
|||
include_directories(blockdev/filedev_win) |
|||
|
|||
aux_source_directory(blockdev/filedev BLOCKDEV_SRC) |
|||
aux_source_directory(blockdev/filedev_win BLOCKDEV_SRC) |
|||
|
|||
|
|||
add_executable(lwext4_server fs_test/lwext4_server.c ${BLOCKDEV_SRC}) |
|||
target_link_libraries(lwext4_server lwext4) |
|||
if(WIN32) |
|||
target_link_libraries(lwext4_server ws2_32) |
|||
endif(WIN32) |
|||
add_executable(lwext4_client fs_test/lwext4_client.c ${BLOCKDEV_SRC}) |
|||
target_link_libraries(lwext4_client lwext4) |
|||
if(WIN32) |
|||
target_link_libraries(lwext4_client ws2_32) |
|||
endif(WIN32) |
@ -0,0 +1,8 @@ |
|||
|
|||
#LIBRARY |
|||
include_directories(.) |
|||
aux_source_directory(. LWEXT4_SRC) |
|||
add_library(lwext4 ${LWEXT4_SRC}) |
|||
add_custom_target(lib_size ALL DEPENDS lwext4 COMMAND ${SIZE} -B liblwext4.a) |
|||
|
|||
|
@ -0,0 +1,25 @@ |
|||
# Name of the target |
|||
set(CMAKE_SYSTEM_PROCESSOR generic) |
|||
|
|||
# Toolchain settings |
|||
set(CMAKE_C_COMPILER gcc) |
|||
set(CMAKE_CXX_COMPILER g++) |
|||
set(AS as) |
|||
set(AR ar) |
|||
set(OBJCOPY objcopy) |
|||
set(OBJDUMP objdump) |
|||
set(SIZE size) |
|||
|
|||
set(CMAKE_C_FLAGS "-std=gnu99 -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags") |
|||
set(CMAKE_CXX_FLAGS "-fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags") |
|||
set(CMAKE_ASM_FLAGS "" CACHE INTERNAL "asm compiler flags") |
|||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections" CACHE INTERNAL "exe link flags") |
|||
|
|||
|
|||
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -ggdb3" CACHE INTERNAL "c debug compiler flags") |
|||
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ggdb3" CACHE INTERNAL "cxx debug compiler flags") |
|||
SET(CMAKE_ASM_FLAGS_DEBUG "-g -ggdb3" CACHE INTERNAL "asm debug compiler flags") |
|||
|
|||
SET(CMAKE_C_FLAGS_RELEASE "-O2" CACHE INTERNAL "c release compiler flags") |
|||
SET(CMAKE_CXX_FLAGS_RELEASE "-O2" CACHE INTERNAL "cxx release compiler flags") |
|||
SET(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm release compiler flags") |
Loading…
Reference in new issue