Skip to content

Instantly share code, notes, and snippets.

@kabouzeid
Created November 19, 2016 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kabouzeid/f7a792f62909e07ef52ea9839a2c187f to your computer and use it in GitHub Desktop.
Save kabouzeid/f7a792f62909e07ef52ea9839a2c187f to your computer and use it in GitHub Desktop.
SET(MCU "atmega644")
SET(F_CPU "20000000")
SET(CMAKE_SYSTEM_NAME Generic)
SET(CMAKE_C_COMPILER /usr/local/CrossPack-AVR/bin/avr-gcc)
SET(CMAKE_CXX_COMPILER /usr/local/CrossPack-AVR/bin/avr-g++)
SET(CMAKE_C_FLAGS "-mmcu=${MCU} -DF_CPU=${F_CPU} -O1 -std=gnu99 -Wall")
SET(CMAKE_C_LINK_FLAGS "-mmcu=${MCU}")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment