]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - arm.cmake
Adding initial Teensy 3 support, compiles, but not fully functional yet.
[kiibohd-controller.git] / arm.cmake
index 1b6a8ce89db27cc8ecfac6b581b7b80eaa812374..be722d2ffb64b27213f6201d2393d57e81c8018a 100644 (file)
--- a/arm.cmake
+++ b/arm.cmake
@@ -36,6 +36,9 @@ set( SIZE    "arm-none-eabi-size"    )
 #| "mk20dx128"        # Teensy   3.0
 set( CHIP "mk20dx128" )
 
+message( STATUS "Chip Selected:" )
+message( "${CHIP}" )
+
 
 #| CPU Type
 #| You _MUST_ set this to match the board you are using
@@ -44,13 +47,20 @@ set( CHIP "mk20dx128" )
 #| "cortex-m4"        # Teensy   3.0
 set( CPU "cortex-m4" )
 
+message( STATUS "CPU Selected:" )
+message( "${CPU}" )
+
 
 #| Extra Compiler Sources
 #| Mostly for convenience functions like interrupt handlers
 set( COMPILER_SRCS
        Lib/${CHIP}.c
+       Lib/delay.c
 )
 
+message( STATUS "Compiler Source Files:" )
+message( "${COMPILER_SRCS}" )
+
 
 #| Compiler flag to set the C Standard level.
 #|     c89   = "ANSI" C
@@ -95,7 +105,7 @@ set( GENDEPFLAGS "-MMD" )
 
 
 #| Compiler Flags
-add_definitions( "-mcpu=${CPU} -DF_CPU=${F_CPU} -O${OPT} ${TUNING} ${WARN} ${CSTANDARD} ${GENDEPFLAGS}" )
+add_definitions( "-mcpu=${CPU} -DF_CPU=${F_CPU} -D_${CHIP}_=1 -O${OPT} ${TUNING} ${WARN} ${CSTANDARD} ${GENDEPFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}" )
 
 
 #| Linker Flags