diff --git a/thermidity-avr/Makefile b/thermidity-avr/Makefile index 6048569..9c60190 100644 --- a/thermidity-avr/Makefile +++ b/thermidity-avr/Makefile @@ -3,8 +3,6 @@ # Simplified version from: https://github.com/hexagon5un/AVR-Programming MCU = atmega328p -# for NetBeans, see https://www.nongnu.org/avr-libc/user-manual/using_tools.html -MMCU = __AVR_ATmega328P__ F_CPU = 8000000 BAUD = 9600 PROGRAMMER_TYPE = avrispmkII @@ -21,7 +19,6 @@ AVRDUDE = avrdude CFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU)UL -DBAUD=$(BAUD) -CFLAGS += -D$(MMCU) CFLAGS += -Os -I. CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums CFLAGS += -Wall -Wstrict-prototypes diff --git a/thermidity-avr/nbproject/Makefile-Custom.mk b/thermidity-avr/nbproject/Makefile-Custom.mk new file mode 100644 index 0000000..1307546 --- /dev/null +++ b/thermidity-avr/nbproject/Makefile-Custom.mk @@ -0,0 +1,132 @@ +# +# Generated Makefile - do not edit! +# +# Edit the Makefile in the project folder instead (../Makefile). Each target +# has a -pre and a -post target defined where you can add customized code. +# +# This makefile implements configuration specific macros and targets. + + +# Environment +MKDIR=mkdir +CP=cp +GREP=grep +NM=nm +CCADMIN=CCadmin +RANLIB=ranlib +CC=avr-gcc +CCC=avr-g++ +CXX=avr-g++ +FC=gfortran +AS=avr-as + +# Macros +CND_PLATFORM=AVR2.1-GCC13.2-Linux +CND_DLIB_EXT=so +CND_CONF=Custom +CND_DISTDIR=dist +CND_BUILDDIR=build + +# Include project Makefile +include /home/dode/dev/thermidity/thermidity-avr/Makefile + +# Object Directory +OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} + +# Object Files +OBJECTFILES= \ + ${OBJECTDIR}/_ext/cffe4143/bitmaps.o \ + ${OBJECTDIR}/_ext/cffe4143/dejavu.o \ + ${OBJECTDIR}/_ext/cffe4143/display.o \ + ${OBJECTDIR}/_ext/cffe4143/eink.o \ + ${OBJECTDIR}/_ext/cffe4143/font.o \ + ${OBJECTDIR}/_ext/cffe4143/meter.o \ + ${OBJECTDIR}/_ext/cffe4143/spi.o \ + ${OBJECTDIR}/_ext/cffe4143/sram.o \ + ${OBJECTDIR}/_ext/cffe4143/thermidity.o \ + ${OBJECTDIR}/_ext/cffe4143/unifont.o \ + ${OBJECTDIR}/_ext/cffe4143/usart.o \ + ${OBJECTDIR}/_ext/cffe4143/utils.o + + +# C Compiler Flags +CFLAGS= + +# CC Compiler Flags +CCFLAGS= +CXXFLAGS= + +# Fortran Compiler Flags +FFLAGS= + +# Assembler Flags +ASFLAGS= + +# Link Libraries and Options +LDLIBSOPTIONS= + +# Build Targets +.build-conf: ${BUILD_SUBPROJECTS} + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/thermidity-avr + +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/thermidity-avr: ${OBJECTFILES} + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} + ${LINK.c} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/thermidity-avr ${OBJECTFILES} ${LDLIBSOPTIONS} + +${OBJECTDIR}/_ext/cffe4143/bitmaps.o: /home/dode/dev/thermidity/thermidity-avr/bitmaps.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/bitmaps.o /home/dode/dev/thermidity/thermidity-avr/bitmaps.c + +${OBJECTDIR}/_ext/cffe4143/dejavu.o: /home/dode/dev/thermidity/thermidity-avr/dejavu.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/dejavu.o /home/dode/dev/thermidity/thermidity-avr/dejavu.c + +${OBJECTDIR}/_ext/cffe4143/display.o: /home/dode/dev/thermidity/thermidity-avr/display.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/display.o /home/dode/dev/thermidity/thermidity-avr/display.c + +${OBJECTDIR}/_ext/cffe4143/eink.o: /home/dode/dev/thermidity/thermidity-avr/eink.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/eink.o /home/dode/dev/thermidity/thermidity-avr/eink.c + +${OBJECTDIR}/_ext/cffe4143/font.o: /home/dode/dev/thermidity/thermidity-avr/font.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/font.o /home/dode/dev/thermidity/thermidity-avr/font.c + +${OBJECTDIR}/_ext/cffe4143/meter.o: /home/dode/dev/thermidity/thermidity-avr/meter.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/meter.o /home/dode/dev/thermidity/thermidity-avr/meter.c + +${OBJECTDIR}/_ext/cffe4143/spi.o: /home/dode/dev/thermidity/thermidity-avr/spi.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/spi.o /home/dode/dev/thermidity/thermidity-avr/spi.c + +${OBJECTDIR}/_ext/cffe4143/sram.o: /home/dode/dev/thermidity/thermidity-avr/sram.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/sram.o /home/dode/dev/thermidity/thermidity-avr/sram.c + +${OBJECTDIR}/_ext/cffe4143/thermidity.o: /home/dode/dev/thermidity/thermidity-avr/thermidity.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/thermidity.o /home/dode/dev/thermidity/thermidity-avr/thermidity.c + +${OBJECTDIR}/_ext/cffe4143/unifont.o: /home/dode/dev/thermidity/thermidity-avr/unifont.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/unifont.o /home/dode/dev/thermidity/thermidity-avr/unifont.c + +${OBJECTDIR}/_ext/cffe4143/usart.o: /home/dode/dev/thermidity/thermidity-avr/usart.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/usart.o /home/dode/dev/thermidity/thermidity-avr/usart.c + +${OBJECTDIR}/_ext/cffe4143/utils.o: /home/dode/dev/thermidity/thermidity-avr/utils.c + ${MKDIR} -p ${OBJECTDIR}/_ext/cffe4143 + $(COMPILE.c) -g -DBAUD=9600 -DF_CPU=8000000UL -D__AVR_ATmega328P__ -D__flash=volatile -I. -std=c99 -o ${OBJECTDIR}/_ext/cffe4143/utils.o /home/dode/dev/thermidity/thermidity-avr/utils.c + +# Subprojects +.build-subprojects: + +# Clean Targets +.clean-conf: ${CLEAN_SUBPROJECTS} + ${RM} -r ${CND_BUILDDIR}/${CND_CONF} + +# Subprojects +.clean-subprojects: diff --git a/thermidity-avr/nbproject/Makefile-impl.mk b/thermidity-avr/nbproject/Makefile-impl.mk new file mode 100644 index 0000000..600acc5 --- /dev/null +++ b/thermidity-avr/nbproject/Makefile-impl.mk @@ -0,0 +1,133 @@ +# +# Generated Makefile - do not edit! +# +# Edit the Makefile in the project folder instead (../Makefile). Each target +# has a pre- and a post- target defined where you can add customization code. +# +# This makefile implements macros and targets common to all configurations. +# +# NOCDDL + + +# Building and Cleaning subprojects are done by default, but can be controlled with the SUB +# macro. If SUB=no, subprojects will not be built or cleaned. The following macro +# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf +# and .clean-reqprojects-conf unless SUB has the value 'no' +SUB_no=NO +SUBPROJECTS=${SUB_${SUB}} +BUILD_SUBPROJECTS_=.build-subprojects +BUILD_SUBPROJECTS_NO= +BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}} +CLEAN_SUBPROJECTS_=.clean-subprojects +CLEAN_SUBPROJECTS_NO= +CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} + + +# Project Name +PROJECTNAME=thermidity-avr + +# Active Configuration +DEFAULTCONF=Custom +CONF=${DEFAULTCONF} + +# All Configurations +ALLCONFS=Custom + + +# build +.build-impl: .build-pre .validate-impl .depcheck-impl + @#echo "=> Running $@... Configuration=$(CONF)" + "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf + + +# clean +.clean-impl: .clean-pre .validate-impl .depcheck-impl + @#echo "=> Running $@... Configuration=$(CONF)" + "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf + + +# clobber +.clobber-impl: .clobber-pre .depcheck-impl + @#echo "=> Running $@..." + for CONF in ${ALLCONFS}; \ + do \ + "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \ + done + +# all +.all-impl: .all-pre .depcheck-impl + @#echo "=> Running $@..." + for CONF in ${ALLCONFS}; \ + do \ + "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \ + done + +# build tests +.build-tests-impl: .build-impl .build-tests-pre + @#echo "=> Running $@... Configuration=$(CONF)" + "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf + +# run tests +.test-impl: .build-tests-impl .test-pre + @#echo "=> Running $@... Configuration=$(CONF)" + "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf + +# dependency checking support +.depcheck-impl: + @echo "# This code depends on make tool being used" >.dep.inc + @if [ -n "${MAKE_VERSION}" ]; then \ + echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES} \$${TESTOBJECTFILES}))" >>.dep.inc; \ + echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \ + echo "include \$${DEPFILES}" >>.dep.inc; \ + echo "endif" >>.dep.inc; \ + else \ + echo ".KEEP_STATE:" >>.dep.inc; \ + echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \ + fi + +# configuration validation +.validate-impl: + @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ + then \ + echo ""; \ + echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \ + echo "See 'make help' for details."; \ + echo "Current directory: " `pwd`; \ + echo ""; \ + fi + @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ + then \ + exit 1; \ + fi + + +# help +.help-impl: .help-pre + @echo "This makefile supports the following configurations:" + @echo " ${ALLCONFS}" + @echo "" + @echo "and the following targets:" + @echo " build (default target)" + @echo " clean" + @echo " clobber" + @echo " all" + @echo " help" + @echo "" + @echo "Makefile Usage:" + @echo " make [CONF=] [SUB=no] build" + @echo " make [CONF=] [SUB=no] clean" + @echo " make [SUB=no] clobber" + @echo " make [SUB=no] all" + @echo " make help" + @echo "" + @echo "Target 'build' will build a specific configuration and, unless 'SUB=no'," + @echo " also build subprojects." + @echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no'," + @echo " also clean subprojects." + @echo "Target 'clobber' will remove all built files from all configurations and," + @echo " unless 'SUB=no', also from subprojects." + @echo "Target 'all' will will build all configurations and, unless 'SUB=no'," + @echo " also build subprojects." + @echo "Target 'help' prints this message." + @echo "" + diff --git a/thermidity-avr/nbproject/Makefile-variables.mk b/thermidity-avr/nbproject/Makefile-variables.mk new file mode 100644 index 0000000..02a820d --- /dev/null +++ b/thermidity-avr/nbproject/Makefile-variables.mk @@ -0,0 +1,27 @@ +# +# Generated - do not edit! +# +# NOCDDL +# +CND_BASEDIR=`pwd` +CND_BUILDDIR=build +CND_DISTDIR=dist +# Custom configuration +CND_PLATFORM_Custom=AVR2.1-GCC13.2-Linux +CND_ARTIFACT_DIR_Custom=dist/Custom/AVR2.1-GCC13.2-Linux +CND_ARTIFACT_NAME_Custom=thermidity-avr +CND_ARTIFACT_PATH_Custom=dist/Custom/AVR2.1-GCC13.2-Linux/thermidity-avr +CND_PACKAGE_DIR_Custom=dist/Custom/AVR2.1-GCC13.2-Linux/package +CND_PACKAGE_NAME_Custom=thermidity-avr.tar +CND_PACKAGE_PATH_Custom=dist/Custom/AVR2.1-GCC13.2-Linux/package/thermidity-avr.tar +# +# include compiler specific variables +# +# dmake command +ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \ + (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk) +# +# gmake command +.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)) +# +include nbproject/private/Makefile-variables.mk diff --git a/thermidity-avr/nbproject/Package-Custom.bash b/thermidity-avr/nbproject/Package-Custom.bash new file mode 100644 index 0000000..1f5423d --- /dev/null +++ b/thermidity-avr/nbproject/Package-Custom.bash @@ -0,0 +1,76 @@ +#!/bin/bash -x + +# +# Generated - do not edit! +# + +# Macros +TOP=`pwd` +CND_PLATFORM=AVR2.1-GCC13.2-Linux +CND_CONF=Custom +CND_DISTDIR=dist +CND_BUILDDIR=build +CND_DLIB_EXT=so +NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging +TMPDIRNAME=tmp-packaging +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/thermidity-avr +OUTPUT_BASENAME=thermidity-avr +PACKAGE_TOP_DIR=thermidity-avr/ + +# Functions +function checkReturnCode +{ + rc=$? + if [ $rc != 0 ] + then + exit $rc + fi +} +function makeDirectory +# $1 directory path +# $2 permission (optional) +{ + mkdir -p "$1" + checkReturnCode + if [ "$2" != "" ] + then + chmod $2 "$1" + checkReturnCode + fi +} +function copyFileToTmpDir +# $1 from-file path +# $2 to-file path +# $3 permission +{ + cp "$1" "$2" + checkReturnCode + if [ "$3" != "" ] + then + chmod $3 "$2" + checkReturnCode + fi +} + +# Setup +cd "${TOP}" +mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package +rm -rf ${NBTMPDIR} +mkdir -p ${NBTMPDIR} + +# Copy files and create directories and links +cd "${TOP}" +makeDirectory "${NBTMPDIR}/thermidity-avr/bin" +copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 + + +# Generate tar file +cd "${TOP}" +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/thermidity-avr.tar +cd ${NBTMPDIR} +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/thermidity-avr.tar * +checkReturnCode + +# Cleanup +cd "${TOP}" +rm -rf ${NBTMPDIR} diff --git a/thermidity-avr/nbproject/configurations.xml b/thermidity-avr/nbproject/configurations.xml index 8ac7b98..696bd79 100644 --- a/thermidity-avr/nbproject/configurations.xml +++ b/thermidity-avr/nbproject/configurations.xml @@ -29,101 +29,84 @@ /home/dode/dev/thermidity/thermidity-avr/Makefile - + AVR2.1-GCC13.2|GNU false false - - - - - /home/dode/dev/thermidity/thermidity-avr - ${MAKE} -f Makefile - ${MAKE} -f Makefile clean - - - - . - - - __flash=volatile - - - - - . - - - __flash=volatile - - - - - . - - - + + + + . + + + BAUD=9600 + F_CPU=8000000UL + __AVR_ATmega328P__ + __flash=volatile + + + + flavor2="3"> + flavor2="3"> + flavor2="3"> + flavor2="3"> + flavor2="3"> + flavor2="3"> + flavor2="3"> + flavor2="3"> + flavor2="3"> + flavor2="3"> + flavor2="3"> + flavor2="3"> diff --git a/thermidity-avr/nbproject/project.xml b/thermidity-avr/nbproject/project.xml index 3a5525b..d47ba01 100644 --- a/thermidity-avr/nbproject/project.xml +++ b/thermidity-avr/nbproject/project.xml @@ -14,8 +14,8 @@ - Default - 0 + Custom + 1