commit c30ce983d96d7e947436698b77bd9628cc192231 Author: sergeyyarkov Date: Sat Jul 8 19:29:07 2023 +0300 read temperature diff --git a/.generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f b/.generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f new file mode 100644 index 0000000..952e823 --- /dev/null +++ b/.generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f @@ -0,0 +1,37 @@ +# +# 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" ... +# +PATH_TO_IDE_BIN=/opt/microchip/mplabx/v6.00/mplab_platform/platform/../mplab_ide/modules/../../bin/ +# Adding MPLAB X bin directory to path. +PATH:=/opt/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="/opt/microchip/mplabx/v6.00/sys/java/zulu8.54.0.21-ca-fx-jre8.0.292-linux_x64/bin/" +OS_CURRENT="$(shell uname -s)" +MP_CC="/opt/avr8-gnu-toolchain-linux_x86_64/bin/avr-gcc" +MP_CPPC="/opt/avr8-gnu-toolchain-linux_x86_64/bin/avr-g++" +# MP_BC is not defined +MP_AS="/opt/avr8-gnu-toolchain-linux_x86_64/bin/avr-as" +MP_LD="/opt/avr8-gnu-toolchain-linux_x86_64/bin/avr-ld" +MP_AR="/opt/avr8-gnu-toolchain-linux_x86_64/bin/avr-ar" +DEP_GEN=${MP_JAVA_PATH}java -jar "/opt/microchip/mplabx/v6.00/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar" +MP_CC_DIR="/opt/avr8-gnu-toolchain-linux_x86_64/bin" +MP_CPPC_DIR="/opt/avr8-gnu-toolchain-linux_x86_64/bin" +# MP_BC_DIR is not defined +MP_AS_DIR="/opt/avr8-gnu-toolchain-linux_x86_64/bin" +MP_LD_DIR="/opt/avr8-gnu-toolchain-linux_x86_64/bin" +MP_AR_DIR="/opt/avr8-gnu-toolchain-linux_x86_64/bin" +# MP_BC_DIR is not defined +DFP_DIR=/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151 diff --git a/.generated_files/flags/default/5312daf68dcab5b5e0043f8514afba88eb8ddeb0 b/.generated_files/flags/default/5312daf68dcab5b5e0043f8514afba88eb8ddeb0 new file mode 100644 index 0000000..05a0cd4 --- /dev/null +++ b/.generated_files/flags/default/5312daf68dcab5b5e0043f8514afba88eb8ddeb0 @@ -0,0 +1 @@ + $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer.X/onewire.c \ No newline at end of file diff --git a/.generated_files/flags/default/852a931b512b8c8a6143655dd7f5022a6cb025f5 b/.generated_files/flags/default/852a931b512b8c8a6143655dd7f5022a6cb025f5 new file mode 100644 index 0000000..37e648e --- /dev/null +++ b/.generated_files/flags/default/852a931b512b8c8a6143655dd7f5022a6cb025f5 @@ -0,0 +1 @@ + $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer.X/main.c \ No newline at end of file diff --git a/.generated_files/flags/default/ebd6578f553cc856320c4e3fab74007688bb7df4 b/.generated_files/flags/default/ebd6578f553cc856320c4e3fab74007688bb7df4 new file mode 100644 index 0000000..a07ed24 --- /dev/null +++ b/.generated_files/flags/default/ebd6578f553cc856320c4e3fab74007688bb7df4 @@ -0,0 +1 @@ + $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer.X/main.c \ No newline at end of file diff --git a/.generated_files/flags/default/f032a224192bd107f2123e08604a3b5b0f41643c b/.generated_files/flags/default/f032a224192bd107f2123e08604a3b5b0f41643c new file mode 100644 index 0000000..ce6331c --- /dev/null +++ b/.generated_files/flags/default/f032a224192bd107f2123e08604a3b5b0f41643c @@ -0,0 +1 @@ + $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer.X/onewire.c \ No newline at end of file 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/build/default/debug/main.o b/build/default/debug/main.o new file mode 100644 index 0000000..bd87658 Binary files /dev/null and b/build/default/debug/main.o differ diff --git a/build/default/debug/main.o.d b/build/default/debug/main.o.d new file mode 100644 index 0000000..ded4f03 --- /dev/null +++ b/build/default/debug/main.o.d @@ -0,0 +1,57 @@ +build/default/debug/main.o.d build/default/debug/main.o: main.c \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h \ + /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h onewire.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h: + +/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h: + +onewire.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h: diff --git a/build/default/debug/onewire.o b/build/default/debug/onewire.o new file mode 100644 index 0000000..de67418 Binary files /dev/null and b/build/default/debug/onewire.o differ diff --git a/build/default/debug/onewire.o.d b/build/default/debug/onewire.o.d new file mode 100644 index 0000000..429c516 --- /dev/null +++ b/build/default/debug/onewire.o.d @@ -0,0 +1,58 @@ +build/default/debug/onewire.o.d build/default/debug/onewire.o: onewire.c \ + onewire.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h \ + /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h + +onewire.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h: + +/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h: diff --git a/build/default/production/main.o b/build/default/production/main.o new file mode 100644 index 0000000..a90d857 Binary files /dev/null and b/build/default/production/main.o differ diff --git a/build/default/production/main.o.d b/build/default/production/main.o.d new file mode 100644 index 0000000..cd85e0f --- /dev/null +++ b/build/default/production/main.o.d @@ -0,0 +1,57 @@ +build/default/production/main.o.d build/default/production/main.o: main.c \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h \ + /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h onewire.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h: + +/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h: + +onewire.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h: diff --git a/build/default/production/onewire.o b/build/default/production/onewire.o new file mode 100644 index 0000000..3c4316c Binary files /dev/null and b/build/default/production/onewire.o differ diff --git a/build/default/production/onewire.o.d b/build/default/production/onewire.o.d new file mode 100644 index 0000000..429986b --- /dev/null +++ b/build/default/production/onewire.o.d @@ -0,0 +1,58 @@ +build/default/production/onewire.o.d build/default/production/onewire.o: \ + onewire.c onewire.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h \ + /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h \ + /opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h + +onewire.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdint.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdint.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/stdio.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/inttypes.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stdarg.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/lib/gcc/avr/7.3.0/include/stddef.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/interrupt.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/io.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/sfr_defs.h: + +/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/include/avr/iotn45.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/portpins.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/common.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/version.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/fuse.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/avr/lock.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/util/delay_basic.h: + +/opt/avr8-gnu-toolchain-linux_x86_64/avr/include/math.h: diff --git a/disassembly/listing.disasm b/disassembly/listing.disasm new file mode 100644 index 0000000..b69533b --- /dev/null +++ b/disassembly/listing.disasm @@ -0,0 +1,56 @@ +Disassembly Listing for attiny45v_thermometer +Generated From: +/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer.X/dist/default/debug/attiny45v_thermometer.X.debug.elf +Jul 7, 2023 10:14:05 PM + +--- /home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer.X/main.c ---------------- +1: #define F_CPU 8000000UL +2: +3: #include +4: #include +5: +6: void MCU_Init(void) { +7: DDRB = _BV(PB0) | _BV(PB1) | _BV(PB2); +0018 E087 LDI R24, 0x07 +0019 BB87 OUT 0x17, R24 +8: PORTB = 0x00; +001A BA18 OUT 0x18, R1 +9: } +001B 9508 RET +10: +11: int main(void) { +12: MCU_Init(); +001C DFFB RCALL MCU_Init +13: +14: while(1) { +15: asm("nop"); +001D 0000 NOP +001E CFFE RJMP 0x1D +16: } +17: return 0; +18: } +--- ././././crt1/gcrt1.S ------------------------------------------------------------------------------ +0000 C00E RJMP __trampolines_start +0001 C015 RJMP __bad_interrupt +0002 C014 RJMP __bad_interrupt +0003 C013 RJMP __bad_interrupt +0004 C012 RJMP __bad_interrupt +0005 C011 RJMP __bad_interrupt +0006 C010 RJMP __bad_interrupt +0007 C00F RJMP __bad_interrupt +0008 C00E RJMP __bad_interrupt +0009 C00D RJMP __bad_interrupt +000A C00C RJMP __bad_interrupt +000B C00B RJMP __bad_interrupt +000C C00A RJMP __bad_interrupt +000D C009 RJMP __bad_interrupt +000E C008 RJMP __bad_interrupt +0017 CFE8 RJMP __vectors +000F 2411 EOR R1, R1 +0010 BE1F OUT 0x3F, R1 +0011 E5CF LDI R28, 0x5F +0012 E0D1 LDI R29, 0x01 +0013 BFDE OUT 0x3E, R29 +0014 BFCD OUT 0x3D, R28 +0015 D006 RCALL main +0016 C008 RJMP _exit diff --git a/dist/default/debug/attiny45v_thermometer.X.debug.elf b/dist/default/debug/attiny45v_thermometer.X.debug.elf new file mode 100755 index 0000000..8d832e1 Binary files /dev/null and b/dist/default/debug/attiny45v_thermometer.X.debug.elf differ diff --git a/dist/default/debug/attiny45v_thermometer.X.debug.map b/dist/default/debug/attiny45v_thermometer.X.debug.map new file mode 100644 index 0000000..dc0831b --- /dev/null +++ b/dist/default/debug/attiny45v_thermometer.X.debug.map @@ -0,0 +1,480 @@ +Archive member included to satisfy reference by file (symbol) + +/opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o (exit) +/opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + build/default/debug/main.o (__do_clear_bss) + +Discarded input sections + + .data 0x0000000000000000 0x0 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + .bss 0x0000000000000000 0x0 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + .text 0x0000000000000000 0x0 build/default/debug/main.o + .data 0x0000000000000000 0x0 build/default/debug/main.o + .bss 0x0000000000000000 0x0 build/default/debug/main.o + .text 0x0000000000000000 0x0 build/default/debug/onewire.o + .data 0x0000000000000000 0x0 build/default/debug/onewire.o + .bss 0x0000000000000000 0x0 build/default/debug/onewire.o + .text 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .data 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .bss 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.mul + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.div + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.prologue + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.builtins + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.fmul + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.fixed + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .data 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .bss 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.mul + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.div + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.prologue + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.builtins + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.fmul + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.fixed + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + +Memory Configuration + +Name Origin Length Attributes +text 0x0000000000000000 0x0000000000001000 xr +data 0x0000000000800060 0x0000000000000100 rw !x +eeprom 0x0000000000810000 0x0000000000000100 rw !x +fuse 0x0000000000820000 0x0000000000000003 rw !x +lock 0x0000000000830000 0x0000000000000400 rw !x +signature 0x0000000000840000 0x0000000000000400 rw !x +user_signatures 0x0000000000850000 0x0000000000000400 rw !x +*default* 0x0000000000000000 0xffffffffffffffff + +Linker script and memory map + +LOAD /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o +LOAD build/default/debug/main.o +LOAD build/default/debug/onewire.o + 0x0000000000000001 __MPLAB_BUILD = 0x1 + 0x0000000000000001 __ICD2RAM = 0x1 + 0x0000000000000001 __MPLAB_DEBUG = 0x1 + 0x0000000000000001 __DEBUG = 0x1 +START GROUP +LOAD /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr25/libm.a +END GROUP +START GROUP +LOAD /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a +LOAD /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr25/libm.a +LOAD /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr25/libc.a +LOAD /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/libattiny45.a +END GROUP + 0x0000000000000000 __TEXT_REGION_ORIGIN__ = DEFINED (__TEXT_REGION_ORIGIN__)?__TEXT_REGION_ORIGIN__:0x0 + [0x0000000000800060] __DATA_REGION_ORIGIN__ = DEFINED (__DATA_REGION_ORIGIN__)?__DATA_REGION_ORIGIN__:0x800060 + [0x0000000000001000] __TEXT_REGION_LENGTH__ = DEFINED (__TEXT_REGION_LENGTH__)?__TEXT_REGION_LENGTH__:0x2000 + [0x0000000000000100] __DATA_REGION_LENGTH__ = DEFINED (__DATA_REGION_LENGTH__)?__DATA_REGION_LENGTH__:0xffa0 + [0x0000000000000100] __EEPROM_REGION_LENGTH__ = DEFINED (__EEPROM_REGION_LENGTH__)?__EEPROM_REGION_LENGTH__:0x10000 + [0x0000000000000003] __FUSE_REGION_LENGTH__ = DEFINED (__FUSE_REGION_LENGTH__)?__FUSE_REGION_LENGTH__:0x400 + 0x0000000000000400 __LOCK_REGION_LENGTH__ = DEFINED (__LOCK_REGION_LENGTH__)?__LOCK_REGION_LENGTH__:0x400 + 0x0000000000000400 __SIGNATURE_REGION_LENGTH__ = DEFINED (__SIGNATURE_REGION_LENGTH__)?__SIGNATURE_REGION_LENGTH__:0x400 + 0x0000000000000400 __USER_SIGNATURE_REGION_LENGTH__ = DEFINED (__USER_SIGNATURE_REGION_LENGTH__)?__USER_SIGNATURE_REGION_LENGTH__:0x400 + +.hash + *(.hash) + +.dynsym + *(.dynsym) + +.dynstr + *(.dynstr) + +.gnu.version + *(.gnu.version) + +.gnu.version_d + *(.gnu.version_d) + +.gnu.version_r + *(.gnu.version_r) + +.rel.init + *(.rel.init) + +.rela.init + *(.rela.init) + +.rel.text + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t*) + +.rela.text + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t*) + +.rel.fini + *(.rel.fini) + +.rela.fini + *(.rela.fini) + +.rel.rodata + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r*) + +.rela.rodata + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r*) + +.rel.data + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d*) + +.rela.data + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d*) + +.rel.ctors + *(.rel.ctors) + +.rela.ctors + *(.rela.ctors) + +.rel.dtors + *(.rel.dtors) + +.rela.dtors + *(.rela.dtors) + +.rel.got + *(.rel.got) + +.rela.got + *(.rela.got) + +.rel.bss + *(.rel.bss) + +.rela.bss + *(.rela.bss) + +.rel.plt + *(.rel.plt) + +.rela.plt + *(.rela.plt) + +.text 0x0000000000000000 0x22c + *(.vectors) + .vectors 0x0000000000000000 0x1e /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + 0x0000000000000000 __vectors + 0x0000000000000000 __vector_default + *(.vectors) + *(.progmem.gcc*) + 0x000000000000001e . = ALIGN (0x2) + 0x000000000000001e __trampolines_start = . + *(.trampolines) + .trampolines 0x000000000000001e 0x0 linker stubs + *(.trampolines*) + 0x000000000000001e __trampolines_end = . + *libprintf_flt.a:*(.progmem.data) + *libc.a:*(.progmem.data) + *(.progmem*) + 0x000000000000001e . = ALIGN (0x2) + *(.jumptables) + *(.jumptables*) + *(.lowtext) + *(.lowtext*) + 0x000000000000001e __ctors_start = . + *(.ctors) + 0x000000000000001e __ctors_end = . + 0x000000000000001e __dtors_start = . + *(.dtors) + 0x000000000000001e __dtors_end = . + SORT(*)(.ctors) + SORT(*)(.dtors) + *(.init0) + .init0 0x000000000000001e 0x0 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + 0x000000000000001e __init + *(.init0) + *(.init1) + *(.init1) + *(.init2) + .init2 0x000000000000001e 0xc /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + *(.init2) + *(.init3) + *(.init3) + *(.init4) + .init4 0x000000000000002a 0x10 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + 0x000000000000002a __do_clear_bss + *(.init4) + *(.init5) + *(.init5) + *(.init6) + *(.init6) + *(.init7) + *(.init7) + *(.init8) + *(.init8) + *(.init9) + .init9 0x000000000000003a 0x4 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + *(.init9) + *(.text) + .text 0x000000000000003e 0x2 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + 0x000000000000003e __vector_1 + 0x000000000000003e __vector_12 + 0x000000000000003e __bad_interrupt + 0x000000000000003e __vector_6 + 0x000000000000003e __vector_3 + 0x000000000000003e __vector_11 + 0x000000000000003e __vector_13 + 0x000000000000003e __vector_7 + 0x000000000000003e __vector_5 + 0x000000000000003e __vector_4 + 0x000000000000003e __vector_9 + 0x000000000000003e __vector_2 + 0x000000000000003e __vector_8 + 0x000000000000003e __vector_14 + 0x000000000000003e __vector_10 + 0x0000000000000040 . = ALIGN (0x2) + *(.text.*) + .text.DallasTemp_ReadScratchpad + 0x0000000000000040 0x2c build/default/debug/main.o + 0x0000000000000040 DallasTemp_ReadScratchpad + .text.DallasTemp_Convert + 0x000000000000006c 0x14 build/default/debug/main.o + 0x000000000000006c DallasTemp_Convert + .text.DallasTemp_GetTemperature + 0x0000000000000080 0x96 build/default/debug/main.o + 0x0000000000000080 DallasTemp_GetTemperature + .text.MCU_Init + 0x0000000000000116 0x8 build/default/debug/main.o + 0x0000000000000116 MCU_Init + .text.main 0x000000000000011e 0x26 build/default/debug/main.o + 0x000000000000011e main + .text.OneWire_Presence + 0x0000000000000144 0x32 build/default/debug/onewire.o + 0x0000000000000144 OneWire_Presence + .text.OneWire_WriteByte + 0x0000000000000176 0x3c build/default/debug/onewire.o + 0x0000000000000176 OneWire_WriteByte + .text.OneWire_ReadByte + 0x00000000000001b2 0x34 build/default/debug/onewire.o + 0x00000000000001b2 OneWire_ReadByte + .text.OneWire_SkipROM + 0x00000000000001e6 0x10 build/default/debug/onewire.o + 0x00000000000001e6 OneWire_SkipROM + .text.OneWire_ReadROM + 0x00000000000001f6 0x32 build/default/debug/onewire.o + 0x00000000000001f6 OneWire_ReadROM + 0x0000000000000228 . = ALIGN (0x2) + *(.fini9) + .fini9 0x0000000000000228 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + 0x0000000000000228 exit + 0x0000000000000228 _exit + *(.fini9) + *(.fini8) + *(.fini8) + *(.fini7) + *(.fini7) + *(.fini6) + *(.fini6) + *(.fini5) + *(.fini5) + *(.fini4) + *(.fini4) + *(.fini3) + *(.fini3) + *(.fini2) + *(.fini2) + *(.fini1) + *(.fini1) + *(.fini0) + .fini0 0x0000000000000228 0x4 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + *(.fini0) + 0x000000000000022c _etext = . + +.data 0x0000000000800060 0x0 load address 0x000000000000022c + [!provide] PROVIDE (__data_start, .) + *(.data) + *(.data*) + *(.gnu.linkonce.d*) + *(.rodata) + *(.rodata*) + *(.gnu.linkonce.r*) + 0x0000000000800060 . = ALIGN (0x2) + 0x0000000000800060 _edata = . + [!provide] PROVIDE (__data_end, .) + +.bss 0x0000000000800060 0x11 + 0x0000000000800060 PROVIDE (__bss_start, .) + *(.bss) + *(.bss*) + .bss.dallas_rom + 0x0000000000800060 0x8 build/default/debug/main.o + 0x0000000000800060 dallas_rom + .bss.dallas_scratchpad + 0x0000000000800068 0x9 build/default/debug/main.o + 0x0000000000800068 dallas_scratchpad + *(COMMON) + 0x0000000000800071 PROVIDE (__bss_end, .) + 0x000000000000022c __data_load_start = LOADADDR (.data) + 0x000000000000022c __data_load_end = (__data_load_start + SIZEOF (.data)) + +.noinit 0x0000000000800071 0x0 + [!provide] PROVIDE (__noinit_start, .) + *(.noinit*) + [!provide] PROVIDE (__noinit_end, .) + 0x0000000000800071 _end = . + [!provide] PROVIDE (__heap_start, .) + +.eeprom 0x0000000000810000 0x0 + *(.eeprom*) + 0x0000000000810000 __eeprom_end = . + +.fuse + *(.fuse) + *(.lfuse) + *(.hfuse) + *(.efuse) + +.lock + *(.lock*) + +.signature + *(.signature*) + +.user_signatures + *(.user_signatures*) + +.stab + *(.stab) + +.stabstr + *(.stabstr) + +.stab.excl + *(.stab.excl) + +.stab.exclstr + *(.stab.exclstr) + +.stab.index + *(.stab.index) + +.stab.indexstr + *(.stab.indexstr) + +.comment 0x0000000000000000 0x30 + *(.comment) + .comment 0x0000000000000000 0x30 build/default/debug/main.o + 0x31 (size before relaxing) + .comment 0x0000000000000030 0x31 build/default/debug/onewire.o + +.note.gnu.avr.deviceinfo + 0x0000000000000000 0x3c + .note.gnu.avr.deviceinfo + 0x0000000000000000 0x3c /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + +.note.gnu.build-id + *(.note.gnu.build-id) + +.debug + *(.debug) + +.line + *(.line) + +.debug_srcinfo + *(.debug_srcinfo) + +.debug_sfnames + *(.debug_sfnames) + +.debug_aranges 0x0000000000000000 0x80 + *(.debug_aranges) + .debug_aranges + 0x0000000000000000 0x40 build/default/debug/main.o + .debug_aranges + 0x0000000000000040 0x40 build/default/debug/onewire.o + +.debug_pubnames + *(.debug_pubnames) + +.debug_info 0x0000000000000000 0xd5f + *(.debug_info .gnu.linkonce.wi.*) + .debug_info 0x0000000000000000 0x420 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + .debug_info 0x0000000000000420 0x40e build/default/debug/main.o + .debug_info 0x000000000000082e 0x531 build/default/debug/onewire.o + +.debug_abbrev 0x0000000000000000 0x861 + *(.debug_abbrev) + .debug_abbrev 0x0000000000000000 0x3e8 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + .debug_abbrev 0x00000000000003e8 0x257 build/default/debug/main.o + .debug_abbrev 0x000000000000063f 0x222 build/default/debug/onewire.o + +.debug_line 0x0000000000000000 0x526 + *(.debug_line .debug_line.* .debug_line_end) + .debug_line 0x0000000000000000 0xf2 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + .debug_line 0x00000000000000f2 0x1be build/default/debug/main.o + .debug_line 0x00000000000002b0 0x276 build/default/debug/onewire.o + +.debug_frame 0x0000000000000000 0x114 + *(.debug_frame) + .debug_frame 0x0000000000000000 0x9c build/default/debug/main.o + .debug_frame 0x000000000000009c 0x78 build/default/debug/onewire.o + +.debug_str 0x0000000000000000 0x42a + *(.debug_str) + .debug_str 0x0000000000000000 0x169 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + .debug_str 0x0000000000000169 0x287 build/default/debug/main.o + 0x2cc (size before relaxing) + .debug_str 0x00000000000003f0 0x3a build/default/debug/onewire.o + 0x25d (size before relaxing) + +.debug_loc 0x0000000000000000 0x656 + *(.debug_loc) + .debug_loc 0x0000000000000000 0x1ec build/default/debug/main.o + .debug_loc 0x00000000000001ec 0x46a build/default/debug/onewire.o + +.debug_macinfo + *(.debug_macinfo) + +.debug_weaknames + *(.debug_weaknames) + +.debug_funcnames + *(.debug_funcnames) + +.debug_typenames + *(.debug_typenames) + +.debug_varnames + *(.debug_varnames) + +.debug_pubtypes + *(.debug_pubtypes) + +.debug_ranges 0x0000000000000000 0x60 + *(.debug_ranges) + .debug_ranges 0x0000000000000000 0x30 build/default/debug/main.o + .debug_ranges 0x0000000000000030 0x30 build/default/debug/onewire.o + +.debug_macro + *(.debug_macro) +OUTPUT(dist/default/debug/attiny45v_thermometer.X.debug.elf elf32-avr) +LOAD linker stubs diff --git a/dist/default/production/attiny45v_thermometer.X.production.elf b/dist/default/production/attiny45v_thermometer.X.production.elf new file mode 100755 index 0000000..975888f Binary files /dev/null and b/dist/default/production/attiny45v_thermometer.X.production.elf differ diff --git a/dist/default/production/attiny45v_thermometer.X.production.hex b/dist/default/production/attiny45v_thermometer.X.production.hex new file mode 100644 index 0000000..10138f4 --- /dev/null +++ b/dist/default/production/attiny45v_thermometer.X.production.hex @@ -0,0 +1,36 @@ +:100000000EC01DC01CC01BC01AC019C018C017C02C +:1000100016C015C014C013C012C011C010C01124E6 +:100020001FBECFE5D1E0DEBFCDBF20E0A0E6B0E04F +:1000300001C01D92A137B207E1F771D0F5C0E0CF42 +:100040000F931F93CF93DF93CED08EEB94D0C8E65F +:10005000D0E001E710E0ADD08993C017D107D9F700 +:1000600081E0DF91CF911F910F9108956BD08111A5 +:1000700001C008958CEC7FD084E47DD081E0F9CF7D +:100080000F931F93CF93DF938C01EB01EFDF2FE7EB +:100090008FE492E1215080409040E1F700C00000E1 +:1000A000CFDFE8E6F0E021818081322F282FC901DF +:1000B00099237CF195958795959587959595879545 +:1000C00095958795F8018083809168008F70282F1F +:1000D00030E0C901880F991F820F931FAC01440FB4 +:1000E000551F42955295507F5427407F5427840FC7 +:1000F000951F820F931F9595879595958795959553 +:100100008795959587958883DF91CF911F910F9162 +:1001100008950F96CFCF86E087BB18BA0895CF9386 +:10012000DF9300D0CDB7DEB7F6DF19821A8280E602 +:1001300090E061D0BE016E5F7F4FCE010196A0DFDF +:100140000000F8CFF89491E097BBEFEBF3E0319724 +:10015000F1F700C0000017BAFAEBFA95F1F700C00A +:1001600086B3E3E3F3E03197F1F700C00000789441 +:1001700089278170089598E021E00DC027BB30EAFF +:100180003A95F1F717BA3AE13A95F1F700C0789449 +:100190008695915069F0F89480FFF0CF27BB30E14D +:1001A0003A95F1F717BA3AEA3A95F1F700C0EFCF6E +:1001B000089598E080E021E007C032E93A95F1F730 +:1001C00000C07894915071F0F894869527BB30E187 +:1001D0003A95F1F717BA38E13A95F1F7B09BEDCFC0 +:1001E0008068EBCF0895AEDF811101C008958CECDB +:1001F000C2DF81E0FBCF0F931F93CF93DF938C017E +:10020000A1DF811105C0DF91CF911F910F9108955A +:1002100083E3B1DFE801085F1F4FCBDF8993C0178D +:0C022000D107D9F781E0EFCFF894FFCFB1 +:00000001FF diff --git a/dist/default/production/attiny45v_thermometer.X.production.map b/dist/default/production/attiny45v_thermometer.X.production.map new file mode 100644 index 0000000..383a9e3 --- /dev/null +++ b/dist/default/production/attiny45v_thermometer.X.production.map @@ -0,0 +1,457 @@ +Archive member included to satisfy reference by file (symbol) + +/opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o (exit) +/opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + build/default/production/main.o (__do_clear_bss) + +Discarded input sections + + .data 0x0000000000000000 0x0 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + .bss 0x0000000000000000 0x0 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + .text 0x0000000000000000 0x0 build/default/production/main.o + .data 0x0000000000000000 0x0 build/default/production/main.o + .bss 0x0000000000000000 0x0 build/default/production/main.o + .text 0x0000000000000000 0x0 build/default/production/onewire.o + .data 0x0000000000000000 0x0 build/default/production/onewire.o + .bss 0x0000000000000000 0x0 build/default/production/onewire.o + .text 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .data 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .bss 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.mul + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.div + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.prologue + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.builtins + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.fmul + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text.libgcc.fixed + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + .text 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .data 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .bss 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.mul + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.div + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.prologue + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.builtins + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.fmul + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + .text.libgcc.fixed + 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + +Memory Configuration + +Name Origin Length Attributes +text 0x0000000000000000 0x0000000000001000 xr +data 0x0000000000800060 0x0000000000000100 rw !x +eeprom 0x0000000000810000 0x0000000000000100 rw !x +fuse 0x0000000000820000 0x0000000000000003 rw !x +lock 0x0000000000830000 0x0000000000000400 rw !x +signature 0x0000000000840000 0x0000000000000400 rw !x +user_signatures 0x0000000000850000 0x0000000000000400 rw !x +*default* 0x0000000000000000 0xffffffffffffffff + +Linker script and memory map + +LOAD /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o +LOAD build/default/production/main.o +LOAD build/default/production/onewire.o + 0x0000000000000001 __MPLAB_BUILD = 0x1 +START GROUP +LOAD /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr25/libm.a +END GROUP +START GROUP +LOAD /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a +LOAD /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr25/libm.a +LOAD /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr25/libc.a +LOAD /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/libattiny45.a +END GROUP + 0x0000000000000000 __TEXT_REGION_ORIGIN__ = DEFINED (__TEXT_REGION_ORIGIN__)?__TEXT_REGION_ORIGIN__:0x0 + [0x0000000000800060] __DATA_REGION_ORIGIN__ = DEFINED (__DATA_REGION_ORIGIN__)?__DATA_REGION_ORIGIN__:0x800060 + [0x0000000000001000] __TEXT_REGION_LENGTH__ = DEFINED (__TEXT_REGION_LENGTH__)?__TEXT_REGION_LENGTH__:0x2000 + [0x0000000000000100] __DATA_REGION_LENGTH__ = DEFINED (__DATA_REGION_LENGTH__)?__DATA_REGION_LENGTH__:0xffa0 + [0x0000000000000100] __EEPROM_REGION_LENGTH__ = DEFINED (__EEPROM_REGION_LENGTH__)?__EEPROM_REGION_LENGTH__:0x10000 + [0x0000000000000003] __FUSE_REGION_LENGTH__ = DEFINED (__FUSE_REGION_LENGTH__)?__FUSE_REGION_LENGTH__:0x400 + 0x0000000000000400 __LOCK_REGION_LENGTH__ = DEFINED (__LOCK_REGION_LENGTH__)?__LOCK_REGION_LENGTH__:0x400 + 0x0000000000000400 __SIGNATURE_REGION_LENGTH__ = DEFINED (__SIGNATURE_REGION_LENGTH__)?__SIGNATURE_REGION_LENGTH__:0x400 + 0x0000000000000400 __USER_SIGNATURE_REGION_LENGTH__ = DEFINED (__USER_SIGNATURE_REGION_LENGTH__)?__USER_SIGNATURE_REGION_LENGTH__:0x400 + +.hash + *(.hash) + +.dynsym + *(.dynsym) + +.dynstr + *(.dynstr) + +.gnu.version + *(.gnu.version) + +.gnu.version_d + *(.gnu.version_d) + +.gnu.version_r + *(.gnu.version_r) + +.rel.init + *(.rel.init) + +.rela.init + *(.rela.init) + +.rel.text + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t*) + +.rela.text + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t*) + +.rel.fini + *(.rel.fini) + +.rela.fini + *(.rela.fini) + +.rel.rodata + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r*) + +.rela.rodata + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r*) + +.rel.data + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d*) + +.rela.data + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d*) + +.rel.ctors + *(.rel.ctors) + +.rela.ctors + *(.rela.ctors) + +.rel.dtors + *(.rel.dtors) + +.rela.dtors + *(.rela.dtors) + +.rel.got + *(.rel.got) + +.rela.got + *(.rela.got) + +.rel.bss + *(.rel.bss) + +.rela.bss + *(.rela.bss) + +.rel.plt + *(.rel.plt) + +.rela.plt + *(.rela.plt) + +.text 0x0000000000000000 0x22c + *(.vectors) + .vectors 0x0000000000000000 0x1e /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + 0x0000000000000000 __vectors + 0x0000000000000000 __vector_default + *(.vectors) + *(.progmem.gcc*) + 0x000000000000001e . = ALIGN (0x2) + 0x000000000000001e __trampolines_start = . + *(.trampolines) + .trampolines 0x000000000000001e 0x0 linker stubs + *(.trampolines*) + 0x000000000000001e __trampolines_end = . + *libprintf_flt.a:*(.progmem.data) + *libc.a:*(.progmem.data) + *(.progmem*) + 0x000000000000001e . = ALIGN (0x2) + *(.jumptables) + *(.jumptables*) + *(.lowtext) + *(.lowtext*) + 0x000000000000001e __ctors_start = . + *(.ctors) + 0x000000000000001e __ctors_end = . + 0x000000000000001e __dtors_start = . + *(.dtors) + 0x000000000000001e __dtors_end = . + SORT(*)(.ctors) + SORT(*)(.dtors) + *(.init0) + .init0 0x000000000000001e 0x0 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + 0x000000000000001e __init + *(.init0) + *(.init1) + *(.init1) + *(.init2) + .init2 0x000000000000001e 0xc /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + *(.init2) + *(.init3) + *(.init3) + *(.init4) + .init4 0x000000000000002a 0x10 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_clear_bss.o) + 0x000000000000002a __do_clear_bss + *(.init4) + *(.init5) + *(.init5) + *(.init6) + *(.init6) + *(.init7) + *(.init7) + *(.init8) + *(.init8) + *(.init9) + .init9 0x000000000000003a 0x4 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + *(.init9) + *(.text) + .text 0x000000000000003e 0x2 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + 0x000000000000003e __vector_1 + 0x000000000000003e __vector_12 + 0x000000000000003e __bad_interrupt + 0x000000000000003e __vector_6 + 0x000000000000003e __vector_3 + 0x000000000000003e __vector_11 + 0x000000000000003e __vector_13 + 0x000000000000003e __vector_7 + 0x000000000000003e __vector_5 + 0x000000000000003e __vector_4 + 0x000000000000003e __vector_9 + 0x000000000000003e __vector_2 + 0x000000000000003e __vector_8 + 0x000000000000003e __vector_14 + 0x000000000000003e __vector_10 + 0x0000000000000040 . = ALIGN (0x2) + *(.text.*) + .text.DallasTemp_ReadScratchpad + 0x0000000000000040 0x2c build/default/production/main.o + 0x0000000000000040 DallasTemp_ReadScratchpad + .text.DallasTemp_Convert + 0x000000000000006c 0x14 build/default/production/main.o + 0x000000000000006c DallasTemp_Convert + .text.DallasTemp_GetTemperature + 0x0000000000000080 0x96 build/default/production/main.o + 0x0000000000000080 DallasTemp_GetTemperature + .text.MCU_Init + 0x0000000000000116 0x8 build/default/production/main.o + 0x0000000000000116 MCU_Init + .text.main 0x000000000000011e 0x26 build/default/production/main.o + 0x000000000000011e main + .text.OneWire_Presence + 0x0000000000000144 0x32 build/default/production/onewire.o + 0x0000000000000144 OneWire_Presence + .text.OneWire_WriteByte + 0x0000000000000176 0x3c build/default/production/onewire.o + 0x0000000000000176 OneWire_WriteByte + .text.OneWire_ReadByte + 0x00000000000001b2 0x34 build/default/production/onewire.o + 0x00000000000001b2 OneWire_ReadByte + .text.OneWire_SkipROM + 0x00000000000001e6 0x10 build/default/production/onewire.o + 0x00000000000001e6 OneWire_SkipROM + .text.OneWire_ReadROM + 0x00000000000001f6 0x32 build/default/production/onewire.o + 0x00000000000001f6 OneWire_ReadROM + 0x0000000000000228 . = ALIGN (0x2) + *(.fini9) + .fini9 0x0000000000000228 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + 0x0000000000000228 exit + 0x0000000000000228 _exit + *(.fini9) + *(.fini8) + *(.fini8) + *(.fini7) + *(.fini7) + *(.fini6) + *(.fini6) + *(.fini5) + *(.fini5) + *(.fini4) + *(.fini4) + *(.fini3) + *(.fini3) + *(.fini2) + *(.fini2) + *(.fini1) + *(.fini1) + *(.fini0) + .fini0 0x0000000000000228 0x4 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o) + *(.fini0) + 0x000000000000022c _etext = . + +.data 0x0000000000800060 0x0 load address 0x000000000000022c + [!provide] PROVIDE (__data_start, .) + *(.data) + *(.data*) + *(.gnu.linkonce.d*) + *(.rodata) + *(.rodata*) + *(.gnu.linkonce.r*) + 0x0000000000800060 . = ALIGN (0x2) + 0x0000000000800060 _edata = . + [!provide] PROVIDE (__data_end, .) + +.bss 0x0000000000800060 0x11 + 0x0000000000800060 PROVIDE (__bss_start, .) + *(.bss) + *(.bss*) + .bss.dallas_rom + 0x0000000000800060 0x8 build/default/production/main.o + 0x0000000000800060 dallas_rom + .bss.dallas_scratchpad + 0x0000000000800068 0x9 build/default/production/main.o + 0x0000000000800068 dallas_scratchpad + *(COMMON) + 0x0000000000800071 PROVIDE (__bss_end, .) + 0x000000000000022c __data_load_start = LOADADDR (.data) + 0x000000000000022c __data_load_end = (__data_load_start + SIZEOF (.data)) + +.noinit 0x0000000000800071 0x0 + [!provide] PROVIDE (__noinit_start, .) + *(.noinit*) + [!provide] PROVIDE (__noinit_end, .) + 0x0000000000800071 _end = . + [!provide] PROVIDE (__heap_start, .) + +.eeprom 0x0000000000810000 0x0 + *(.eeprom*) + 0x0000000000810000 __eeprom_end = . + +.fuse + *(.fuse) + *(.lfuse) + *(.hfuse) + *(.efuse) + +.lock + *(.lock*) + +.signature + *(.signature*) + +.user_signatures + *(.user_signatures*) + +.stab + *(.stab) + +.stabstr + *(.stabstr) + +.stab.excl + *(.stab.excl) + +.stab.exclstr + *(.stab.exclstr) + +.stab.index + *(.stab.index) + +.stab.indexstr + *(.stab.indexstr) + +.comment 0x0000000000000000 0x30 + *(.comment) + .comment 0x0000000000000000 0x30 build/default/production/main.o + 0x31 (size before relaxing) + .comment 0x0000000000000030 0x31 build/default/production/onewire.o + +.note.gnu.avr.deviceinfo + 0x0000000000000000 0x3c + .note.gnu.avr.deviceinfo + 0x0000000000000000 0x3c /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + +.note.gnu.build-id + *(.note.gnu.build-id) + +.debug + *(.debug) + +.line + *(.line) + +.debug_srcinfo + *(.debug_srcinfo) + +.debug_sfnames + *(.debug_sfnames) + +.debug_aranges + *(.debug_aranges) + +.debug_pubnames + *(.debug_pubnames) + +.debug_info 0x0000000000000000 0x420 + *(.debug_info .gnu.linkonce.wi.*) + .debug_info 0x0000000000000000 0x420 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + +.debug_abbrev 0x0000000000000000 0x3e8 + *(.debug_abbrev) + .debug_abbrev 0x0000000000000000 0x3e8 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + +.debug_line 0x0000000000000000 0xf2 + *(.debug_line .debug_line.* .debug_line_end) + .debug_line 0x0000000000000000 0xf2 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + +.debug_frame + *(.debug_frame) + +.debug_str 0x0000000000000000 0x169 + *(.debug_str) + .debug_str 0x0000000000000000 0x169 /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o + +.debug_loc + *(.debug_loc) + +.debug_macinfo + *(.debug_macinfo) + +.debug_weaknames + *(.debug_weaknames) + +.debug_funcnames + *(.debug_funcnames) + +.debug_typenames + *(.debug_typenames) + +.debug_varnames + *(.debug_varnames) + +.debug_pubtypes + *(.debug_pubtypes) + +.debug_ranges + *(.debug_ranges) + +.debug_macro + *(.debug_macro) +OUTPUT(dist/default/production/attiny45v_thermometer.X.production.elf elf32-avr) +LOAD linker stubs diff --git a/main.c b/main.c new file mode 100644 index 0000000..93cc877 --- /dev/null +++ b/main.c @@ -0,0 +1,60 @@ +#include +#include +#include +#include "onewire.h" + +#define DS18B20_CMD_CONVERTTEMP 0x44 +#define DS18B20_CMD_RSCRATCHPAD 0xbe + +uint8_t dallas_scratchpad[9] = {0, 0, 0, 0, 0, 0, 0, 0}; +uint8_t dallas_rom[8] = { 0, 0, 0, 0, 0, 0, 0, 0, }; + +uint8_t DallasTemp_ReadScratchpad() { + uint8_t i = 0; + + OneWire_SkipROM(); + OneWire_WriteByte(DS18B20_CMD_RSCRATCHPAD); + + + while (i < 9) { + dallas_scratchpad[i++] = OneWire_ReadByte(); + } + + return 1; +} + +uint8_t DallasTemp_Convert() { + if (!OneWire_Presence()) return 0; + OneWire_WriteByte(ONE_WIRE_SKIPROM); + OneWire_WriteByte(DS18B20_CMD_CONVERTTEMP); + return 1; +} + +void DallasTemp_GetTemperature(int8_t *data, uint8_t *fraction) { + DallasTemp_Convert(); + _delay_ms(750); + DallasTemp_ReadScratchpad(); + + (*data) = ((dallas_scratchpad[1] << 8) | dallas_scratchpad[0]) / 16; + (*fraction) = ((dallas_scratchpad[0] & 0x0f) * 100) / 16; +} + +void MCU_Init(void) { + DDRB = _BV(PB1) | _BV(PB2); + PORTB = 0x00; +} + +int main(void) { + MCU_Init(); + + int8_t temperature = 0; + uint8_t fraction = 0; + + OneWire_ReadROM(dallas_rom); + + while (1) { + DallasTemp_GetTemperature(&temperature, &fraction); + asm("nop"); + } + return 0; +} \ No newline at end of file diff --git a/nbproject/Makefile-default.mk b/nbproject/Makefile-default.mk new file mode 100644 index 0000000..d3f9320 --- /dev/null +++ b/nbproject/Makefile-default.mk @@ -0,0 +1,189 @@ +# +# 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=mkdir -p +RM=rm -f +MV=mv +CP=cp + +# Macros +CND_CONF=default +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +IMAGE_TYPE=debug +OUTPUT_SUFFIX=elf +DEBUGGABLE_SUFFIX=elf +FINAL_IMAGE=${DISTDIR}/attiny45v_thermometer.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +else +IMAGE_TYPE=production +OUTPUT_SUFFIX=hex +DEBUGGABLE_SUFFIX=elf +FINAL_IMAGE=${DISTDIR}/attiny45v_thermometer.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=main.c onewire.c + +# Object Files Quoted if spaced +OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.o ${OBJECTDIR}/onewire.o +POSSIBLE_DEPFILES=${OBJECTDIR}/main.o.d ${OBJECTDIR}/onewire.o.d + +# Object Files +OBJECTFILES=${OBJECTDIR}/main.o ${OBJECTDIR}/onewire.o + +# Source Files +SOURCEFILES=main.c onewire.c + +# Pack Options +PACK_COMPILER_OPTIONS=-I "${DFP_DIR}/include" +PACK_COMMON_OPTIONS=-B "${DFP_DIR}/gcc/dev/attiny45" + + + +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}/attiny45v_thermometer.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} + +MP_PROCESSOR_OPTION=ATtiny45 +# ------------------------------------------------------------------------------------ +# Rules for buildStep: assemble +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +else +endif + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: assembleWithPreprocess +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +else +endif + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: compile +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +${OBJECTDIR}/main.o: main.c .generated_files/flags/default/ebd6578f553cc856320c4e3fab74007688bb7df4 .generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/main.o.d + @${RM} ${OBJECTDIR}/main.o + ${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL + +${OBJECTDIR}/onewire.o: onewire.c .generated_files/flags/default/f032a224192bd107f2123e08604a3b5b0f41643c .generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/onewire.o.d + @${RM} ${OBJECTDIR}/onewire.o + ${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -g -DDEBUG -gdwarf-2 -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/onewire.o.d" -MT "${OBJECTDIR}/onewire.o.d" -MT ${OBJECTDIR}/onewire.o -o ${OBJECTDIR}/onewire.o onewire.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL + +else +${OBJECTDIR}/main.o: main.c .generated_files/flags/default/852a931b512b8c8a6143655dd7f5022a6cb025f5 .generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/main.o.d + @${RM} ${OBJECTDIR}/main.o + ${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL + +${OBJECTDIR}/onewire.o: onewire.c .generated_files/flags/default/5312daf68dcab5b5e0043f8514afba88eb8ddeb0 .generated_files/flags/default/12c67fe6cdcd6963bda122da91f9033805394b5f + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/onewire.o.d + @${RM} ${OBJECTDIR}/onewire.o + ${MP_CC} $(MP_EXTRA_CC_PRE) -mmcu=attiny45 ${PACK_COMPILER_OPTIONS} ${PACK_COMMON_OPTIONS} -x c -c -D__$(MP_PROCESSOR_OPTION)__ -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -MD -MP -MF "${OBJECTDIR}/onewire.o.d" -MT "${OBJECTDIR}/onewire.o.d" -MT ${OBJECTDIR}/onewire.o -o ${OBJECTDIR}/onewire.o onewire.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -DF_CPU=8000000UL + +endif + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: compileCPP +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +else +endif + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: link +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +${DISTDIR}/attiny45v_thermometer.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} ${DISTDIR} + ${MP_CC} $(MP_EXTRA_LD_PRE) -mmcu=attiny45 ${PACK_COMMON_OPTIONS} -gdwarf-2 -D__$(MP_PROCESSOR_OPTION)__ -Wl,-Map="${DISTDIR}/attiny45v_thermometer.X.${IMAGE_TYPE}.map" -o ${DISTDIR}/attiny45v_thermometer.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -DXPRJ_default=$(CND_CONF) -DF_CPU=8000000UL $(COMPARISON_BUILD) -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1 -Wl,--gc-sections -Wl,--start-group -Wl,-lm -Wl,--end-group + + + + + + +else +${DISTDIR}/attiny45v_thermometer.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} ${DISTDIR} + ${MP_CC} $(MP_EXTRA_LD_PRE) -mmcu=attiny45 ${PACK_COMMON_OPTIONS} -D__$(MP_PROCESSOR_OPTION)__ -Wl,-Map="${DISTDIR}/attiny45v_thermometer.X.${IMAGE_TYPE}.map" -o ${DISTDIR}/attiny45v_thermometer.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -DXPRJ_default=$(CND_CONF) -DF_CPU=8000000UL $(COMPARISON_BUILD) -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION) -Wl,--gc-sections -Wl,--start-group -Wl,-lm -Wl,--end-group + ${MP_CC_DIR}/avr-objcopy -O ihex "${DISTDIR}/attiny45v_thermometer.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}" "${DISTDIR}/attiny45v_thermometer.X.${IMAGE_TYPE}.hex" + + + + + +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 "${PATH_TO_IDE_BIN}"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..9f6b63c --- /dev/null +++ b/nbproject/Makefile-genesis.properties @@ -0,0 +1,14 @@ +# +#Sat Jul 08 19:15:27 MSK 2023 +default.languagetoolchain.version=7.3.0 +default.Pack.dfplocation=/home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151 +default.com-microchip-mplab-nbide-toolchain-avr-AVRLanguageToolchain.md5=f7c8f2a9c7d7748a6cb97af5c32efadd +conf.ids=default +default.languagetoolchain.dir=/opt/avr8-gnu-toolchain-linux_x86_64/bin +host.id=30e8-ay6h-7g +configurations-xml=737ac09162ca74e2d83ec8c785f6d965 +default.com-microchip-mplab-mdbcore-snap-SnapToolImpl.md5=eaa336cefb7fc46db8b50b7b2b6e54ca +com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e02ca5e9f5042ffd365b42ab82d3a9b +user-defined-mime-resolver-xml=none +proj.dir=/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer.X +host.platform=linux diff --git a/nbproject/Makefile-impl.mk b/nbproject/Makefile-impl.mk new file mode 100644 index 0000000..ac27e40 --- /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=attiny45v_thermometer.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..952e823 --- /dev/null +++ b/nbproject/Makefile-local-default.mk @@ -0,0 +1,37 @@ +# +# 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" ... +# +PATH_TO_IDE_BIN=/opt/microchip/mplabx/v6.00/mplab_platform/platform/../mplab_ide/modules/../../bin/ +# Adding MPLAB X bin directory to path. +PATH:=/opt/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="/opt/microchip/mplabx/v6.00/sys/java/zulu8.54.0.21-ca-fx-jre8.0.292-linux_x64/bin/" +OS_CURRENT="$(shell uname -s)" +MP_CC="/opt/avr8-gnu-toolchain-linux_x86_64/bin/avr-gcc" +MP_CPPC="/opt/avr8-gnu-toolchain-linux_x86_64/bin/avr-g++" +# MP_BC is not defined +MP_AS="/opt/avr8-gnu-toolchain-linux_x86_64/bin/avr-as" +MP_LD="/opt/avr8-gnu-toolchain-linux_x86_64/bin/avr-ld" +MP_AR="/opt/avr8-gnu-toolchain-linux_x86_64/bin/avr-ar" +DEP_GEN=${MP_JAVA_PATH}java -jar "/opt/microchip/mplabx/v6.00/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar" +MP_CC_DIR="/opt/avr8-gnu-toolchain-linux_x86_64/bin" +MP_CPPC_DIR="/opt/avr8-gnu-toolchain-linux_x86_64/bin" +# MP_BC_DIR is not defined +MP_AS_DIR="/opt/avr8-gnu-toolchain-linux_x86_64/bin" +MP_LD_DIR="/opt/avr8-gnu-toolchain-linux_x86_64/bin" +MP_AR_DIR="/opt/avr8-gnu-toolchain-linux_x86_64/bin" +# MP_BC_DIR is not defined +DFP_DIR=/home/sergeyyarkov/.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..c5ef6ed --- /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=attiny45v_thermometer.X.production.hex +CND_ARTIFACT_PATH_default=dist/default/production/attiny45v_thermometer.X.production.hex diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml new file mode 100644 index 0000000..c50f96f --- /dev/null +++ b/nbproject/configurations.xml @@ -0,0 +1,265 @@ + + + + + onewire.h + + + + + main.c + onewire.c + + + Makefile + + + Makefile + + + + localhost + ATtiny45 + + + snap + AVR + 7.3.0 + 2 + + + + + + + + + + + + + + + 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..e54c8b2 --- /dev/null +++ b/nbproject/private/configurations.xml @@ -0,0 +1,25 @@ + + + Makefile + 0 + + + :=MPLABComm-USB-Microchip:=<vid>03EB:=<pid>2180:=<rev>0100:=<man>Microchip Technology Incorporated:=<prod>MPLAB Snap ICD CMSIS-DAP:=<sn>BUR205073320:=<drv>x:=<xpt>h:=end + /opt/avr8-gnu-toolchain-linux_x86_64/bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..3b84be6 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,9 @@ + + + + + + file:/home/sergeyyarkov/Documents/Projects/Firmwares/AVR/attiny45v_thermometer.X/main.c + + + diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..0c3f3bd --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,27 @@ + + + com.microchip.mplab.nbide.embedded.makeproject + + + attiny45v_thermometer + 41980b78-8820-4e00-893b-c2b507371f13 + 0 + c + + h + + UTF-8 + + + + + default + 2 + + + + false + + + + diff --git a/onewire.c b/onewire.c new file mode 100644 index 0000000..7908d06 --- /dev/null +++ b/onewire.c @@ -0,0 +1,75 @@ +#include "onewire.h" + +uint8_t OneWire_Presence(void) { + uint8_t is_detected = 0; + + cli(); + ow_pull(); + _delay_us(480); + ow_release(); + _delay_us(70); + if (bit_is_clear(OW_PIN, OW_LINE)) is_detected = 1; + _delay_us(410); + sei(); + return is_detected; +} + +void OneWire_WriteByte(uint8_t byte) { + uint8_t i = 8; + + while (i--) { + cli(); + if (byte & 0x01) { + ow_pull(); + _delay_us(6); + ow_release(); + _delay_us(64); + } else { + ow_pull(); + _delay_us(60); + ow_release(); + _delay_us(10); + } + sei(); + byte >>= 1; + } +} + +uint8_t OneWire_ReadByte() { + uint8_t byte = 0; + uint8_t i = 8; + + while (i--) { + cli(); + byte >>= 1; + ow_pull(); + _delay_us(6); + ow_release(); + _delay_us(9); + if (bit_is_set(OW_PIN, OW_LINE)) byte |= (1<<7); + _delay_us(55); + sei(); + } + + return byte; +} + +uint8_t OneWire_SkipROM() { + if (!OneWire_Presence()) return 0; + OneWire_WriteByte(ONE_WIRE_SKIPROM); + return 1; +} + +uint8_t OneWire_ReadROM(uint8_t *buffer) { + if (!OneWire_Presence()) return 0; + + uint8_t p = 0; + OneWire_WriteByte(ONE_WIRE_READROM); + + while (p < 8) { + *(buffer++) = OneWire_ReadByte(); + p++; + } + + return 1; +} \ No newline at end of file diff --git a/onewire.h b/onewire.h new file mode 100644 index 0000000..cd04222 --- /dev/null +++ b/onewire.h @@ -0,0 +1,29 @@ +#include +#include +#include +#include + +#define OW_LINE PB0 +#define OW_PIN PINB +#define OW_PORT PORTB +#define OW_DDR DDRB + +#define ow_pull() (OW_DDR = _BV(OW_LINE)) +#define ow_release() (OW_DDR = !_BV(OW_LINE)) + +#define ONE_WIRE_READROM 0x33 +#define ONE_WIRE_SKIPROM 0xcc +#define ONE_WIRE_SEARCHROM 0xf0 +#define ONE_WIRE_MATCHROM 0x55 + +#ifndef ONEWIRE_H +#define ONEWIRE_H + +uint8_t OneWire_Presence(void); +void OneWire_WriteByte(uint8_t byte); +uint8_t OneWire_ReadByte(); +uint8_t OneWire_SkipROM(); +uint8_t OneWire_ReadROM(uint8_t *buffer); + +#endif /* ONEWIRE_H */ +