Separated Makefile and config; added build instructions
This commit is contained in:
parent
e284baff50
commit
83d0be68bb
@ -78,6 +78,14 @@ To to so, set the corresponding fields in the _main.h_ file:
|
||||
Pinout, button-thresholds and LED-configuration is also present in this file (should be self-explaining).
|
||||
|
||||
|
||||
## Build Instructions
|
||||
* Required tools: _avr-gcc_, _avr-objcopy_, _avrdude_ (for flashing only), _make_
|
||||
* All sources are bundled in the `firmware` directory
|
||||
* Check `Makefile.config` for the correct settings, especially tool and port for automated flashing.
|
||||
* On first build you might want to set the correct fuse bits, so run `make fuses`
|
||||
* Run `make compile info program` for compilation, details about binary, and flashing
|
||||
* Check `make help` for all available commands
|
||||
|
||||
## Notes
|
||||
|
||||
The Triacs need heatsink.
|
||||
|
@ -1,58 +1,43 @@
|
||||
# SenseoControl 2.0
|
||||
#
|
||||
# File: Makefile
|
||||
# Author: Stefan Kalscheuer
|
||||
# Date: 22.04.2013
|
||||
#
|
||||
# Platform: ATtiny26
|
||||
# Internal RC-oscillator 8 MHz, CKDIV8 Enabled
|
||||
#############################################################################
|
||||
# SenseoControl 2.0 #
|
||||
# Copyright (C) 2013-2018 Stefan Kalscheuer #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation version 3. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||
#############################################################################
|
||||
|
||||
# Include environment config
|
||||
include Makefile.config
|
||||
|
||||
# Project specific settings
|
||||
TARGET = SenseoControl-2.0
|
||||
MCU = attiny26
|
||||
SRC = main.c
|
||||
|
||||
# You probably want to change this to your own programming device
|
||||
|
||||
# AVR ISP mkII
|
||||
#PGMDEV = avrispmkII
|
||||
#PGMOPT = -P usb # Try -B 10 in case of programming errors
|
||||
|
||||
# Pony-STK200
|
||||
#PGMDEV = pony-stk200
|
||||
#PGMOPT = -E noreset
|
||||
|
||||
# STK500
|
||||
PGMDEV = stk500v2
|
||||
PGMOPT = -P /dev/ttyS0
|
||||
|
||||
|
||||
# AVR-GCC and AVRDUDE need to be installed
|
||||
CC = avr-gcc
|
||||
OBJCOPY = avr-objcopy
|
||||
AVRDUDE = avrdude
|
||||
REMOVE = rm -f
|
||||
|
||||
# Some C flags
|
||||
CFLAGS = -Wall -O3
|
||||
CFLAGS = -Wall -Wextra -O3
|
||||
|
||||
help:
|
||||
@echo
|
||||
@echo "Availiable targets:"
|
||||
@echo " help - Displays this help"
|
||||
@echo " help Displays this help"
|
||||
@echo
|
||||
@echo " compile - Compiles source code"
|
||||
@echo " info - Outputs device memory information"
|
||||
@echo " program - Programs the device"
|
||||
@echo " clean - Deletes temporary files"
|
||||
@echo " fuses - Writes fuse settings to device (necessary only once per device)"
|
||||
@echo " compile Compiles source code"
|
||||
@echo " info Outputs device memory information"
|
||||
@echo " program Programs the device"
|
||||
@echo " clean Deletes temporary files"
|
||||
@echo " fuses Writes fuse settings to device (necessary only once per device)"
|
||||
@echo
|
||||
@echo " all - Compile, info, program, clean"
|
||||
@echo
|
||||
@echo "IMPORTANT: Device programming may only be possible as super user"
|
||||
@echo
|
||||
@echo "See Makefile for contact information."
|
||||
@echo " all Compile, info, program, clean"
|
||||
@echo
|
||||
|
||||
all: compile info program clean
|
||||
|
43
firmware/Makefile.config
Normal file
43
firmware/Makefile.config
Normal file
@ -0,0 +1,43 @@
|
||||
#############################################################################
|
||||
# SenseoControl 2.0 #
|
||||
# Copyright (C) 2013-2018 Stefan Kalscheuer #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation version 3. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||
#############################################################################
|
||||
|
||||
#
|
||||
# Set toolchain.
|
||||
# AVR-GCC and AVRDUDE need to be installed
|
||||
#
|
||||
CC = avr-gcc
|
||||
OBJCOPY = avr-objcopy
|
||||
AVRDUDE = avrdude
|
||||
REMOVE = rm -f
|
||||
|
||||
#
|
||||
# You probably want to change this to your own programming device.
|
||||
# Some commonly used examples shown below.
|
||||
#
|
||||
|
||||
# STK500
|
||||
PGMDEV = stk500v2
|
||||
PGMOPT = -P /dev/ttyS0
|
||||
|
||||
|
||||
# AVR ISP mkII
|
||||
#PGMDEV = avrispmkII
|
||||
#PGMOPT = -P usb # Try -B 10 in case of programming errors
|
||||
|
||||
# Pony-STK200
|
||||
#PGMDEV = pony-stk200
|
||||
#PGMOPT = -E noreset
|
Loading…
x
Reference in New Issue
Block a user