Commit c10f7299 authored by Martin Vítek's avatar Martin Vítek
Browse files

Add basic code for programming testing

parent 2b724ac8
Pipeline #299 skipped
cmake_minimum_required(VERSION 3.0)
set(AVR_UPLOADTOOL avrdude)
set(AVR_PROGRAMMER usbasp)
set(AVR_UPLOADTOOL_PORT usb)
set(AVR_MCU atxmega16d4)
set(AVR_H_FUSE 0xC8)
set(AVR_L_FUSE 0x1F)
#set(CMAKE_BUILD_TYPE RelWithDebInfo)
set(CMAKE_BUILD_TYPE Release)
set(MCU_SPEED "14745600UL")
set(WITH_MCU OFF)
set(WITH_MCU OFF CACHE BOOL "Add the mCU type to the target file name." FORCE)
find_package(avr)
project(safe-soldering-station)
add_definitions("-DF_CPU=${MCU_SPEED}")
add_definitions("-fpack-struct")
add_definitions("-fshort-enums")
add_definitions("-Wall")
add_definitions("-funsigned-char")
add_definitions("-funsigned-bitfields")
add_definitions("-ffunction-sections")
add_definitions("-fdata-sections")
add_definitions("-fno-exceptions")
add_definitions("-mcall-prologues")
add_definitions("-mrelax")
add_definitions("-c")
add_definitions("-std=c++14")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wl,--gc-sections -Wl,--relax -Os -mrelax")
set(SOURCE_FILES
main.cpp
)
add_avr_executable(safe-soldering-station ${SOURCE_FILES})
#include <avr/io.h>
#include <util/delay.h>
int main()
{
for(;;)
{
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment