Mercurial > louis > kiibohd-controller
comparison Lib/CMake/arm.cmake @ 333:772f9bea482b
Adding 72 MHz clock support for mk20dx256vlh7
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Mon, 20 Apr 2015 00:55:58 -0700 |
parents | f9c406854bc2 |
children | b5746c43904e |
comparison
equal
deleted
inserted
replaced
332:2e0074f75855 | 333:772f9bea482b |
---|---|
44 message( STATUS "Chip Selected:" ) | 44 message( STATUS "Chip Selected:" ) |
45 message( "${CHIP}" ) | 45 message( "${CHIP}" ) |
46 set( MCU "${CHIP}" ) # For loading script compatibility | 46 set( MCU "${CHIP}" ) # For loading script compatibility |
47 | 47 |
48 | 48 |
49 #| Chip Size Database | 49 #| Chip Size and CPU Frequency Database |
50 #| Processor frequency. | |
51 #| Normally the first thing your program should do is set the clock prescaler, | |
52 #| so your program will run at the correct speed. You should also set this | |
53 #| variable to same clock speed. The _delay_ms() macro uses this, and many | |
54 #| examples use this variable to calculate timings. Do not add a "UL" here. | |
50 #| MCHCK Based / Kiibohd-dfu | 55 #| MCHCK Based / Kiibohd-dfu |
51 if ( "${CHIP}" MATCHES "mk20dx128vlf5" ) | 56 if ( "${CHIP}" MATCHES "mk20dx128vlf5" ) |
52 set( SIZE_RAM 16384 ) | 57 set( SIZE_RAM 16384 ) |
53 set( SIZE_FLASH 126976 ) | 58 set( SIZE_FLASH 126976 ) |
59 set( F_CPU "48000000" ) | |
54 | 60 |
55 #| Kiibohd-dfu | 61 #| Kiibohd-dfu |
56 elseif ( "${CHIP}" MATCHES "mk20dx256vlh7" ) | 62 elseif ( "${CHIP}" MATCHES "mk20dx256vlh7" ) |
57 set( SIZE_RAM 65536 ) | 63 set( SIZE_RAM 65536 ) |
58 set( SIZE_FLASH 253952 ) | 64 set( SIZE_FLASH 253952 ) |
65 set( F_CPU "72000000" ) | |
59 | 66 |
60 #| Teensy 3.0 | 67 #| Teensy 3.0 |
61 elseif ( "${CHIP}" MATCHES "mk20dx128" ) | 68 elseif ( "${CHIP}" MATCHES "mk20dx128" ) |
62 set( SIZE_RAM 16384 ) | 69 set( SIZE_RAM 16384 ) |
63 set( SIZE_FLASH 131072 ) | 70 set( SIZE_FLASH 131072 ) |
71 set( F_CPU "48000000" ) | |
64 | 72 |
65 #| Teensy 3.1 | 73 #| Teensy 3.1 |
66 elseif ( "${CHIP}" MATCHES "mk20dx256" ) | 74 elseif ( "${CHIP}" MATCHES "mk20dx256" ) |
67 set( SIZE_RAM 65536 ) | 75 set( SIZE_RAM 65536 ) |
68 set( SIZE_FLASH 262144 ) | 76 set( SIZE_FLASH 262144 ) |
77 set( F_CPU "48000000" ) # XXX Also supports 72 MHz, but may requires code changes | |
69 | 78 |
70 #| Unknown ARM | 79 #| Unknown ARM |
71 else () | 80 else () |
72 message( AUTHOR_WARNING "CHIP: ${CHIP} - Unknown ARM microcontroller" ) | 81 message( AUTHOR_WARNING "CHIP: ${CHIP} - Unknown ARM microcontroller" ) |
73 endif () | 82 endif () |
157 #| 0 = turn off optimization. s = optimize for size. | 166 #| 0 = turn off optimization. s = optimize for size. |
158 #| (Note: 3 is not always the best optimization level.) | 167 #| (Note: 3 is not always the best optimization level.) |
159 set( OPT "s" ) | 168 set( OPT "s" ) |
160 | 169 |
161 | 170 |
162 #| Processor frequency. | |
163 #| Normally the first thing your program should do is set the clock prescaler, | |
164 #| so your program will run at the correct speed. You should also set this | |
165 #| variable to same clock speed. The _delay_ms() macro uses this, and many | |
166 #| examples use this variable to calculate timings. Do not add a "UL" here. | |
167 set( F_CPU "48000000" ) | |
168 | |
169 | |
170 #| Dependency Files | 171 #| Dependency Files |
171 #| Compiler flags to generate dependency files. | 172 #| Compiler flags to generate dependency files. |
172 set( GENDEPFLAGS "-MMD" ) | 173 set( GENDEPFLAGS "-MMD" ) |
173 | 174 |
174 | 175 |