diff options
| author | gkostka <kostka.grzegorz@gmail.com> | 2014-01-05 15:52:01 +0000 |
|---|---|---|
| committer | gkostka <kostka.grzegorz@gmail.com> | 2014-01-05 15:52:01 +0000 |
| commit | ac78a04a195dfaec8f98d1a39753256d08210382 (patch) | |
| tree | 85d5343e310b92566f5fbcfa7ceaad83032c9eb7 /CMakeLists.txt | |
| parent | 9fd83cfc5baa55b6b391b8355ffcc07d02752d62 (diff) | |
STM32F429 cmake target.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f9104ec..64094a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,26 +12,51 @@ add_library(lwext4 ${LWEXT4_SRC}) if(CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m3)
#Library size print
-add_custom_target(size ALL DEPENDS lwext4 COMMAND ${SIZE} -B liblwext4.a)
+add_custom_target(lib_size ALL DEPENDS lwext4 COMMAND ${SIZE} -B liblwext4.a)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m4)
#Library size print
-add_custom_target(size ALL DEPENDS lwext4 COMMAND ${SIZE} -B liblwext4.a)
+add_custom_target(lib_size ALL DEPENDS lwext4 COMMAND ${SIZE} -B liblwext4.a)
+
+#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)
+
+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)
+
+add_executable(stm324f29_demo ${STM32F429_DEMO} ${STM32F429_DEMO_ASM})
+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)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL bf518)
#Library size print
-add_custom_target(size ALL DEPENDS lwext4 COMMAND ${SIZE} -B liblwext4.a)
+add_custom_target(lib_size ALL DEPENDS lwext4 COMMAND ${SIZE} -B liblwext4.a)
else()
#Generic example target
include_directories(blockdev/filedev)
include_directories(blockdev/io_raw)
-aux_source_directory(blockdev/filedev FILEDEV_SRC)
-aux_source_directory(blockdev/io_raw IORAW_SRC)
+aux_source_directory(blockdev/filedev GENERIC_SRC)
+aux_source_directory(blockdev/io_raw GENERIC_SRC)
aux_source_directory(demos/generic GENERIC_SRC)
-add_executable(fileimage_demo ${GENERIC_SRC} ${FILEDEV_SRC} ${IORAW_SRC})
+add_executable(fileimage_demo ${GENERIC_SRC})
target_link_libraries(fileimage_demo lwext4)
add_custom_target(size ALL DEPENDS lwext4 COMMAND size -B liblwext4.a)
endif()
|
