Stefan Schuermans
CCCamp2015: alternative firmware by Martin Müllenhaupt
Stefan Schuermans commited 4626798 at 2015-08-16 08:52:13
generic-gcc-avr.cmake
##########################################################################
# "THE ANY BEVERAGE-WARE LICENSE" (Revision 42 - based on beer-ware
# license):
# <dev@layer128.net> wrote this file. As long as you retain this notice
# you can do whatever you want with this stuff. If we meet some day, and
# you think this stuff is worth it, you can buy me a be(ve)er(age) in
# return. (I don't like beer much.)
#
# Matthias Kleemann
##########################################################################
##########################################################################
# The toolchain requires some variables set.
#
# AVR_MCU (default: atmega8)
# the type of AVR the application is built for
# AVR_L_FUSE (NO DEFAULT)
# the LOW fuse value for the MCU used
# AVR_H_FUSE (NO DEFAULT)
# the HIGH fuse value for the MCU used
# AVR_UPLOADTOOL (default: avrdude)
# the application used to upload to the MCU
# NOTE: The toolchain is currently quite specific about
# the commands used, so it needs tweaking.
# AVR_UPLOADTOOL_PORT (default: usb)
# the port used for the upload tool, e.g. usb
# AVR_PROGRAMMER (default: avrispmkII)
# the programmer hardware used, e.g. avrispmkII
##########################################################################
##########################################################################
# options
##########################################################################
option(WITH_MCU "Add the mCU type to the target file name." ON)
##########################################################################
# executables in use
##########################################################################
find_program(AVR_CC avr-gcc)
find_program(AVR_CXX avr-g++)
find_program(AVR_OBJCOPY avr-objcopy)
find_program(AVR_SIZE_TOOL avr-size)
find_program(AVR_OBJDUMP avr-objdump)
##########################################################################
# toolchain starts with defining mandatory variables
##########################################################################
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR avr)
set(CMAKE_C_COMPILER ${AVR_CC})
set(CMAKE_CXX_COMPILER ${AVR_CXX})
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX