]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Bootloader/CMakeLists.txt
Updating convenience scripts
[kiibohd-controller.git] / Bootloader / CMakeLists.txt
index ebe5ff4603a99351e1d7460d977ca6ca7ec4590d..2e12cf82edd000438aeadb1f1c9fa1a6c759736a 100644 (file)
 #| You _MUST_ clean the build directory if you change this value
 #|
 set( CHIP
-       "mk20dx128vlf5"    # McHCK    mk20dx128vlf5
-#      "mk20dx256vlh7"    # Kiibohd-dfu
+       "mk20dx128vlf5"    # McHCK       mk20dx128vlf5
+#      "mk20dx256vlh7"    # Kiibohd-dfu mk20dx256vlh7
+       CACHE STRING "Chip"
 )
 
 
+
+###
+# Compiler Selection
+#
+
+#| *** EXPERIMENTAL ***
+#| Stick with gcc unless you know what you're doing
+#| Currently only arm is supported with clang
+set( COMPILER
+       "gcc"   # arm-none-eabi-gcc / avr-gcc - Default
+#       "clang" # arm-none-eabi
+       CACHE STRING "Compiler Type"
+)
+
+
+
 ###
 # Bootloader Configuration
 #
@@ -52,6 +69,14 @@ set( SRCS
        usb.c
 )
 
+# Only compile in if necessary
+if( CHIP STREQUAL "mk20dx256vlh7" )
+       set( SRCS ${SRCS}
+               debug.c
+       )
+endif()
+
+
 message( STATUS "Bootloader Source Files:" )
 message( "${SRCS}" )
 
@@ -66,7 +91,10 @@ endforeach()
 ###
 # Directory Includes
 #
-include_directories( ${CMAKE_SOURCE_DIR}/../Lib )
+include_directories (
+       ${CMAKE_SOURCE_DIR}/../Lib
+       ${CMAKE_SOURCE_DIR}
+)