diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fca8e2c --- /dev/null +++ b/Makefile @@ -0,0 +1,113 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... +# WARNING: the IDE does not call this target since it takes a long time to +# simply run make. Instead, the IDE removes the configuration directories +# under build and dist directly without calling make. +# This target is left here so people can do a clean when running a clean +# outside the IDE. + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/dist/default/production/attiny2313a_sleep-mode-example.X.production.hex b/dist/default/production/attiny2313a_sleep-mode-example.X.production.hex new file mode 100644 index 0000000..f5def73 --- /dev/null +++ b/dist/default/production/attiny2313a_sleep-mode-example.X.production.hex @@ -0,0 +1,14 @@ +:020000020000FC +:100000001AC018951895189518951895189518955B +:100010001895189518951895189518951895189578 +:100020001895189502C018951895A3941ED001B57F +:10003000006401BD18950FED0DBF10D002D005D0A2 +:1000400012C005B7006105BF0895F894A89501B5E1 +:10005000086101BD0EE401BD789408950FEF0ABB5D +:1000600000270BBB089506D0FECFD89A1BD0D89896 +:1000700019D008950F930AE0A01608F408C0AA2426 +:1000800008D005B7006205BF0F91F89488950F91CD +:100090000895A89500E004BF01B5086101BD00E026 +:1000A00001BD089522E83CED3A95F1F72A95E1F774 +:0400B00000000895AF +:00000001FF diff --git a/dist/default/production/attiny2313a_sleep-mode-example.X.production.lss b/dist/default/production/attiny2313a_sleep-mode-example.X.production.lss new file mode 100644 index 0000000..af6e5e7 --- /dev/null +++ b/dist/default/production/attiny2313a_sleep-mode-example.X.production.lss @@ -0,0 +1,919 @@ + +AVRASM ver. 2.2.7 firmware.asm Sun May 29 00:54:54 2022 + +[builtin](2): Including file 'C:/Users/Сергей/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/avrasm/inc\tn2313Adef.inc' +[builtin](2): Including file 'C:/Users/Сергей/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/avrasm/inc\tn2313Adef.inc' + + ; + + ;***** Created: 2011-02-09 12:04 ******* Source: ATtiny2313A.xml ********* + ;************************************************************************* + ;* A P P L I C A T I O N N O T E F O R T H E A V R F A M I L Y + ;* + ;* Number : AVR000 + ;* File Name : "tn2313Adef.inc" + ;* Title : Register/Bit Definitions for the ATtiny2313A + ;* Date : 2011-02-09 + ;* Version : 2.35 + ;* Support E-mail : avr@atmel.com + ;* Target MCU : ATtiny2313A + ;* + ;* DESCRIPTION + ;* When including this file in the assembly program file, all I/O register + ;* names and I/O register bit names appearing in the data book can be used. + ;* In addition, the six registers forming the three data pointers X, Y and + ;* Z have been assigned names XL - ZH. Highest RAM address for Internal + ;* SRAM is also defined + ;* + ;* The Register names are represented by their hexadecimal address. + ;* + ;* The Register Bit names are represented by their bit number (0-7). + ;* + ;* Please observe the difference in using the bit names with instructions + ;* such as "sbr"/"cbr" (set/clear bit in register) and "sbrs"/"sbrc" + ;* (skip if bit in register set/cleared). The following example illustrates + ;* this: + ;* + ;* in r16,PORTB ;read PORTB latch + ;* sbr r16,(1< + 2.2.7 + "ATtiny2313A" + D:\Apps\attiny2313a_sleep-mode-example.X + + C:/Users/Сергей/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/avrasm/inc + C:\Program Files (x86)\Atmel\AVR Tools\AvrAssembler2\Appnotes + + firmware.asm + + C:/Users/Сергей/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/avrasm/inc\tn2313Adef.inc + + + dist/default/production/attiny2313a_sleep-mode-example.X.production.obj + + + dist/default/production/attiny2313a_sleep-mode-example.X.production.hex + + + dist/default/production/attiny2313a_sleep-mode-example.X.production.map + dist/default/production/attiny2313a_sleep-mode-example.X.production.lss + + + firmware.asm54 + firmware.asm46 + firmware.asm101 + firmware.asm89 + firmware.asm67 + firmware.asm74 + firmware.asm97 + firmware.asm108 + firmware.asm145 + <_mcu_sleep>firmware.asm117 + <_sleep_exit>firmware.asm126 + firmware.asm130 + <_loop_d_100ms>firmware.asm149 + + diff --git a/firmware.hex b/firmware.hex new file mode 100644 index 0000000..291c3ea --- /dev/null +++ b/firmware.hex @@ -0,0 +1,12 @@ +:020000020000FC +:100000001AC018951895189518951895189518955B +:100010001895189518951895189518951895189578 +:100020001895189518951895189513951CD001B525 +:10003000006401BD18950FED0DBF0ED012C005B7BD +:10004000006405BF0895F894A89501B5086101BD45 +:100050000CE401BD789408950FEF0ABB00270BBB99 +:10006000089501D0FECFD89A0CD0D8980AD0089520 +:10007000A89500E004BF01B5086101BD00E001BD25 +:10008000089522E83CED3A95F1F72A95E1F7000052 +:020090000895D1 +:00000001FF diff --git a/nbproject/Makefile-default.mk b/nbproject/Makefile-default.mk new file mode 100644 index 0000000..b1702e9 --- /dev/null +++ b/nbproject/Makefile-default.mk @@ -0,0 +1,141 @@ +# +# 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. + + +# Include project Makefile +ifeq "${IGNORE_LOCAL}" "TRUE" +# do not include local makefile. User is passing all local related variables already +else +include Makefile +# Include makefile containing local settings +ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk" +include nbproject/Makefile-local-default.mk +endif +endif + +# Environment +MKDIR=gnumkdir -p +RM=rm -f +MV=mv +CP=cp + +# Macros +CND_CONF=default +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +IMAGE_TYPE=debug +OUTPUT_SUFFIX=obj +DEBUGGABLE_SUFFIX=obj +FINAL_IMAGE=${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +else +IMAGE_TYPE=production +OUTPUT_SUFFIX=obj +DEBUGGABLE_SUFFIX=obj +FINAL_IMAGE=${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +endif + +ifeq ($(COMPARE_BUILD), true) +COMPARISON_BUILD= +else +COMPARISON_BUILD= +endif + +ifdef SUB_IMAGE_ADDRESS + +else +SUB_IMAGE_ADDRESS_COMMAND= +endif + +# Object Directory +OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE} + +# Distribution Directory +DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} + +# Source Files Quoted if spaced +SOURCEFILES_QUOTED_IF_SPACED=firmware.asm + +# Object Files Quoted if spaced +OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/firmware.obj +POSSIBLE_DEPFILES=${OBJECTDIR}/firmware.obj.d + +# Object Files +OBJECTFILES=${OBJECTDIR}/firmware.obj + +# Source Files +SOURCEFILES=firmware.asm + +# Pack Options +PACK_ASSEMBLER_OPTIONS=-I "${DFP_DIR}/avrasm/inc" -i tn2313Adef.inc + + + +CFLAGS= +ASFLAGS= +LDLIBSOPTIONS= + +############# Tool locations ########################################## +# If you copy a project from one host to another, the path where the # +# compiler is installed may be different. # +# If you open this project with MPLAB X in the new host, this # +# makefile will be regenerated and the paths will be corrected. # +####################################################################### +# fixDeps replaces a bunch of sed/cat/printf statements that slow down the build +FIXDEPS=fixDeps + +.build-conf: ${BUILD_SUBPROJECTS} +ifneq ($(INFORMATION_MESSAGE), ) + @echo $(INFORMATION_MESSAGE) +endif + ${MAKE} -f nbproject/Makefile-default.mk ${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: assemble +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +${OBJECTDIR}/firmware.obj: firmware.asm nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} ${DISTDIR} + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/firmware.obj + ${MP_AS} -fI -W+ie ${PACK_ASSEMBLER_OPTIONS} -d ${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -m ${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.map -S ${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.tmp firmware.asm +else +${OBJECTDIR}/firmware.obj: firmware.asm nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} ${DISTDIR} + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/firmware.obj + ${MP_AS} -fI -W+ie ${PACK_ASSEMBLER_OPTIONS} -d ${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -S ${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.tmp -o ${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.hex -m ${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.map -l ${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.lss firmware.asm +endif + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: link +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk + +else +${DISTDIR}/attiny2313a_sleep-mode-example.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk + +endif + + +# Subprojects +.build-subprojects: + + +# Subprojects +.clean-subprojects: + +# Clean Targets +.clean-conf: ${CLEAN_SUBPROJECTS} + ${RM} -r ${OBJECTDIR} + ${RM} -r ${DISTDIR} + +# Enable dependency checking +.dep.inc: .depcheck-impl + +DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES}) +ifneq (${DEPFILES},) +include ${DEPFILES} +endif diff --git a/nbproject/Makefile-genesis.properties b/nbproject/Makefile-genesis.properties new file mode 100644 index 0000000..87f73a5 --- /dev/null +++ b/nbproject/Makefile-genesis.properties @@ -0,0 +1,14 @@ +# +#Fri May 27 22:24:34 MSK 2022 +default.languagetoolchain.version=2.2.7 +default.Pack.dfplocation=C\:\\Users\\\u0421\u0435\u0440\u0433\u0435\u0439\\.mchp_packs\\Microchip\\ATtiny_DFP\\3.0.151 +default.com-microchip-mplab-mdbcore-simulator-Simulator.md5=19e4dc0f223322f74cda227c3c12c71c +conf.ids=default +default.languagetoolchain.dir=D\:\\avrasm2 +host.id=1aqy-hj7k-bx +configurations-xml=31f5f7f3709f73e27515fde1256b18c8 +default.com-microchip-mplab-nbide-toolchain-avrasm-AVRASMLanguageToolchain.md5=0e94da8ed93e9650ffef50929833a79f +com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e02ca5e9f5042ffd365b42ab82d3a9b +user-defined-mime-resolver-xml=none +proj.dir=D\:\\Apps\\attiny2313a_sleep-mode-example.X +host.platform=windows diff --git a/nbproject/Makefile-impl.mk b/nbproject/Makefile-impl.mk new file mode 100644 index 0000000..cb43ab4 --- /dev/null +++ b/nbproject/Makefile-impl.mk @@ -0,0 +1,69 @@ +# +# 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=attiny2313a_sleep-mode-example.X + +# Active Configuration +DEFAULTCONF=default +CONF=${DEFAULTCONF} + +# All Configurations +ALLCONFS=default + + +# build +.build-impl: .build-pre + ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf + + +# clean +.clean-impl: .clean-pre + ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf + +# clobber +.clobber-impl: .clobber-pre .depcheck-impl + ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default clean + + + +# all +.all-impl: .all-pre .depcheck-impl + ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default build + + + +# 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}))" >>.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 diff --git a/nbproject/Makefile-local-default.mk b/nbproject/Makefile-local-default.mk new file mode 100644 index 0000000..2c01e6d --- /dev/null +++ b/nbproject/Makefile-local-default.mk @@ -0,0 +1,38 @@ +# +# Generated Makefile - do not edit! +# +# +# This file contains information about the location of compilers and other tools. +# If you commmit this file into your revision control server, you will be able to +# to checkout the project and build it from the command line with make. However, +# if more than one person works on the same project, then this file might show +# conflicts since different users are bound to have compilers in different places. +# In that case you might choose to not commit this file and let MPLAB X recreate this file +# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at +# least once so the file gets created and the project can be built. Finally, you can also +# avoid using this file at all if you are only building from the command line with make. +# You can invoke make with the values of the macros: +# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... +# +SHELL=cmd.exe +PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/v6.00/mplab_platform/platform/../mplab_ide/modules/../../bin/ +# Adding MPLAB X bin directory to path. +PATH:=C:/Program Files/Microchip/MPLABX/v6.00/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH) +# Path to java used to run MPLAB X when this makefile was created +MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\v6.00\sys\java\zulu8.54.0.21-ca-fx-jre8.0.292-win_x64/bin/" +OS_CURRENT="$(shell uname -s)" +# MP_CC is not defined +# MP_CPPC is not defined +# MP_BC is not defined +MP_AS="D:\avrasm2\avrasm2.exe" +# MP_LD is not defined +# MP_AR is not defined +DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/v6.00/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar" +# MP_CC_DIR is not defined +# MP_CPPC_DIR is not defined +# MP_BC_DIR is not defined +MP_AS_DIR="D:\avrasm2" +# MP_LD_DIR is not defined +# MP_AR_DIR is not defined +# MP_BC_DIR is not defined +DFP_DIR=C:/Users/Сергей/.mchp_packs/Microchip/ATtiny_DFP/3.0.151 diff --git a/nbproject/Makefile-variables.mk b/nbproject/Makefile-variables.mk new file mode 100644 index 0000000..5a1a698 --- /dev/null +++ b/nbproject/Makefile-variables.mk @@ -0,0 +1,10 @@ +# +# Generated - do not edit! +# +# NOCDDL +# +CND_BASEDIR=`pwd` +# default configuration +CND_ARTIFACT_DIR_default=dist/default/production +CND_ARTIFACT_NAME_default=attiny2313a_sleep-mode-example.X.production.obj +CND_ARTIFACT_PATH_default=dist/default/production/attiny2313a_sleep-mode-example.X.production.obj diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml new file mode 100644 index 0000000..859b0bb --- /dev/null +++ b/nbproject/configurations.xml @@ -0,0 +1,1017 @@ + + + + + + + + + firmware.asm + + + Makefile + + + Makefile + + + + localhost + ATtiny2313A + + + Simulator + AVRASM + 2.2.7 + 3 + + + + + + + + + + + + + + + false + false + + + + + + + false + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/private/configurations.xml b/nbproject/private/configurations.xml new file mode 100644 index 0000000..4c53870 --- /dev/null +++ b/nbproject/private/configurations.xml @@ -0,0 +1,25 @@ + + + Makefile + 0 + + + + D:\avrasm2 + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..564eb3d --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,27 @@ + + + com.microchip.mplab.nbide.embedded.makeproject + + + attiny2313a_sleep-mode-example + 9f8fede7-8e3c-4ec2-b472-dce08c1ae1ab + 0 + + + + + ISO-8859-1 + + + + + default + 2 + + + + false + + + +