diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2016-01-02 21:13:31 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2016-01-02 21:13:31 +0100 |
commit | baedda497d16c5096971eee83a0c467fe663fe6d (patch) | |
tree | 2f8925c68d94aed7d5fc7022462abbb359200b9e | |
parent | 9129af503c8211d713c8a160a3b6f3f86b328639 (diff) | |
download | stm32f103-playground-baedda497d16c5096971eee83a0c467fe663fe6d.tar.gz stm32f103-playground-baedda497d16c5096971eee83a0c467fe663fe6d.tar.bz2 stm32f103-playground-baedda497d16c5096971eee83a0c467fe663fe6d.tar.xz stm32f103-playground-baedda497d16c5096971eee83a0c467fe663fe6d.zip |
o Moving around a lot of files.
-rw-r--r-- | CMakeLists.txt | 146 | ||||
-rw-r--r-- | apps/CMakeLists.txt | 5 | ||||
-rw-r--r-- | apps/os1/CMakeLists.txt | 23 | ||||
-rw-r--r-- | apps/os1/os1.cpp (renamed from os1.cpp) | 0 | ||||
-rw-r--r-- | apps/os1/os1_cm3.s (renamed from os1_cm3.s) | 0 | ||||
-rw-r--r-- | apps/os2/CMakeLists.txt | 23 | ||||
-rw-r--r-- | apps/os2/os2.cpp (renamed from os2.cpp) | 0 | ||||
-rw-r--r-- | apps/os2/os2_cm3.s (renamed from os2_cm3.s) | 0 | ||||
-rw-r--r-- | apps/serial1/CMakeLists.txt | 23 | ||||
-rw-r--r-- | apps/serial1/serial1.cpp (renamed from serial1.cpp) | 0 | ||||
-rw-r--r-- | apps/serial2/CMakeLists.txt | 23 | ||||
-rw-r--r-- | apps/serial2/serial2.cpp (renamed from serial2.cpp) | 0 | ||||
-rw-r--r-- | apps/test1/CMakeLists.txt | 24 | ||||
-rw-r--r-- | apps/test1/test1.cpp (renamed from test1.cpp) | 0 | ||||
-rw-r--r-- | host/CMakeLists.txt | 2 | ||||
-rw-r--r-- | playground/include/debug.h (renamed from include/debug.h) | 0 | ||||
-rw-r--r-- | playground/include/init_high.h (renamed from include/init_high.h) | 0 | ||||
-rw-r--r-- | playground/include/playground.h (renamed from include/playground.h) | 0 | ||||
-rw-r--r-- | playground/include/stm32f10x_conf.h (renamed from include/stm32f10x_conf.h) | 0 | ||||
-rw-r--r-- | playground/src/debug.cpp (renamed from debug.cpp) | 0 | ||||
-rw-r--r-- | playground/src/init_high.cpp (renamed from init_high.cpp) | 0 | ||||
-rw-r--r-- | playground/src/init_low.s (renamed from init_low.s) | 0 |
22 files changed, 133 insertions, 136 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 48a5736..2ce54f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,150 +37,26 @@ target_include_directories(tinyprintf PUBLIC tinyprintf) set(STM32F10X_STDPERIPH_LIB ${CMAKE_SOURCE_DIR}/tmp/STM32F10x_StdPeriph_Lib_V3.5.0) set(STM32F10X_STDPERIPH_DEFINES STM32F10X_MD USE_STDPERIPH_DRIVER) - -######################################################################################################### -# test1 - -add_executable(test1.elf test1.cpp init_low.s init_high.cpp include/init_high.h include/stm32f10x_conf.h - # http://www.sparetimelabs.com/tinyprintf/tinyprintf.php - tinyprintf/tinyprintf.c tinyprintf/tinyprintf.h - debug.cpp include/debug.h - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c - ) - -target_include_directories(test1.elf PUBLIC - include - tinyprintf - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) -target_compile_definitions(test1.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) - -target_compile_options(test1.elf PUBLIC "-O0") -set_target_properties(test1.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") -add_extra_commands(test1.elf) - -######################################################################################################### -# serial1 - -add_executable(serial1.elf serial1.cpp init_low.s init_high.cpp include/init_high.h include/stm32f10x_conf.h - debug.cpp include/debug.h - # http://www.sparetimelabs.com/tinyprintf/tinyprintf.php - tinyprintf/tinyprintf.c tinyprintf/tinyprintf.h - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c - ) - -target_include_directories(serial1.elf PUBLIC - include - tinyprintf - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) -target_compile_definitions(serial1.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) - -set_target_properties(serial1.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") -add_extra_commands(serial1.elf) - -######################################################################################################### -# serial2 - -add_executable(serial2.elf serial2.cpp init_low.s init_high.cpp include/init_high.h include/stm32f10x_conf.h - include/playground.h - debug.cpp include/debug.h - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/misc.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c - ) -target_link_libraries(serial2.elf tinyprintf) - -target_include_directories(serial2.elf PUBLIC - include - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) -target_compile_definitions(serial2.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) - -set_target_properties(serial2.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") -add_extra_commands(serial2.elf) - -######################################################################################################### -# os1 - -add_executable(os1.elf os1.cpp os1_cm3.s init_low.s init_high.cpp include/init_high.h include/stm32f10x_conf.h - include/playground.h - debug.cpp include/debug.h - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/misc.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c - ) -target_link_libraries(os1.elf tinyprintf) - -target_include_directories(os1.elf PUBLIC - include - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) -target_compile_definitions(os1.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) - -set_target_properties(os1.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") -add_extra_commands(os1.elf) - -######################################################################################################### -# os2 - -add_executable(os2.elf os2.cpp os2_cm3.s init_low.s init_high.cpp include/init_high.h include/stm32f10x_conf.h - include/playground.h - debug.cpp include/debug.h - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/misc.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c - ) -target_link_libraries(os2.elf tinyprintf) - -target_include_directories(os2.elf PUBLIC - include - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport - ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x - ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) -target_compile_definitions(os2.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) - -set_target_properties(os2.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") -add_extra_commands(os2.elf) - -add_subdirectory(apps) - -## +set(PLAYGROUND_DIR ${CMAKE_SOURCE_DIR}/playground) +set(TINYPRINTF_DIR ${CMAKE_SOURCE_DIR}/tinyprintf) add_library(playground OBJECT - init_low.s init_high.cpp - include/init_high.h + playground/src/init_low.s playground/src/init_high.cpp + playground/include/init_high.h - include/stm32f10x_conf.h + playground/include/stm32f10x_conf.h - include/playground.h + playground/include/playground.h - debug.cpp - include/debug.h) + playground/src/debug.cpp + playground/include/debug.h) target_include_directories(playground PUBLIC - include + playground/include tinyprintf ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc ) target_compile_definitions(playground PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) + +add_subdirectory(apps) diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index 57fb795..a38f85d 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -1 +1,6 @@ add_subdirectory(dma1) +add_subdirectory(os1) +add_subdirectory(os2) +add_subdirectory(serial1) +add_subdirectory(serial2) +add_subdirectory(test1) diff --git a/apps/os1/CMakeLists.txt b/apps/os1/CMakeLists.txt new file mode 100644 index 0000000..b6849b7 --- /dev/null +++ b/apps/os1/CMakeLists.txt @@ -0,0 +1,23 @@ +add_executable(os1.elf os1.cpp os1_cm3.s + ${PLAYGROUND_DIR}/src/init_low.s ${PLAYGROUND_DIR}/src/init_high.cpp ${PLAYGROUND_DIR}/include/init_high.h + ${PLAYGROUND_DIR}/include/playground.h + ${PLAYGROUND_DIR}/src/debug.cpp ${PLAYGROUND_DIR}/include/debug.h + ${PLAYGROUND_DIR}/include/stm32f10x_conf.h + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/misc.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c + ) +target_link_libraries(os1.elf tinyprintf) + +target_include_directories(os1.elf PUBLIC + ${PLAYGROUND_DIR}/include + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) +target_compile_definitions(os1.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) + +set_target_properties(os1.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") +add_extra_commands(os1.elf) diff --git a/os1.cpp b/apps/os1/os1.cpp index 9c87a3d..9c87a3d 100644 --- a/os1.cpp +++ b/apps/os1/os1.cpp diff --git a/os1_cm3.s b/apps/os1/os1_cm3.s index a9083dc..a9083dc 100644 --- a/os1_cm3.s +++ b/apps/os1/os1_cm3.s diff --git a/apps/os2/CMakeLists.txt b/apps/os2/CMakeLists.txt new file mode 100644 index 0000000..6db926d --- /dev/null +++ b/apps/os2/CMakeLists.txt @@ -0,0 +1,23 @@ +add_executable(os2.elf os2.cpp os2_cm3.s + ${PLAYGROUND_DIR}/src/init_low.s ${PLAYGROUND_DIR}/src/init_high.cpp ${PLAYGROUND_DIR}/include/init_high.h + ${PLAYGROUND_DIR}/include/playground.h + ${PLAYGROUND_DIR}/src/debug.cpp ${PLAYGROUND_DIR}/include/debug.h + ${PLAYGROUND_DIR}/include/stm32f10x_conf.h + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/misc.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c + ) +target_link_libraries(os2.elf tinyprintf) + +target_include_directories(os2.elf PUBLIC + ${PLAYGROUND_DIR}/include + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) +target_compile_definitions(os2.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) + +set_target_properties(os2.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") +add_extra_commands(os2.elf) diff --git a/os2.cpp b/apps/os2/os2.cpp index c104ac2..c104ac2 100644 --- a/os2.cpp +++ b/apps/os2/os2.cpp diff --git a/os2_cm3.s b/apps/os2/os2_cm3.s index dabdfe0..dabdfe0 100644 --- a/os2_cm3.s +++ b/apps/os2/os2_cm3.s diff --git a/apps/serial1/CMakeLists.txt b/apps/serial1/CMakeLists.txt new file mode 100644 index 0000000..0491391 --- /dev/null +++ b/apps/serial1/CMakeLists.txt @@ -0,0 +1,23 @@ +add_executable(serial1.elf serial1.cpp + ${PLAYGROUND_DIR}/src/init_low.s ${PLAYGROUND_DIR}/src/init_high.cpp ${PLAYGROUND_DIR}/include/init_high.h + ${PLAYGROUND_DIR}/include/playground.h + ${PLAYGROUND_DIR}/src/debug.cpp ${PLAYGROUND_DIR}/include/debug.h + ${PLAYGROUND_DIR}/include/stm32f10x_conf.h + # http://www.sparetimelabs.com/tinyprintf/tinyprintf.php + ${TINYPRINTF_DIR}/tinyprintf.c ${TINYPRINTF_DIR}/tinyprintf.h + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c + ) + +target_include_directories(serial1.elf PUBLIC + ${PLAYGROUND_DIR}/include + ${TINYPRINTF_DIR} + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) +target_compile_definitions(serial1.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) + +set_target_properties(serial1.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") +add_extra_commands(serial1.elf) diff --git a/serial1.cpp b/apps/serial1/serial1.cpp index 60e9bc9..60e9bc9 100644 --- a/serial1.cpp +++ b/apps/serial1/serial1.cpp diff --git a/apps/serial2/CMakeLists.txt b/apps/serial2/CMakeLists.txt new file mode 100644 index 0000000..3c31c50 --- /dev/null +++ b/apps/serial2/CMakeLists.txt @@ -0,0 +1,23 @@ +add_executable(serial2.elf serial2.cpp + ${PLAYGROUND_DIR}/src/init_low.s ${PLAYGROUND_DIR}/src/init_high.cpp ${PLAYGROUND_DIR}/include/init_high.h + ${PLAYGROUND_DIR}/include/playground.h + ${PLAYGROUND_DIR}/src/debug.cpp ${PLAYGROUND_DIR}/include/debug.h + ${PLAYGROUND_DIR}/include/stm32f10x_conf.h + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/misc.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c + ) +target_link_libraries(serial2.elf tinyprintf) + +target_include_directories(serial2.elf PUBLIC + ${PLAYGROUND_DIR}/include + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) +target_compile_definitions(serial2.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) + +set_target_properties(serial2.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") +add_extra_commands(serial2.elf) diff --git a/serial2.cpp b/apps/serial2/serial2.cpp index c0259ea..c0259ea 100644 --- a/serial2.cpp +++ b/apps/serial2/serial2.cpp diff --git a/apps/test1/CMakeLists.txt b/apps/test1/CMakeLists.txt new file mode 100644 index 0000000..eb090b3 --- /dev/null +++ b/apps/test1/CMakeLists.txt @@ -0,0 +1,24 @@ +add_executable(test1.elf test1.cpp + ${PLAYGROUND_DIR}/src/init_low.s ${PLAYGROUND_DIR}/src/init_high.cpp ${PLAYGROUND_DIR}/include/init_high.h + ${PLAYGROUND_DIR}/include/playground.h + ${PLAYGROUND_DIR}/src/debug.cpp ${PLAYGROUND_DIR}/include/debug.h + ${PLAYGROUND_DIR}/include/stm32f10x_conf.h + # http://www.sparetimelabs.com/tinyprintf/tinyprintf.php + ${TINYPRINTF_DIR}/tinyprintf.c ${TINYPRINTF_DIR}/tinyprintf.h + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c + ) + +target_include_directories(test1.elf PUBLIC + ${PLAYGROUND_DIR}/include + ${TINYPRINTF_DIR} + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/CoreSupport + ${STM32F10X_STDPERIPH_LIB}/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x + ${STM32F10X_STDPERIPH_LIB}/Libraries/STM32F10x_StdPeriph_Driver/inc) +target_compile_definitions(test1.elf PUBLIC ${STM32F10X_STDPERIPH_DEFINES}) + +target_compile_options(test1.elf PUBLIC "-O0") +set_target_properties(test1.elf PROPERTIES LINK_FLAGS "-nostartfiles -T${CMAKE_SOURCE_DIR}/cmake/stm32.ld") +add_extra_commands(test1.elf) diff --git a/test1.cpp b/apps/test1/test1.cpp index a883876..a883876 100644 --- a/test1.cpp +++ b/apps/test1/test1.cpp diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index d3bfe17..ea8894b 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -8,7 +8,7 @@ add_executable(host1.elf host1.cpp target_include_directories(host1.elf PUBLIC ../tinyprintf - ../include) + ../playground/include) target_compile_definitions(host1.elf PUBLIC TINYPRINTF_DEFINE_TFP_SPRINTF=0 TINYPRINTF_OVERRIDE_LIBC=0) add_executable(elf3 elf3.cpp) diff --git a/include/debug.h b/playground/include/debug.h index d2926b3..d2926b3 100644 --- a/include/debug.h +++ b/playground/include/debug.h diff --git a/include/init_high.h b/playground/include/init_high.h index c6da514..c6da514 100644 --- a/include/init_high.h +++ b/playground/include/init_high.h diff --git a/include/playground.h b/playground/include/playground.h index c224908..c224908 100644 --- a/include/playground.h +++ b/playground/include/playground.h diff --git a/include/stm32f10x_conf.h b/playground/include/stm32f10x_conf.h index f663d12..f663d12 100644 --- a/include/stm32f10x_conf.h +++ b/playground/include/stm32f10x_conf.h diff --git a/debug.cpp b/playground/src/debug.cpp index 40f2169..40f2169 100644 --- a/debug.cpp +++ b/playground/src/debug.cpp diff --git a/init_high.cpp b/playground/src/init_high.cpp index 700d17a..700d17a 100644 --- a/init_high.cpp +++ b/playground/src/init_high.cpp diff --git a/init_low.s b/playground/src/init_low.s index bc12b5b..bc12b5b 100644 --- a/init_low.s +++ b/playground/src/init_low.s |