McHCK now working with UART.

- Lots of code cleanup for the intialization of all arm chips
- Added more gcc flags to help with debugging linker and memory map
- Fixed UART initialization for the smaller MCHCK mk20dx128 (different pin mux)
This commit is contained in:
Jacob Alexander 2014-06-30 23:52:24 -07:00
parent 0365d517fe
commit f9e1600b28
6 changed files with 429 additions and 367 deletions

View file

@ -109,7 +109,7 @@ set( WARN "-Wall -g" )
#| Tuning Options
#| -f...: tuning, see GCC manual
#| NOTE: -fshort-wchar is specified to allow USB strings be passed conveniently
set( TUNING "-mthumb -nostdlib -fdata-sections -ffunction-sections -fshort-wchar" )
set( TUNING "-mthumb -nostdlib -fdata-sections -ffunction-sections -fshort-wchar -fno-builtin -flto -fno-use-linker-plugin" )
#| Optimization level, can be [0, 1, 2, 3, s].
@ -136,7 +136,7 @@ add_definitions( "-mcpu=${CPU} -DF_CPU=${F_CPU} -D_${CHIP}_=1 -O${OPT} ${TUNING}
#| Linker Flags
set( LINKER_FLAGS "-mcpu=${CPU} -Wl,-Map=link.map,--cref -Wl,--gc-sections -mthumb -Wl,--no-wchar-size-warning -T${CMAKE_CURRENT_SOURCE_DIR}/Lib/${CHIP}.ld" )
set( LINKER_FLAGS "-mcpu=${CPU} -Wl,-Map=link.map,--cref -Wl,--gc-sections -mthumb -Wl,--no-wchar-size-warning -T${CMAKE_CURRENT_SOURCE_DIR}/Lib/${CHIP}.ld -nostartfiles" )
#| Hex Flags (XXX, CMake seems to have issues if you quote the arguments for the custom commands...)