Fixing RAM calculator and reduced actual SRAM usage

- Changed static variables to const that should have been const
- Updated CMake files to prepare for MCHCK custom bootloader
- Changed the USB ID numbers and ID number for bootloader
- Only generate DFU or Teensy binary image, not both
- Fixed RAM and FLASH calculator
- Added missing license in delay.c/h (much of it was taken from Teensy source though I've changed a bunch of it)
- Prepared mk20dx.c for upcoming bootloader addition
- mk20dx.h cleanup
- Reduced the MCHCK based flash size for the application image (bootloader changes requires more flash space)
- Fixed bugs in macro.c
- Added keyHold cli command
- Added show pending events debug message for PartialMap macro module
This commit is contained in:
Jacob Alexander 2014-08-15 10:42:12 -07:00
parent 2f7e3cb117
commit eabb1c546a
24 changed files with 418 additions and 110 deletions

View file

@ -129,6 +129,14 @@ message( "${DEBUG_SRCS}" )
###
# CMake Module Checking
#
find_package( Git REQUIRED )
find_package( Ctags ) # Optional
###
# Generate USB Defines
#
@ -240,13 +248,6 @@ ModuleCompatibility( ${DebugModulePath} ${DebugModuleCompatibility} )
###
# CMake Module Checking
#
find_package( Git REQUIRED )
find_package( Ctags ) # Optional
###
# ctag Generation
#
@ -287,19 +288,23 @@ set_target_properties( ${TARGET_ELF} PROPERTIES
#| Convert the .ELF into a .bin to load onto the McHCK
set( TARGET_BIN ${TARGET}.bin.dfu )
add_custom_command( TARGET ${TARGET_ELF} POST_BUILD
COMMAND ${CMAKE_OBJCOPY} ${BIN_FLAGS} ${TARGET_ELF} ${TARGET_BIN}
COMMENT "Creating binary file to load: ${TARGET_BIN}"
)
if( DEFINED DFU )
set( TARGET_BIN ${TARGET}.dfu.bin )
add_custom_command( TARGET ${TARGET_ELF} POST_BUILD
COMMAND ${CMAKE_OBJCOPY} ${BIN_FLAGS} ${TARGET_ELF} ${TARGET_BIN}
COMMENT "Creating dfu binary file: ${TARGET_BIN}"
)
endif()
#| Convert the .ELF into a .HEX to load onto the Teensy
set( TARGET_HEX ${TARGET}.teensy.hex )
add_custom_command( TARGET ${TARGET_ELF} POST_BUILD
COMMAND ${CMAKE_OBJCOPY} ${HEX_FLAGS} ${TARGET_ELF} ${TARGET_HEX}
COMMENT "Creating iHex file to load: ${TARGET_HEX}"
)
if ( DEFINED TEENSY )
set( TARGET_HEX ${TARGET}.teensy.hex )
add_custom_command( TARGET ${TARGET_ELF} POST_BUILD
COMMAND ${CMAKE_OBJCOPY} ${HEX_FLAGS} ${TARGET_ELF} ${TARGET_HEX}
COMMENT "Creating iHex file to load: ${TARGET_HEX}"
)
endif()
#| Generate the Extended .LSS
@ -331,8 +336,8 @@ add_custom_command( TARGET ${TARGET_ELF} POST_BUILD
#| After Changes Size Information
add_custom_target( SizeAfter ALL
COMMAND ${CMAKE_SOURCE_DIR}/Lib/CMake/sizeCalculator ${CMAKE_SIZE} ihex ${TARGET_ELF} ${SIZE_RAM} " SRAM"
COMMAND ${CMAKE_SOURCE_DIR}/Lib/CMake/sizeCalculator ${CMAKE_SIZE} ihex ${TARGET_HEX} ${SIZE_FLASH} "Flash"
COMMAND ${CMAKE_SOURCE_DIR}/Lib/CMake/sizeCalculator ${CMAKE_SIZE} ram ${TARGET_ELF} ${SIZE_RAM} " SRAM"
COMMAND ${CMAKE_SOURCE_DIR}/Lib/CMake/sizeCalculator ${CMAKE_SIZE} flash ${TARGET_ELF} ${SIZE_FLASH} "Flash"
DEPENDS ${TARGET_ELF}
COMMENT "Chip usage for ${CHIP}"
)