Browse Source

ugh

master
Your Name 4 years ago
parent
commit
2e1c1f9320
67 changed files with 4694 additions and 0 deletions
  1. +113
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/Makefile
  2. +76
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/main.c
  3. +158
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Makefile-default.mk
  4. +10
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Makefile-genesis.properties
  5. +69
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Makefile-impl.mk
  6. +36
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Makefile-local-default.mk
  7. +13
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Makefile-variables.mk
  8. +73
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Package-default.bash
  9. +160
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/configurations.xml
  10. +25
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/private/configurations.xml
  11. +9
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/private/private.xml
  12. +32
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/project.xml
  13. +113
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/Makefile
  14. BIN
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/build/default/production/main.o
  15. +55
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/build/default/production/main.o.d
  16. +17
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/dist/default/production/memoryfile.xml
  17. BIN
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/dist/default/production/tests5_timer_6000hz.X.production.elf
  18. +10
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/dist/default/production/tests5_timer_6000hz.X.production.hex
  19. +400
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/dist/default/production/tests5_timer_6000hz.X.production.map
  20. +83
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/main.c
  21. +158
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Makefile-default.mk
  22. +10
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Makefile-genesis.properties
  23. +69
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Makefile-impl.mk
  24. +36
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Makefile-local-default.mk
  25. +13
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Makefile-variables.mk
  26. +73
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Package-default.bash
  27. +160
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/configurations.xml
  28. +25
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/private/configurations.xml
  29. +7
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/private/private.xml
  30. +33
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/project.xml
  31. +113
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/Makefile
  32. BIN
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/build/default/production/main.o
  33. +55
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/build/default/production/main.o.d
  34. +17
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/dist/default/production/memoryfile.xml
  35. BIN
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/dist/default/production/tests6_timer_6000hz.X.production.elf
  36. +11
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/dist/default/production/tests6_timer_6000hz.X.production.hex
  37. +400
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/dist/default/production/tests6_timer_6000hz.X.production.map
  38. +135
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/main.c
  39. +158
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Makefile-default.mk
  40. +10
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Makefile-genesis.properties
  41. +69
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Makefile-impl.mk
  42. +36
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Makefile-local-default.mk
  43. +13
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Makefile-variables.mk
  44. +73
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Package-default.bash
  45. +160
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/configurations.xml
  46. +25
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/private/configurations.xml
  47. +9
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/private/private.xml
  48. +34
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/project.xml
  49. +113
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/Makefile
  50. BIN
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/build/default/production/main.o
  51. +55
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/build/default/production/main.o.d
  52. +17
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/dist/default/production/memoryfile.xml
  53. BIN
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/dist/default/production/tests7_timer_6000hz.X.production.elf
  54. +9
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/dist/default/production/tests7_timer_6000hz.X.production.hex
  55. +395
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/dist/default/production/tests7_timer_6000hz.X.production.map
  56. +150
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/main.c
  57. +158
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Makefile-default.mk
  58. +10
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Makefile-genesis.properties
  59. +69
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Makefile-impl.mk
  60. +36
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Makefile-local-default.mk
  61. +13
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Makefile-variables.mk
  62. +73
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Package-default.bash
  63. +160
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/configurations.xml
  64. +25
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/private/configurations.xml
  65. +9
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/private/private.xml
  66. +35
    -0
      Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/project.xml
  67. +13
    -0
      Attiny_Solar_Energy_Harvest/docs/38.tex

+ 113
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/Makefile View File

@ -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

+ 76
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/main.c View File

@ -0,0 +1,76 @@
#include <xc.h>
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <util/atomic.h>
#include <avr/wdt.h>
//reference: https://www.avrfreaks.net/forum/sample-project-attiny10
//another ref: https://blog.podkalicki.com/attiny13-blinky-with-timer-compa/
//
// Wake up by WDT interrupt.
// Don't need to do anything here but (auto-) clearing the interrupt flag.
EMPTY_INTERRUPT(WDT_vect);
/*
Delay in powerdown mode. Wake up by watchdog interrupt.
*/
void delay_power_down_wdt(uint8_t wdto)
{
wdt_reset();
wdt_enable(wdto);
WDTCSR |= (1<<WDIE);
//so far (with 128Khz clk) this sleep will be about 30-40 seconds.
//(however, I'll add the below to)
//adjust sleep speed here:
// 0110 is 1hz at 128KHz
//WDTCSR |= (0<< WDP3);
//WDTCSR |= (1<< WDP2);
//WDTCSR |= (1<< WDP1);
//WDTCSR |= (0<< WDP0);
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
// Make sure interrups are enabled and the I flag is restored
NONATOMIC_BLOCK(NONATOMIC_RESTORESTATE)
{
sleep_cpu();
wdt_disable();
}
sleep_disable();
}
int main(void)
{
sei();
//Write CCP (to enable changing clock)
CCP = 0xD8;
//change CLK to 128KHz
CLKMSR = 0b01;
//In order to use the lowest sleep mode, we must either
//use watchdog or pin change interrupt to wake ic.
//here i will use watchdog
// PB2 change to output
DDRB = 1<<2;
while(1)
{
// Toggle PB2 Hi/Low
PINB = 1<<2;
//_delay_ms(500);
delay_power_down_wdt(WDTO_1S);
}
}

+ 158
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Makefile-default.mk View File

@ -0,0 +1,158 @@
#
# 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=dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
else
IMAGE_TYPE=production
OUTPUT_SUFFIX=hex
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/tests3.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
# Object Files Quoted if spaced
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.o
POSSIBLE_DEPFILES=${OBJECTDIR}/main.o.d
# Object Files
OBJECTFILES=${OBJECTDIR}/main.o
# Source Files
SOURCEFILES=main.c
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 dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
MP_PROCESSOR_OPTION=ATtiny10
# ------------------------------------------------------------------------------------
# Rules for buildStep: compile
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${OBJECTDIR}/main.o: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/main.o.d
@${RM} ${OBJECTDIR}/main.o
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -g -DDEBUG -gdwarf-2 -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c
else
${OBJECTDIR}/main.o: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/main.o.d
@${RM} ${OBJECTDIR}/main.o
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c
endif
# ------------------------------------------------------------------------------------
# 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: link
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.map -D__DEBUG=1 -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -gdwarf-2 -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -gdwarf-3 $(COMPARISON_BUILD) -Wl,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -o dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -o dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1
@${RM} dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.hex
else
dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.map -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -gdwarf-3 $(COMPARISON_BUILD) -Wl,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -o dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -o dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--start-group -Wl,-lm -Wl,--end-group
${MP_CC_DIR}/avr-objcopy -O ihex "dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}" "dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.hex"
endif
# Subprojects
.build-subprojects:
# Subprojects
.clean-subprojects:
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r build/default
${RM} -r dist/default
# Enable dependency checking
.dep.inc: .depcheck-impl
DEPFILES=$(shell "${PATH_TO_IDE_BIN}"mplabwildcard ${POSSIBLE_DEPFILES})
ifneq (${DEPFILES},)
include ${DEPFILES}
endif

+ 10
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Makefile-genesis.properties View File

@ -0,0 +1,10 @@
#
#Sun Jul 05 12:21:55 EDT 2020
default.Pack.dfplocation=/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10
default.languagetoolchain.dir=/opt/microchip/xc8/v2.10/bin
configurations-xml=5e854234238a55dafe0eba84ce6d1401
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e453b0cf7f7da72a932cfdb2f655401
default.languagetoolchain.version=2.10
host.platform=linux
conf.ids=default
default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=23d12c447ed4f9462f01e2202bc2f36a

+ 69
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Makefile-impl.mk View File

@ -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=tests3.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

+ 36
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Makefile-local-default.mk View File

@ -0,0 +1,36 @@
#
# 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/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/
# Adding MPLAB X bin directory to path.
PATH:=/opt/microchip/mplabx/v5.25/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/v5.25/sys/java/jre1.8.0_181/bin/"
OS_CURRENT="$(shell uname -s)"
MP_CC="/opt/microchip/xc8/v2.10/bin/xc8-cc"
# MP_CPPC is not defined
# MP_BC is not defined
MP_AS="/opt/microchip/xc8/v2.10/bin/xc8-cc"
MP_LD="/opt/microchip/xc8/v2.10/bin/xc8-cc"
MP_AR="/opt/microchip/xc8/v2.10/bin/xc8-ar"
DEP_GEN=${MP_JAVA_PATH}java -jar "/opt/microchip/mplabx/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
MP_CC_DIR="/opt/microchip/xc8/v2.10/bin"
# MP_CPPC_DIR is not defined
# MP_BC_DIR is not defined
MP_AS_DIR="/opt/microchip/xc8/v2.10/bin"
MP_LD_DIR="/opt/microchip/xc8/v2.10/bin"
MP_AR_DIR="/opt/microchip/xc8/v2.10/bin"
# MP_BC_DIR is not defined

+ 13
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Makefile-variables.mk View File

@ -0,0 +1,13 @@
#
# Generated - do not edit!
#
# NOCDDL
#
CND_BASEDIR=`pwd`
# default configuration
CND_ARTIFACT_DIR_default=dist/default/production
CND_ARTIFACT_NAME_default=tests3.X.production.hex
CND_ARTIFACT_PATH_default=dist/default/production/tests3.X.production.hex
CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package
CND_PACKAGE_NAME_default=tests3.x.tar
CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/tests3.x.tar

+ 73
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/Package-default.bash View File

@ -0,0 +1,73 @@
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_CONF=default
CND_DISTDIR=dist
TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/tests3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
OUTPUT_BASENAME=tests3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
PACKAGE_TOP_DIR=tests3.x/
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
# Setup
cd "${TOP}"
mkdir -p ${CND_DISTDIR}/${CND_CONF}/package
rm -rf ${TMPDIR}
mkdir -p ${TMPDIR}
# Copy files and create directories and links
cd "${TOP}"
makeDirectory ${TMPDIR}/tests3.x/bin
copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
# Generate tar file
cd "${TOP}"
rm -f ${CND_DISTDIR}/${CND_CONF}/package/tests3.x.tar
cd ${TMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/tests3.x.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${TMPDIR}

+ 160
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/configurations.xml View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="65">
<logicalFolder name="root" displayName="root" projectFiles="true">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="LinkerScript"
displayName="Linker Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>main.c</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="default" type="2">
<toolsSet>
<developmentServer>localhost</developmentServer>
<targetDevice>ATtiny10</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool></platformTool>
<languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>2.10</languageToolchainVersion>
<platform>2</platform>
</toolsSet>
<packs>
<pack name="ATtiny_DFP" vendor="Microchip" version="2.0.10"/>
</packs>
<compileType>
<linkerTool>
<linkerLibItems>
</linkerLibItems>
</linkerTool>
<archiverTool>
</archiverTool>
<loading>
<useAlternateLoadableFile>false</useAlternateLoadableFile>
<parseOnProdLoad>false</parseOnProdLoad>
<alternateLoadableFile></alternateLoadableFile>
</loading>
<subordinates>
</subordinates>
</compileType>
<makeCustomizationType>
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
<makeCustomizationPreStep></makeCustomizationPreStep>
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
<makeCustomizationPostStep></makeCustomizationPostStep>
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
</makeCustomizationType>
<HI-TECH-COMP>
<property key="additional-warnings" value="true"/>
<property key="asmlist" value="true"/>
<property key="default-bitfield-type" value="true"/>
<property key="default-char-type" value="true"/>
<property key="define-macros" value=""/>
<property key="disable-optimizations" value="false"/>
<property key="extra-include-directories" value=""/>
<property key="favor-optimization-for" value="-speed,+space"/>
<property key="garbage-collect-data" value="true"/>
<property key="garbage-collect-functions" value="true"/>
<property key="identifier-length" value="255"/>
<property key="local-generation" value="false"/>
<property key="operation-mode" value="free"/>
<property key="opt-xc8-compiler-strict_ansi" value="false"/>
<property key="optimization-assembler" value="true"/>
<property key="optimization-assembler-files" value="true"/>
<property key="optimization-debug" value="false"/>
<property key="optimization-invariant-enable" value="false"/>
<property key="optimization-invariant-value" value="16"/>
<property key="optimization-level" value="-O1"/>
<property key="optimization-speed" value="false"/>
<property key="optimization-stable-enable" value="false"/>
<property key="pack-struct" value="true"/>
<property key="preprocess-assembler" value="true"/>
<property key="short-enums" value="true"/>
<property key="undefine-macros" value=""/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
<property key="verbose" value="false"/>
<property key="warning-level" value="-3"/>
<property key="what-to-do" value="ignore"/>
</HI-TECH-COMP>
<HI-TECH-LINK>
<property key="additional-options-checksum" value=""/>
<property key="additional-options-code-offset" value=""/>
<property key="additional-options-command-line" value=""/>
<property key="additional-options-errata" value=""/>
<property key="additional-options-extend-address" value="false"/>
<property key="additional-options-trace-type" value=""/>
<property key="additional-options-use-response-files" value="false"/>
<property key="backup-reset-condition-flags" value="false"/>
<property key="calibrate-oscillator" value="false"/>
<property key="calibrate-oscillator-value" value="0x3400"/>
<property key="clear-bss" value="true"/>
<property key="code-model-external" value="wordwrite"/>
<property key="code-model-rom" value=""/>
<property key="create-html-files" value="false"/>
<property key="data-model-ram" value=""/>
<property key="data-model-size-of-double" value="24"/>
<property key="data-model-size-of-double-gcc" value="no-short-double"/>
<property key="data-model-size-of-float" value="24"/>
<property key="data-model-size-of-float-gcc" value="no-short-float"/>
<property key="display-class-usage" value="false"/>
<property key="display-hex-usage" value="false"/>
<property key="display-overall-usage" value="true"/>
<property key="display-psect-usage" value="false"/>
<property key="extra-lib-directories" value=""/>
<property key="fill-flash-options-addr" value=""/>
<property key="fill-flash-options-const" value=""/>
<property key="fill-flash-options-how" value="0"/>
<property key="fill-flash-options-inc-const" value="1"/>
<property key="fill-flash-options-increment" value=""/>
<property key="fill-flash-options-seq" value=""/>
<property key="fill-flash-options-what" value="0"/>
<property key="format-hex-file-for-download" value="false"/>
<property key="initialize-data" value="true"/>
<property key="input-libraries" value="libm"/>
<property key="keep-generated-startup.as" value="false"/>
<property key="link-in-c-library" value="true"/>
<property key="link-in-c-library-gcc" value=""/>
<property key="link-in-peripheral-library" value="false"/>
<property key="managed-stack" value="false"/>
<property key="opt-xc8-linker-file" value="false"/>
<property key="opt-xc8-linker-link_startup" value="false"/>
<property key="opt-xc8-linker-serial" value=""/>
<property key="program-the-device-with-default-config-words" value="true"/>
<property key="remove-unused-sections" value="true"/>
</HI-TECH-LINK>
<XC8-CO>
<property key="coverage-enable" value=""/>
</XC8-CO>
<XC8-config-global>
<property key="advanced-elf" value="true"/>
<property key="gcc-opt-driver-new" value="true"/>
<property key="gcc-opt-std" value="-std=c99"/>
<property key="gcc-output-file-format" value="dwarf-3"/>
<property key="omit-pack-options" value="false"/>
<property key="output-file-format" value="-mcof,+elf"/>
<property key="stack-size-high" value="auto"/>
<property key="stack-size-low" value="auto"/>
<property key="stack-size-main" value="auto"/>
<property key="stack-type" value="compiled"/>
<property key="user-pack-device-support" value=""/>
</XC8-config-global>
</conf>
</confs>
</configurationDescriptor>

+ 25
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/private/configurations.xml View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="65">
<projectmakefile>Makefile</projectmakefile>
<defaultConf>0</defaultConf>
<confs>
<conf name="default" type="2">
<platformToolSN></platformToolSN>
<languageToolchainDir>/opt/microchip/xc8/v2.10/bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>
</mdbdebugger>
<runprofile version="6">
<args></args>
<rundir></rundir>
<buildfirst>true</buildfirst>
<console-type>0</console-type>
<terminal-type>0</terminal-type>
<remove-instrumentation>0</remove-instrumentation>
<environment>
</environment>
</runprofile>
</conf>
</confs>
</configurationDescriptor>

+ 9
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/private/private.xml View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/dev/Desktop/code/electronics/attiny10_mplab_test/tests4_timer_6000hz.X/main.c</file>
</group>
</open-files>
</project-private>

+ 32
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests4_timer_6000hz.X/nbproject/project.xml View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/make-project/1">
<name>tests4_timer_6000hz</name>
<name>tests3</name>
<name>tests2</name>
<name>tests1</name>
<name>test2</name>
<name>test1</name>
<creation-uuid>1f6b2f6c-8c6d-40dd-a737-d73d987b2bef</creation-uuid>
<make-project-type>0</make-project-type>
<c-extensions>c</c-extensions>
<cpp-extensions/>
<header-extensions/>
<asminc-extensions/>
<sourceEncoding>ISO-8859-1</sourceEncoding>
<make-dep-projects/>
<sourceRootList/>
<confList>
<confElem>
<name>default</name>
<type>2</type>
</confElem>
</confList>
<formatting>
<project-formatting-style>false</project-formatting-style>
</formatting>
</data>
</configuration>
</project>

+ 113
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/Makefile View File

@ -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

BIN
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/build/default/production/main.o View File


+ 55
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/build/default/production/main.o.d View File

@ -0,0 +1,55 @@
build/default/production/main.o.d build/default/production/main.o: main.c \
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/xc.h \
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/cci.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/io.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/sfr_defs.h \
/opt/microchip/xc8/v2.10/avr/avr/include/inttypes.h \
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/stdint.h \
/opt/microchip/xc8/v2.10/avr/avr/include/stdint.h \
/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/include/avr/iotn10.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/portpins.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/common.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/version.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/xmega.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/fuse.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/lock.h \
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay.h \
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay_basic.h \
/opt/microchip/xc8/v2.10/avr/avr/include/math.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/interrupt.h
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/xc.h:
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/cci.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/io.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/sfr_defs.h:
/opt/microchip/xc8/v2.10/avr/avr/include/inttypes.h:
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/stdint.h:
/opt/microchip/xc8/v2.10/avr/avr/include/stdint.h:
/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/include/avr/iotn10.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/portpins.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/common.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/version.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/xmega.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/fuse.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/lock.h:
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay.h:
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay_basic.h:
/opt/microchip/xc8/v2.10/avr/avr/include/math.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/interrupt.h:

+ 17
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/dist/default/production/memoryfile.xml View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<executable name="dist/default/production/tests5_timer_6000hz.X.production.elf">
<memory name="program">
<units>bytes</units>
<length>1024</length>
<used>106</used>
<free>918</free>
</memory>
<memory name="data">
<units>bytes</units>
<length>32</length>
<used>0</used>
<free>32</free>
</memory>
</executable>
</project>

BIN
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/dist/default/production/tests5_timer_6000hz.X.production.elf View File


+ 10
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/dist/default/production/tests5_timer_6000hz.X.production.hex View File

@ -0,0 +1,10 @@
:100000000AC032C031C030C02FC020C02DC02CC0AB
:100010002BC02AC029C011271FBFCFE5D0E0DEBF0B
:0A002000CDBF03D000C0F894FFCF5D
:10002A004EB542604EBD4DB541604DBD47EA50E008
:10003A0057BD46BD4BB542604BBD44E041B97894CB
:02004A00FFCFE6
:10004C001F930F930FB70F9310E04F9344E040B9F9
:0C005C004F910F910FBF0F911F9118954D
:02006800CBCFFC
:00000001FF

+ 400
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/dist/default/production/tests5_timer_6000hz.X.production.map View File

@ -0,0 +1,400 @@
Archive member included to satisfy reference by file (symbol)
/opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o (exit)
Discarded input sections
.data 0x00000000 0x0 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.bss 0x00000000 0x0 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.text 0x00000000 0x0 build/default/production/main.o
.data 0x00000000 0x0 build/default/production/main.o
.bss 0x00000000 0x0 build/default/production/main.o
.text 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.data 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.bss 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.mul
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.div
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.prologue
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.builtins
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.fmul
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.fixed
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
Memory Configuration
Name Origin Length Attributes
text 0x00000000 0x00000400 xr
data 0x00800040 0x00000020 rw !x
config 0x00820000 0x00000001 rw !x
lock 0x00830000 0x00000002 rw !x
signature 0x00840000 0x00000004 rw !x
*default* 0x00000000 0xffffffff
Linker script and memory map
0x00004000 __RODATA_PM_OFFSET__ = 0x4000
LOAD /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x00000001 __MPLAB_BUILD = 0x1
LOAD build/default/production/main.o
START GROUP
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avrtiny/libm.a
END GROUP
START GROUP
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avrtiny/libm.a
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avrtiny/libc.a
LOAD /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/libattiny10.a
END GROUP
0x00000000 __TEXT_REGION_ORIGIN__ = DEFINED (__TEXT_REGION_ORIGIN__)?__TEXT_REGION_ORIGIN__:0x0
[0x00800040] __DATA_REGION_ORIGIN__ = DEFINED (__DATA_REGION_ORIGIN__)?__DATA_REGION_ORIGIN__:0x800040
[0x00000400] __TEXT_REGION_LENGTH__ = DEFINED (__TEXT_REGION_LENGTH__)?__TEXT_REGION_LENGTH__:0x1000
[0x00000020] __DATA_REGION_LENGTH__ = DEFINED (__DATA_REGION_LENGTH__)?__DATA_REGION_LENGTH__:0x100
[0x00000001] __FUSE_REGION_LENGTH__ = DEFINED (__FUSE_REGION_LENGTH__)?__FUSE_REGION_LENGTH__:0x2
0x00000002 __LOCK_REGION_LENGTH__ = DEFINED (__LOCK_REGION_LENGTH__)?__LOCK_REGION_LENGTH__:0x2
0x00000004 __SIGNATURE_REGION_LENGTH__ = DEFINED (__SIGNATURE_REGION_LENGTH__)?__SIGNATURE_REGION_LENGTH__:0x4
0x00004000 __RODATA_PM_OFFSET__ = DEFINED (__RODATA_PM_OFFSET__)?__RODATA_PM_OFFSET__:0x4000
.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 0x00000000 0x2a
*(.vectors)
.vectors 0x00000000 0x16 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x00000000 __vectors
0x00000000 __vector_default
*(.vectors)
*(.progmem.gcc*)
*(.dinit)
.dinit 0x00000016 0x0 data_init
0x00000016 . = ALIGN (0x2)
0x00000016 __trampolines_start = .
*(.trampolines)
.trampolines 0x00000016 0x0 linker stubs
*(.trampolines*)
0x00000016 __trampolines_end = .
*libprintf_flt.a:*(.progmem.data)
*libc.a:*(.progmem.data)
0x00000016 . = ALIGN (0x2)
*(.jumptables)
*(.jumptables*)
*(.lowtext)
*(.lowtext*)
0x00000016 __ctors_start = .
*(.ctors)
0x00000016 __ctors_end = .
0x00000016 __dtors_start = .
*(.dtors)
0x00000016 __dtors_end = .
SORT(*)(.ctors)
SORT(*)(.dtors)
*(.init0)
.init0 0x00000016 0x0 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x00000016 __init
*(.init0)
*(.init1)
*(.init1)
*(.init2)
.init2 0x00000016 0xc /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
*(.init2)
*(.init3)
*(.init3)
*(.init4)
*(.init4)
*(.init5)
*(.init5)
*(.init6)
*(.init6)
*(.init7)
*(.init7)
*(.init8)
*(.init8)
*(.init9)
.init9 0x00000022 0x4 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
*(.init9)
0x00000026 . = ALIGN (0x2)
*(.fini9)
.fini9 0x00000026 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
0x00000026 exit
0x00000026 _exit
*(.fini9)
*(.fini8)
*(.fini8)
*(.fini7)
*(.fini7)
*(.fini6)
*(.fini6)
*(.fini5)
*(.fini5)
*(.fini4)
*(.fini4)
*(.fini3)
*(.fini3)
*(.fini2)
*(.fini2)
*(.fini1)
*(.fini1)
*(.fini0)
.fini0 0x00000026 0x4 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
*(.fini0)
0x0000002a _etext = .
.rodata
*(.rodata)
*(.rodata*)
*(.gnu.linkonce.r*)
.data 0x00800040 0x0 load address 0x0000002a
[!provide] PROVIDE (__data_start, .)
*(.gnu.linkonce.d*)
0x00800040 . = ALIGN (0x2)
0x00800040 _edata = .
[!provide] PROVIDE (__data_end, .)
.bss 0x00800040 0x0
[!provide] PROVIDE (__bss_start, .)
*(COMMON)
[!provide] PROVIDE (__bss_end, .)
0x0000002a __data_load_start = LOADADDR (.data)
0x0000002a __data_load_end = (__data_load_start + SIZEOF (.data))
.noinit 0x00800040 0x0
[!provide] PROVIDE (__noinit_start, .)
*(.noinit*)
[!provide] PROVIDE (__noinit_end, .)
0x00800040 _end = .
.lock
*(.lock*)
.signature
*(.signature*)
.config
*(.fuse)
*(.lfuse)
*(.hfuse)
*(.efuse)
*(.config*)
.stab
*(.stab)
.stabstr
*(.stabstr)
.stab.excl
*(.stab.excl)
.stab.exclstr
*(.stab.exclstr)
.stab.index
*(.stab.index)
.stab.indexstr
*(.stab.indexstr)
.comment 0x00000000 0x2f
*(.comment)
.comment 0x00000000 0x2f build/default/production/main.o
0x30 (size before relaxing)
.note.gnu.build-id
*(.note.gnu.build-id)
.debug
*(.debug)
.line
*(.line)
.debug_srcinfo
*(.debug_srcinfo)
.debug_sfnames
*(.debug_sfnames)
.debug_aranges 0x00000000 0x28
*(.debug_aranges)
.debug_aranges
0x00000000 0x28 build/default/production/main.o
.debug_pubnames
*(.debug_pubnames)
.debug_info 0x00000000 0x568
*(.debug_info .gnu.linkonce.wi.*)
.debug_info 0x00000000 0x305 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_info 0x00000305 0x263 build/default/production/main.o
.debug_abbrev 0x00000000 0x33c
*(.debug_abbrev)
.debug_abbrev 0x00000000 0x2d9 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_abbrev 0x000002d9 0x63 build/default/production/main.o
.debug_line 0x00000000 0x182
*(.debug_line .debug_line.* .debug_line_end)
.debug_line 0x00000000 0xd9 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_line 0x000000d9 0xa9 build/default/production/main.o
.debug_frame 0x00000000 0x44
*(.debug_frame)
.debug_frame 0x00000000 0x44 build/default/production/main.o
.debug_str 0x00000000 0x115
*(.debug_str)
.debug_str 0x00000000 0x115 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_str 0x00000115 0x0 build/default/production/main.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 0x00000000 0x18
*(.debug_ranges)
.debug_ranges 0x00000000 0x18 build/default/production/main.o
.debug_macro
*(.debug_macro)
OUTPUT(dist/default/production/tests5_timer_6000hz.X.production.elf elf32-avr)
LOAD linker stubs
LOAD data_init
.note.gnu.avr.deviceinfo
0x00000000 0x3c
.note.gnu.avr.deviceinfo
0x00000000 0x3c /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.text.main 0x0000002a 0x22
.text.main 0x0000002a 0x22 build/default/production/main.o
0x0000002a main
.text.__vector_5
0x0000004c 0x1c
.text.__vector_5
0x0000004c 0x1c build/default/production/main.o
0x0000004c __vector_5
.text 0x00000068 0x2
.text 0x00000068 0x2 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x00000068 __vector_1
0x00000068 __bad_interrupt
0x00000068 __vector_6
0x00000068 __vector_3
0x00000068 __vector_7
0x00000068 __vector_4
0x00000068 __vector_9
0x00000068 __vector_2
0x00000068 __vector_8
0x00000068 __vector_10

+ 83
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/main.c View File

@ -0,0 +1,83 @@
#include <xc.h>
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
//#include <avr/sleep.h>
//#include <util/atomic.h>
//#include <avr/wdt.h>
//tests5 tested and works (though 950Hz). unplug cable to programmer to see pin 4 active.
//reference: https://www.avrfreaks.net/forum/sample-project-attiny10
//https://blog.podkalicki.com/attiny13-blinky-with-timer-compa/
//watchdog is too slow and inaccurate to get 6000Hz
ISR(TIM0_COMPA_vect)
{
// Toggle PB2 Hi/Low depending on current state
PINB = 1<<2;
//PORTB ^= _BV(LED_PIN); // toggle LED pin
}
/*
Delay in powerdown mode. Wake up by watchdog interrupt.
* //NOTE: see earlier code, e.g. tests3 in attiny10 elec projects 2020
*/
/*
void delay_power_down_wdt(uint8_t wdto)
{
wdt_reset();
wdt_enable(wdto);
WDTCSR |= (1<<WDIE);
//so far (with 128Khz clk) this sleep will be about 30-40 seconds.
//(however, I'll add the below to)
//adjust sleep speed here:
// 0110 is 1hz at 128KHz
//WDTCSR |= (0<< WDP3);
//WDTCSR |= (1<< WDP2);
//WDTCSR |= (1<< WDP1);
//WDTCSR |= (0<< WDP0);
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
// Make sure interrups are enabled and the I flag is restored
NONATOMIC_BLOCK(NONATOMIC_RESTORESTATE)
{
sleep_cpu();
wdt_disable();
}
sleep_disable();
}
*/
int main(void)
{
//Write CCP (to enable changing clock)
//CCP = 0xD8;
//change CLK to 128KHz
//CLKMSR = 0b01;
TCCR0A |= _BV(WGM01); // set timer counter mode to CTC
// TCCR0B |= _BV(CS02)|_BV(CS00); // set prescaler to 1024 (CLK=1200000Hz/1024/256=4.57Hz, 0.22s)
TCCR0B |= _BV(CS00); // set prescaler to 1 (CLK=1MHz/1)
OCR0A = 167; // with one timer, ever 166.667hz we want to count once (3000hz)
TIMSK0 |= _BV(OCIE0A); // enable Timer CTC interrupt
// PB2 change to output
DDRB = 1<<2;
sei();
while(1)
{
//handled by interrupt
}
}

+ 158
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Makefile-default.mk View File

@ -0,0 +1,158 @@
#
# 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=dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
else
IMAGE_TYPE=production
OUTPUT_SUFFIX=hex
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.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
# Object Files Quoted if spaced
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.o
POSSIBLE_DEPFILES=${OBJECTDIR}/main.o.d
# Object Files
OBJECTFILES=${OBJECTDIR}/main.o
# Source Files
SOURCEFILES=main.c
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 dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
MP_PROCESSOR_OPTION=ATtiny10
# ------------------------------------------------------------------------------------
# Rules for buildStep: compile
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${OBJECTDIR}/main.o: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/main.o.d
@${RM} ${OBJECTDIR}/main.o
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -g -DDEBUG -gdwarf-2 -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c
else
${OBJECTDIR}/main.o: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/main.o.d
@${RM} ${OBJECTDIR}/main.o
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c
endif
# ------------------------------------------------------------------------------------
# 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: link
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.map -D__DEBUG=1 -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -gdwarf-2 -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -gdwarf-3 $(COMPARISON_BUILD) -Wl,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -o dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -o dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1
@${RM} dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.hex
else
dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.map -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -gdwarf-3 $(COMPARISON_BUILD) -Wl,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -o dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -o dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--start-group -Wl,-lm -Wl,--end-group
${MP_CC_DIR}/avr-objcopy -O ihex "dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}" "dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.hex"
endif
# Subprojects
.build-subprojects:
# Subprojects
.clean-subprojects:
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r build/default
${RM} -r dist/default
# Enable dependency checking
.dep.inc: .depcheck-impl
DEPFILES=$(shell "${PATH_TO_IDE_BIN}"mplabwildcard ${POSSIBLE_DEPFILES})
ifneq (${DEPFILES},)
include ${DEPFILES}
endif

+ 10
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Makefile-genesis.properties View File

@ -0,0 +1,10 @@
#
#Wed Jul 15 00:23:03 EDT 2020
default.Pack.dfplocation=/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10
default.languagetoolchain.dir=/opt/microchip/xc8/v2.10/bin
configurations-xml=5e854234238a55dafe0eba84ce6d1401
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e453b0cf7f7da72a932cfdb2f655401
default.languagetoolchain.version=2.10
host.platform=linux
conf.ids=default
default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=23d12c447ed4f9462f01e2202bc2f36a

+ 69
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Makefile-impl.mk View File

@ -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=tests5_timer_6000hz.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

+ 36
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Makefile-local-default.mk View File

@ -0,0 +1,36 @@
#
# 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/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/
# Adding MPLAB X bin directory to path.
PATH:=/opt/microchip/mplabx/v5.25/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/v5.25/sys/java/jre1.8.0_181/bin/"
OS_CURRENT="$(shell uname -s)"
MP_CC="/opt/microchip/xc8/v2.10/bin/xc8-cc"
# MP_CPPC is not defined
# MP_BC is not defined
MP_AS="/opt/microchip/xc8/v2.10/bin/xc8-cc"
MP_LD="/opt/microchip/xc8/v2.10/bin/xc8-cc"
MP_AR="/opt/microchip/xc8/v2.10/bin/xc8-ar"
DEP_GEN=${MP_JAVA_PATH}java -jar "/opt/microchip/mplabx/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
MP_CC_DIR="/opt/microchip/xc8/v2.10/bin"
# MP_CPPC_DIR is not defined
# MP_BC_DIR is not defined
MP_AS_DIR="/opt/microchip/xc8/v2.10/bin"
MP_LD_DIR="/opt/microchip/xc8/v2.10/bin"
MP_AR_DIR="/opt/microchip/xc8/v2.10/bin"
# MP_BC_DIR is not defined

+ 13
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Makefile-variables.mk View File

@ -0,0 +1,13 @@
#
# Generated - do not edit!
#
# NOCDDL
#
CND_BASEDIR=`pwd`
# default configuration
CND_ARTIFACT_DIR_default=dist/default/production
CND_ARTIFACT_NAME_default=tests5_timer_6000hz.X.production.hex
CND_ARTIFACT_PATH_default=dist/default/production/tests5_timer_6000hz.X.production.hex
CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package
CND_PACKAGE_NAME_default=tests5timer6000hz.x.tar
CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/tests5timer6000hz.x.tar

+ 73
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/Package-default.bash View File

@ -0,0 +1,73 @@
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_CONF=default
CND_DISTDIR=dist
TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/tests5_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
OUTPUT_BASENAME=tests5_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
PACKAGE_TOP_DIR=tests5timer6000hz.x/
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
# Setup
cd "${TOP}"
mkdir -p ${CND_DISTDIR}/${CND_CONF}/package
rm -rf ${TMPDIR}
mkdir -p ${TMPDIR}
# Copy files and create directories and links
cd "${TOP}"
makeDirectory ${TMPDIR}/tests5timer6000hz.x/bin
copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
# Generate tar file
cd "${TOP}"
rm -f ${CND_DISTDIR}/${CND_CONF}/package/tests5timer6000hz.x.tar
cd ${TMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/tests5timer6000hz.x.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${TMPDIR}

+ 160
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/configurations.xml View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="65">
<logicalFolder name="root" displayName="root" projectFiles="true">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="LinkerScript"
displayName="Linker Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>main.c</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="default" type="2">
<toolsSet>
<developmentServer>localhost</developmentServer>
<targetDevice>ATtiny10</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool></platformTool>
<languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>2.10</languageToolchainVersion>
<platform>2</platform>
</toolsSet>
<packs>
<pack name="ATtiny_DFP" vendor="Microchip" version="2.0.10"/>
</packs>
<compileType>
<linkerTool>
<linkerLibItems>
</linkerLibItems>
</linkerTool>
<archiverTool>
</archiverTool>
<loading>
<useAlternateLoadableFile>false</useAlternateLoadableFile>
<parseOnProdLoad>false</parseOnProdLoad>
<alternateLoadableFile></alternateLoadableFile>
</loading>
<subordinates>
</subordinates>
</compileType>
<makeCustomizationType>
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
<makeCustomizationPreStep></makeCustomizationPreStep>
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
<makeCustomizationPostStep></makeCustomizationPostStep>
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
</makeCustomizationType>
<HI-TECH-COMP>
<property key="additional-warnings" value="true"/>
<property key="asmlist" value="true"/>
<property key="default-bitfield-type" value="true"/>
<property key="default-char-type" value="true"/>
<property key="define-macros" value=""/>
<property key="disable-optimizations" value="false"/>
<property key="extra-include-directories" value=""/>
<property key="favor-optimization-for" value="-speed,+space"/>
<property key="garbage-collect-data" value="true"/>
<property key="garbage-collect-functions" value="true"/>
<property key="identifier-length" value="255"/>
<property key="local-generation" value="false"/>
<property key="operation-mode" value="free"/>
<property key="opt-xc8-compiler-strict_ansi" value="false"/>
<property key="optimization-assembler" value="true"/>
<property key="optimization-assembler-files" value="true"/>
<property key="optimization-debug" value="false"/>
<property key="optimization-invariant-enable" value="false"/>
<property key="optimization-invariant-value" value="16"/>
<property key="optimization-level" value="-O1"/>
<property key="optimization-speed" value="false"/>
<property key="optimization-stable-enable" value="false"/>
<property key="pack-struct" value="true"/>
<property key="preprocess-assembler" value="true"/>
<property key="short-enums" value="true"/>
<property key="undefine-macros" value=""/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
<property key="verbose" value="false"/>
<property key="warning-level" value="-3"/>
<property key="what-to-do" value="ignore"/>
</HI-TECH-COMP>
<HI-TECH-LINK>
<property key="additional-options-checksum" value=""/>
<property key="additional-options-code-offset" value=""/>
<property key="additional-options-command-line" value=""/>
<property key="additional-options-errata" value=""/>
<property key="additional-options-extend-address" value="false"/>
<property key="additional-options-trace-type" value=""/>
<property key="additional-options-use-response-files" value="false"/>
<property key="backup-reset-condition-flags" value="false"/>
<property key="calibrate-oscillator" value="false"/>
<property key="calibrate-oscillator-value" value="0x3400"/>
<property key="clear-bss" value="true"/>
<property key="code-model-external" value="wordwrite"/>
<property key="code-model-rom" value=""/>
<property key="create-html-files" value="false"/>
<property key="data-model-ram" value=""/>
<property key="data-model-size-of-double" value="24"/>
<property key="data-model-size-of-double-gcc" value="no-short-double"/>
<property key="data-model-size-of-float" value="24"/>
<property key="data-model-size-of-float-gcc" value="no-short-float"/>
<property key="display-class-usage" value="false"/>
<property key="display-hex-usage" value="false"/>
<property key="display-overall-usage" value="true"/>
<property key="display-psect-usage" value="false"/>
<property key="extra-lib-directories" value=""/>
<property key="fill-flash-options-addr" value=""/>
<property key="fill-flash-options-const" value=""/>
<property key="fill-flash-options-how" value="0"/>
<property key="fill-flash-options-inc-const" value="1"/>
<property key="fill-flash-options-increment" value=""/>
<property key="fill-flash-options-seq" value=""/>
<property key="fill-flash-options-what" value="0"/>
<property key="format-hex-file-for-download" value="false"/>
<property key="initialize-data" value="true"/>
<property key="input-libraries" value="libm"/>
<property key="keep-generated-startup.as" value="false"/>
<property key="link-in-c-library" value="true"/>
<property key="link-in-c-library-gcc" value=""/>
<property key="link-in-peripheral-library" value="false"/>
<property key="managed-stack" value="false"/>
<property key="opt-xc8-linker-file" value="false"/>
<property key="opt-xc8-linker-link_startup" value="false"/>
<property key="opt-xc8-linker-serial" value=""/>
<property key="program-the-device-with-default-config-words" value="true"/>
<property key="remove-unused-sections" value="true"/>
</HI-TECH-LINK>
<XC8-CO>
<property key="coverage-enable" value=""/>
</XC8-CO>
<XC8-config-global>
<property key="advanced-elf" value="true"/>
<property key="gcc-opt-driver-new" value="true"/>
<property key="gcc-opt-std" value="-std=c99"/>
<property key="gcc-output-file-format" value="dwarf-3"/>
<property key="omit-pack-options" value="false"/>
<property key="output-file-format" value="-mcof,+elf"/>
<property key="stack-size-high" value="auto"/>
<property key="stack-size-low" value="auto"/>
<property key="stack-size-main" value="auto"/>
<property key="stack-type" value="compiled"/>
<property key="user-pack-device-support" value=""/>
</XC8-config-global>
</conf>
</confs>
</configurationDescriptor>

+ 25
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/private/configurations.xml View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="65">
<projectmakefile>Makefile</projectmakefile>
<defaultConf>0</defaultConf>
<confs>
<conf name="default" type="2">
<platformToolSN></platformToolSN>
<languageToolchainDir>/opt/microchip/xc8/v2.10/bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>
</mdbdebugger>
<runprofile version="6">
<args></args>
<rundir></rundir>
<buildfirst>true</buildfirst>
<console-type>0</console-type>
<terminal-type>0</terminal-type>
<remove-instrumentation>0</remove-instrumentation>
<environment>
</environment>
</runprofile>
</conf>
</confs>
</configurationDescriptor>

+ 7
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/private/private.xml View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
</open-files>
</project-private>

+ 33
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests5_timer_6000hz.X/nbproject/project.xml View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/make-project/1">
<name>tests5_timer_6000hz</name>
<name>tests4_timer_6000hz</name>
<name>tests3</name>
<name>tests2</name>
<name>tests1</name>
<name>test2</name>
<name>test1</name>
<creation-uuid>1f6b2f6c-8c6d-40dd-a737-d73d987b2bef</creation-uuid>
<make-project-type>0</make-project-type>
<c-extensions>c</c-extensions>
<cpp-extensions/>
<header-extensions/>
<asminc-extensions/>
<sourceEncoding>ISO-8859-1</sourceEncoding>
<make-dep-projects/>
<sourceRootList/>
<confList>
<confElem>
<name>default</name>
<type>2</type>
</confElem>
</confList>
<formatting>
<project-formatting-style>false</project-formatting-style>
</formatting>
</data>
</configuration>
</project>

+ 113
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/Makefile View File

@ -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

BIN
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/build/default/production/main.o View File


+ 55
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/build/default/production/main.o.d View File

@ -0,0 +1,55 @@
build/default/production/main.o.d build/default/production/main.o: main.c \
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/xc.h \
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/cci.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/io.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/sfr_defs.h \
/opt/microchip/xc8/v2.10/avr/avr/include/inttypes.h \
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/stdint.h \
/opt/microchip/xc8/v2.10/avr/avr/include/stdint.h \
/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/include/avr/iotn10.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/portpins.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/common.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/version.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/xmega.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/fuse.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/lock.h \
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay.h \
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay_basic.h \
/opt/microchip/xc8/v2.10/avr/avr/include/math.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/interrupt.h
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/xc.h:
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/cci.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/io.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/sfr_defs.h:
/opt/microchip/xc8/v2.10/avr/avr/include/inttypes.h:
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/stdint.h:
/opt/microchip/xc8/v2.10/avr/avr/include/stdint.h:
/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/include/avr/iotn10.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/portpins.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/common.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/version.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/xmega.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/fuse.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/lock.h:
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay.h:
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay_basic.h:
/opt/microchip/xc8/v2.10/avr/avr/include/math.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/interrupt.h:

+ 17
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/dist/default/production/memoryfile.xml View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<executable name="dist/default/production/tests6_timer_6000hz.X.production.elf">
<memory name="program">
<units>bytes</units>
<length>1024</length>
<used>124</used>
<free>900</free>
</memory>
<memory name="data">
<units>bytes</units>
<length>32</length>
<used>0</used>
<free>32</free>
</memory>
</executable>
</project>

BIN
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/dist/default/production/tests6_timer_6000hz.X.production.elf View File


+ 11
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/dist/default/production/tests6_timer_6000hz.X.production.hex View File

@ -0,0 +1,11 @@
:100000000AC03BC03AC039C038C026C036C035C06F
:1000100034C033C032C011271FBFCFE5D0E0DEBFF0
:0A002000CDBF03D000C0F894FFCF5D
:10002A0017BD16BD19BD18BD1EBD1DBD4EB542601A
:10003A004EBD4DB541604DBD44E650E057BD46BD8D
:0E004A004BB542604BBD44E041B97894FFCF06
:100058001F930F930FB70F9310E04F9344E040B9ED
:100068004AB542604ABD4F910F910FBF0F911F9142
:020078001895D9
:02007A00C2CFF3
:00000001FF

+ 400
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/dist/default/production/tests6_timer_6000hz.X.production.map View File

@ -0,0 +1,400 @@
Archive member included to satisfy reference by file (symbol)
/opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o (exit)
Discarded input sections
.data 0x00000000 0x0 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.bss 0x00000000 0x0 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.text 0x00000000 0x0 build/default/production/main.o
.data 0x00000000 0x0 build/default/production/main.o
.bss 0x00000000 0x0 build/default/production/main.o
.text 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.data 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.bss 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.mul
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.div
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.prologue
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.builtins
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.fmul
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.fixed
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
Memory Configuration
Name Origin Length Attributes
text 0x00000000 0x00000400 xr
data 0x00800040 0x00000020 rw !x
config 0x00820000 0x00000001 rw !x
lock 0x00830000 0x00000002 rw !x
signature 0x00840000 0x00000004 rw !x
*default* 0x00000000 0xffffffff
Linker script and memory map
0x00004000 __RODATA_PM_OFFSET__ = 0x4000
LOAD /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x00000001 __MPLAB_BUILD = 0x1
LOAD build/default/production/main.o
START GROUP
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avrtiny/libm.a
END GROUP
START GROUP
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avrtiny/libm.a
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avrtiny/libc.a
LOAD /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/libattiny10.a
END GROUP
0x00000000 __TEXT_REGION_ORIGIN__ = DEFINED (__TEXT_REGION_ORIGIN__)?__TEXT_REGION_ORIGIN__:0x0
[0x00800040] __DATA_REGION_ORIGIN__ = DEFINED (__DATA_REGION_ORIGIN__)?__DATA_REGION_ORIGIN__:0x800040
[0x00000400] __TEXT_REGION_LENGTH__ = DEFINED (__TEXT_REGION_LENGTH__)?__TEXT_REGION_LENGTH__:0x1000
[0x00000020] __DATA_REGION_LENGTH__ = DEFINED (__DATA_REGION_LENGTH__)?__DATA_REGION_LENGTH__:0x100
[0x00000001] __FUSE_REGION_LENGTH__ = DEFINED (__FUSE_REGION_LENGTH__)?__FUSE_REGION_LENGTH__:0x2
0x00000002 __LOCK_REGION_LENGTH__ = DEFINED (__LOCK_REGION_LENGTH__)?__LOCK_REGION_LENGTH__:0x2
0x00000004 __SIGNATURE_REGION_LENGTH__ = DEFINED (__SIGNATURE_REGION_LENGTH__)?__SIGNATURE_REGION_LENGTH__:0x4
0x00004000 __RODATA_PM_OFFSET__ = DEFINED (__RODATA_PM_OFFSET__)?__RODATA_PM_OFFSET__:0x4000
.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 0x00000000 0x2a
*(.vectors)
.vectors 0x00000000 0x16 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x00000000 __vectors
0x00000000 __vector_default
*(.vectors)
*(.progmem.gcc*)
*(.dinit)
.dinit 0x00000016 0x0 data_init
0x00000016 . = ALIGN (0x2)
0x00000016 __trampolines_start = .
*(.trampolines)
.trampolines 0x00000016 0x0 linker stubs
*(.trampolines*)
0x00000016 __trampolines_end = .
*libprintf_flt.a:*(.progmem.data)
*libc.a:*(.progmem.data)
0x00000016 . = ALIGN (0x2)
*(.jumptables)
*(.jumptables*)
*(.lowtext)
*(.lowtext*)
0x00000016 __ctors_start = .
*(.ctors)
0x00000016 __ctors_end = .
0x00000016 __dtors_start = .
*(.dtors)
0x00000016 __dtors_end = .
SORT(*)(.ctors)
SORT(*)(.dtors)
*(.init0)
.init0 0x00000016 0x0 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x00000016 __init
*(.init0)
*(.init1)
*(.init1)
*(.init2)
.init2 0x00000016 0xc /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
*(.init2)
*(.init3)
*(.init3)
*(.init4)
*(.init4)
*(.init5)
*(.init5)
*(.init6)
*(.init6)
*(.init7)
*(.init7)
*(.init8)
*(.init8)
*(.init9)
.init9 0x00000022 0x4 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
*(.init9)
0x00000026 . = ALIGN (0x2)
*(.fini9)
.fini9 0x00000026 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
0x00000026 exit
0x00000026 _exit
*(.fini9)
*(.fini8)
*(.fini8)
*(.fini7)
*(.fini7)
*(.fini6)
*(.fini6)
*(.fini5)
*(.fini5)
*(.fini4)
*(.fini4)
*(.fini3)
*(.fini3)
*(.fini2)
*(.fini2)
*(.fini1)
*(.fini1)
*(.fini0)
.fini0 0x00000026 0x4 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
*(.fini0)
0x0000002a _etext = .
.rodata
*(.rodata)
*(.rodata*)
*(.gnu.linkonce.r*)
.data 0x00800040 0x0 load address 0x0000002a
[!provide] PROVIDE (__data_start, .)
*(.gnu.linkonce.d*)
0x00800040 . = ALIGN (0x2)
0x00800040 _edata = .
[!provide] PROVIDE (__data_end, .)
.bss 0x00800040 0x0
[!provide] PROVIDE (__bss_start, .)
*(COMMON)
[!provide] PROVIDE (__bss_end, .)
0x0000002a __data_load_start = LOADADDR (.data)
0x0000002a __data_load_end = (__data_load_start + SIZEOF (.data))
.noinit 0x00800040 0x0
[!provide] PROVIDE (__noinit_start, .)
*(.noinit*)
[!provide] PROVIDE (__noinit_end, .)
0x00800040 _end = .
.lock
*(.lock*)
.signature
*(.signature*)
.config
*(.fuse)
*(.lfuse)
*(.hfuse)
*(.efuse)
*(.config*)
.stab
*(.stab)
.stabstr
*(.stabstr)
.stab.excl
*(.stab.excl)
.stab.exclstr
*(.stab.exclstr)
.stab.index
*(.stab.index)
.stab.indexstr
*(.stab.indexstr)
.comment 0x00000000 0x2f
*(.comment)
.comment 0x00000000 0x2f build/default/production/main.o
0x30 (size before relaxing)
.note.gnu.build-id
*(.note.gnu.build-id)
.debug
*(.debug)
.line
*(.line)
.debug_srcinfo
*(.debug_srcinfo)
.debug_sfnames
*(.debug_sfnames)
.debug_aranges 0x00000000 0x28
*(.debug_aranges)
.debug_aranges
0x00000000 0x28 build/default/production/main.o
.debug_pubnames
*(.debug_pubnames)
.debug_info 0x00000000 0x568
*(.debug_info .gnu.linkonce.wi.*)
.debug_info 0x00000000 0x305 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_info 0x00000305 0x263 build/default/production/main.o
.debug_abbrev 0x00000000 0x33c
*(.debug_abbrev)
.debug_abbrev 0x00000000 0x2d9 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_abbrev 0x000002d9 0x63 build/default/production/main.o
.debug_line 0x00000000 0x1a0
*(.debug_line .debug_line.* .debug_line_end)
.debug_line 0x00000000 0xd9 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_line 0x000000d9 0xc7 build/default/production/main.o
.debug_frame 0x00000000 0x44
*(.debug_frame)
.debug_frame 0x00000000 0x44 build/default/production/main.o
.debug_str 0x00000000 0x115
*(.debug_str)
.debug_str 0x00000000 0x115 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_str 0x00000115 0x0 build/default/production/main.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 0x00000000 0x18
*(.debug_ranges)
.debug_ranges 0x00000000 0x18 build/default/production/main.o
.debug_macro
*(.debug_macro)
OUTPUT(dist/default/production/tests6_timer_6000hz.X.production.elf elf32-avr)
LOAD linker stubs
LOAD data_init
.note.gnu.avr.deviceinfo
0x00000000 0x3c
.note.gnu.avr.deviceinfo
0x00000000 0x3c /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.text.main 0x0000002a 0x2e
.text.main 0x0000002a 0x2e build/default/production/main.o
0x0000002a main
.text.__vector_5
0x00000058 0x22
.text.__vector_5
0x00000058 0x22 build/default/production/main.o
0x00000058 __vector_5
.text 0x0000007a 0x2
.text 0x0000007a 0x2 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x0000007a __vector_1
0x0000007a __bad_interrupt
0x0000007a __vector_6
0x0000007a __vector_3
0x0000007a __vector_7
0x0000007a __vector_4
0x0000007a __vector_9
0x0000007a __vector_2
0x0000007a __vector_8
0x0000007a __vector_10

+ 135
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/main.c View File

@ -0,0 +1,135 @@
#include <xc.h>
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
//#include <avr/sleep.h>
//#include <util/atomic.h>
//#include <avr/wdt.h>
//tests5 tested and works (at ~950hz). unplug cable to programmer to see pin 4 active.
//however...
//tests6 DEADEND
//never worked right. giving up and using delay.
//reference: https://www.avrfreaks.net/forum/sample-project-attiny10
//https://blog.podkalicki.com/attiny13-blinky-with-timer-compa/
//watchdog is too slow and inaccurate to get 6000Hz
ISR(TIM0_COMPA_vect)
{
// Toggle PB2 Hi/Low depending on current state
PINB = 1<<2;
TIFR0 |= 1<<OCF0A; //clear flag (is this required here? documentation unclear)
//PORTB ^= _BV(LED_PIN); // toggle LED pin
}
/*
Delay in powerdown mode. Wake up by watchdog interrupt.
* //NOTE: see earlier code, e.g. tests3 in attiny10 elec projects 2020
*/
/*
void delay_power_down_wdt(uint8_t wdto)
{
wdt_reset();
wdt_enable(wdto);
WDTCSR |= (1<<WDIE);
//so far (with 128Khz clk) this sleep will be about 30-40 seconds.
//(however, I'll add the below to)
//adjust sleep speed here:
// 0110 is 1hz at 128KHz
//WDTCSR |= (0<< WDP3);
//WDTCSR |= (1<< WDP2);
//WDTCSR |= (1<< WDP1);
//WDTCSR |= (0<< WDP0);
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
// Make sure interrups are enabled and the I flag is restored
NONATOMIC_BLOCK(NONATOMIC_RESTORESTATE)
{
sleep_cpu();
wdt_disable();
}
sleep_disable();
}
*/
int main(void)
{
OCR0A = 0;
TCNT0 = 0;
TCCR0A = 0;
TCCR0B = 0;
TCCR0A |= _BV(WGM01); // set timer counter mode to CTC
// TCCR0B |= _BV(CS02)|_BV(CS00); // set prescaler to 1024 (CLK=1200000Hz/1024/256=4.57Hz, 0.22s)
TCCR0B |= _BV(CS00); // set prescaler to 1 (CLK=1MHz/1)
//OCR0A is 16 bits. in ASM it must be loaded separately.
//in C, it can be loaded > 256? (test)
//520 about 950hz, 25us wide pulse
//OCR0A = 520; // with one timer, ever 166.667hz we want to count once (3000hz)
//OCR0A = 1; //475hz
//this goes to 475hz (pulses). doesn't make sense.
//// OCR0AH = 0xFF; //
//// OCR0AL = 0xFF;
//attiny10 output compare broken apparently
//this still 960hz, with 100us or so pulse size (high is 100us, low is longer)
//OCR0A = 100;
//inline asm to load values into 16 bit register
//; variables
//; For 1 Hz output, the timer delay has to be 1/2 second (1/2 second on / 1/2 second off)
//; delay = OCR0A * 1024 * 8 / 8000000
//; for 1/2 second, OCR0A = 488 (0x01E8)
//.EQU OCR0AHigh = 0x01
//.EQU OCR0ALow = 0xe8
// in bash type: printf "%x\n" 488
//.EQU OCR0AHigh = 0x02
//.EQU OCR0ALow = 0x08
// ldi r17, OCR0AHigh //; Sets the output compare register value
//ldi r16, OCR0ALow
//this asm doesn't work (why?) //perhaps OCR0A is really just 8 bits on attiny10...?)
////// asm volatile(
////// "ldi r17, 0x02"
////// "ldi r16, 0x08"
////// "out OCR0AH, r17"
////// "out OCR0AL, r16"
////// );
//this asm works
// asm volatile("nop\n\t"
//"nop\n\t"
//"nop\n\t"
//"nop\n\t"
//::);
TIMSK0 |= _BV(OCIE0A); // enable Timer CTC interrupt
// PB2 change to output
DDRB = 1<<2;
sei();
while(1)
{
//handled by interrupt
}
}

+ 158
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Makefile-default.mk View File

@ -0,0 +1,158 @@
#
# 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=dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
else
IMAGE_TYPE=production
OUTPUT_SUFFIX=hex
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.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
# Object Files Quoted if spaced
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.o
POSSIBLE_DEPFILES=${OBJECTDIR}/main.o.d
# Object Files
OBJECTFILES=${OBJECTDIR}/main.o
# Source Files
SOURCEFILES=main.c
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 dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
MP_PROCESSOR_OPTION=ATtiny10
# ------------------------------------------------------------------------------------
# Rules for buildStep: compile
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${OBJECTDIR}/main.o: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/main.o.d
@${RM} ${OBJECTDIR}/main.o
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -g -DDEBUG -gdwarf-2 -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c
else
${OBJECTDIR}/main.o: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/main.o.d
@${RM} ${OBJECTDIR}/main.o
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c
endif
# ------------------------------------------------------------------------------------
# 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: link
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.map -D__DEBUG=1 -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -gdwarf-2 -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -gdwarf-3 $(COMPARISON_BUILD) -Wl,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -o dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -o dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1
@${RM} dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.hex
else
dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.map -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -gdwarf-3 $(COMPARISON_BUILD) -Wl,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -o dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -o dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--start-group -Wl,-lm -Wl,--end-group
${MP_CC_DIR}/avr-objcopy -O ihex "dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}" "dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.hex"
endif
# Subprojects
.build-subprojects:
# Subprojects
.clean-subprojects:
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r build/default
${RM} -r dist/default
# Enable dependency checking
.dep.inc: .depcheck-impl
DEPFILES=$(shell "${PATH_TO_IDE_BIN}"mplabwildcard ${POSSIBLE_DEPFILES})
ifneq (${DEPFILES},)
include ${DEPFILES}
endif

+ 10
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Makefile-genesis.properties View File

@ -0,0 +1,10 @@
#
#Wed Jul 15 00:53:34 EDT 2020
default.Pack.dfplocation=/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10
default.languagetoolchain.dir=/opt/microchip/xc8/v2.10/bin
configurations-xml=5e854234238a55dafe0eba84ce6d1401
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e453b0cf7f7da72a932cfdb2f655401
default.languagetoolchain.version=2.10
host.platform=linux
conf.ids=default
default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=23d12c447ed4f9462f01e2202bc2f36a

+ 69
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Makefile-impl.mk View File

@ -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=tests6_timer_6000hz.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

+ 36
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Makefile-local-default.mk View File

@ -0,0 +1,36 @@
#
# 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/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/
# Adding MPLAB X bin directory to path.
PATH:=/opt/microchip/mplabx/v5.25/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/v5.25/sys/java/jre1.8.0_181/bin/"
OS_CURRENT="$(shell uname -s)"
MP_CC="/opt/microchip/xc8/v2.10/bin/xc8-cc"
# MP_CPPC is not defined
# MP_BC is not defined
MP_AS="/opt/microchip/xc8/v2.10/bin/xc8-cc"
MP_LD="/opt/microchip/xc8/v2.10/bin/xc8-cc"
MP_AR="/opt/microchip/xc8/v2.10/bin/xc8-ar"
DEP_GEN=${MP_JAVA_PATH}java -jar "/opt/microchip/mplabx/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
MP_CC_DIR="/opt/microchip/xc8/v2.10/bin"
# MP_CPPC_DIR is not defined
# MP_BC_DIR is not defined
MP_AS_DIR="/opt/microchip/xc8/v2.10/bin"
MP_LD_DIR="/opt/microchip/xc8/v2.10/bin"
MP_AR_DIR="/opt/microchip/xc8/v2.10/bin"
# MP_BC_DIR is not defined

+ 13
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Makefile-variables.mk View File

@ -0,0 +1,13 @@
#
# Generated - do not edit!
#
# NOCDDL
#
CND_BASEDIR=`pwd`
# default configuration
CND_ARTIFACT_DIR_default=dist/default/production
CND_ARTIFACT_NAME_default=tests6_timer_6000hz.X.production.hex
CND_ARTIFACT_PATH_default=dist/default/production/tests6_timer_6000hz.X.production.hex
CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package
CND_PACKAGE_NAME_default=tests6timer6000hz.x.tar
CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/tests6timer6000hz.x.tar

+ 73
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/Package-default.bash View File

@ -0,0 +1,73 @@
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_CONF=default
CND_DISTDIR=dist
TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/tests6_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
OUTPUT_BASENAME=tests6_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
PACKAGE_TOP_DIR=tests6timer6000hz.x/
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
# Setup
cd "${TOP}"
mkdir -p ${CND_DISTDIR}/${CND_CONF}/package
rm -rf ${TMPDIR}
mkdir -p ${TMPDIR}
# Copy files and create directories and links
cd "${TOP}"
makeDirectory ${TMPDIR}/tests6timer6000hz.x/bin
copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
# Generate tar file
cd "${TOP}"
rm -f ${CND_DISTDIR}/${CND_CONF}/package/tests6timer6000hz.x.tar
cd ${TMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/tests6timer6000hz.x.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${TMPDIR}

+ 160
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/configurations.xml View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="65">
<logicalFolder name="root" displayName="root" projectFiles="true">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="LinkerScript"
displayName="Linker Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>main.c</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="default" type="2">
<toolsSet>
<developmentServer>localhost</developmentServer>
<targetDevice>ATtiny10</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool></platformTool>
<languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>2.10</languageToolchainVersion>
<platform>2</platform>
</toolsSet>
<packs>
<pack name="ATtiny_DFP" vendor="Microchip" version="2.0.10"/>
</packs>
<compileType>
<linkerTool>
<linkerLibItems>
</linkerLibItems>
</linkerTool>
<archiverTool>
</archiverTool>
<loading>
<useAlternateLoadableFile>false</useAlternateLoadableFile>
<parseOnProdLoad>false</parseOnProdLoad>
<alternateLoadableFile></alternateLoadableFile>
</loading>
<subordinates>
</subordinates>
</compileType>
<makeCustomizationType>
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
<makeCustomizationPreStep></makeCustomizationPreStep>
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
<makeCustomizationPostStep></makeCustomizationPostStep>
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
</makeCustomizationType>
<HI-TECH-COMP>
<property key="additional-warnings" value="true"/>
<property key="asmlist" value="true"/>
<property key="default-bitfield-type" value="true"/>
<property key="default-char-type" value="true"/>
<property key="define-macros" value=""/>
<property key="disable-optimizations" value="false"/>
<property key="extra-include-directories" value=""/>
<property key="favor-optimization-for" value="-speed,+space"/>
<property key="garbage-collect-data" value="true"/>
<property key="garbage-collect-functions" value="true"/>
<property key="identifier-length" value="255"/>
<property key="local-generation" value="false"/>
<property key="operation-mode" value="free"/>
<property key="opt-xc8-compiler-strict_ansi" value="false"/>
<property key="optimization-assembler" value="true"/>
<property key="optimization-assembler-files" value="true"/>
<property key="optimization-debug" value="false"/>
<property key="optimization-invariant-enable" value="false"/>
<property key="optimization-invariant-value" value="16"/>
<property key="optimization-level" value="-O1"/>
<property key="optimization-speed" value="false"/>
<property key="optimization-stable-enable" value="false"/>
<property key="pack-struct" value="true"/>
<property key="preprocess-assembler" value="true"/>
<property key="short-enums" value="true"/>
<property key="undefine-macros" value=""/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
<property key="verbose" value="false"/>
<property key="warning-level" value="-3"/>
<property key="what-to-do" value="ignore"/>
</HI-TECH-COMP>
<HI-TECH-LINK>
<property key="additional-options-checksum" value=""/>
<property key="additional-options-code-offset" value=""/>
<property key="additional-options-command-line" value=""/>
<property key="additional-options-errata" value=""/>
<property key="additional-options-extend-address" value="false"/>
<property key="additional-options-trace-type" value=""/>
<property key="additional-options-use-response-files" value="false"/>
<property key="backup-reset-condition-flags" value="false"/>
<property key="calibrate-oscillator" value="false"/>
<property key="calibrate-oscillator-value" value="0x3400"/>
<property key="clear-bss" value="true"/>
<property key="code-model-external" value="wordwrite"/>
<property key="code-model-rom" value=""/>
<property key="create-html-files" value="false"/>
<property key="data-model-ram" value=""/>
<property key="data-model-size-of-double" value="24"/>
<property key="data-model-size-of-double-gcc" value="no-short-double"/>
<property key="data-model-size-of-float" value="24"/>
<property key="data-model-size-of-float-gcc" value="no-short-float"/>
<property key="display-class-usage" value="false"/>
<property key="display-hex-usage" value="false"/>
<property key="display-overall-usage" value="true"/>
<property key="display-psect-usage" value="false"/>
<property key="extra-lib-directories" value=""/>
<property key="fill-flash-options-addr" value=""/>
<property key="fill-flash-options-const" value=""/>
<property key="fill-flash-options-how" value="0"/>
<property key="fill-flash-options-inc-const" value="1"/>
<property key="fill-flash-options-increment" value=""/>
<property key="fill-flash-options-seq" value=""/>
<property key="fill-flash-options-what" value="0"/>
<property key="format-hex-file-for-download" value="false"/>
<property key="initialize-data" value="true"/>
<property key="input-libraries" value="libm"/>
<property key="keep-generated-startup.as" value="false"/>
<property key="link-in-c-library" value="true"/>
<property key="link-in-c-library-gcc" value=""/>
<property key="link-in-peripheral-library" value="false"/>
<property key="managed-stack" value="false"/>
<property key="opt-xc8-linker-file" value="false"/>
<property key="opt-xc8-linker-link_startup" value="false"/>
<property key="opt-xc8-linker-serial" value=""/>
<property key="program-the-device-with-default-config-words" value="true"/>
<property key="remove-unused-sections" value="true"/>
</HI-TECH-LINK>
<XC8-CO>
<property key="coverage-enable" value=""/>
</XC8-CO>
<XC8-config-global>
<property key="advanced-elf" value="true"/>
<property key="gcc-opt-driver-new" value="true"/>
<property key="gcc-opt-std" value="-std=c99"/>
<property key="gcc-output-file-format" value="dwarf-3"/>
<property key="omit-pack-options" value="false"/>
<property key="output-file-format" value="-mcof,+elf"/>
<property key="stack-size-high" value="auto"/>
<property key="stack-size-low" value="auto"/>
<property key="stack-size-main" value="auto"/>
<property key="stack-type" value="compiled"/>
<property key="user-pack-device-support" value=""/>
</XC8-config-global>
</conf>
</confs>
</configurationDescriptor>

+ 25
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/private/configurations.xml View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="65">
<projectmakefile>Makefile</projectmakefile>
<defaultConf>0</defaultConf>
<confs>
<conf name="default" type="2">
<platformToolSN></platformToolSN>
<languageToolchainDir>/opt/microchip/xc8/v2.10/bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>
</mdbdebugger>
<runprofile version="6">
<args></args>
<rundir></rundir>
<buildfirst>true</buildfirst>
<console-type>0</console-type>
<terminal-type>0</terminal-type>
<remove-instrumentation>0</remove-instrumentation>
<environment>
</environment>
</runprofile>
</conf>
</confs>
</configurationDescriptor>

+ 9
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/private/private.xml View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/dev/Desktop/code/electronics/attiny10_mplab_test/tests6_timer_6000hz.X/main.c</file>
</group>
</open-files>
</project-private>

+ 34
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests6_timer_6000hz.X/nbproject/project.xml View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/make-project/1">
<name>tests6_timer_6000hz</name>
<name>tests5_timer_6000hz</name>
<name>tests4_timer_6000hz</name>
<name>tests3</name>
<name>tests2</name>
<name>tests1</name>
<name>test2</name>
<name>test1</name>
<creation-uuid>1f6b2f6c-8c6d-40dd-a737-d73d987b2bef</creation-uuid>
<make-project-type>0</make-project-type>
<c-extensions>c</c-extensions>
<cpp-extensions/>
<header-extensions/>
<asminc-extensions/>
<sourceEncoding>ISO-8859-1</sourceEncoding>
<make-dep-projects/>
<sourceRootList/>
<confList>
<confElem>
<name>default</name>
<type>2</type>
</confElem>
</confList>
<formatting>
<project-formatting-style>false</project-formatting-style>
</formatting>
</data>
</configuration>
</project>

+ 113
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/Makefile View File

@ -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

BIN
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/build/default/production/main.o View File


+ 55
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/build/default/production/main.o.d View File

@ -0,0 +1,55 @@
build/default/production/main.o.d build/default/production/main.o: main.c \
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/xc.h \
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/cci.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/io.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/sfr_defs.h \
/opt/microchip/xc8/v2.10/avr/avr/include/inttypes.h \
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/stdint.h \
/opt/microchip/xc8/v2.10/avr/avr/include/stdint.h \
/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/include/avr/iotn10.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/portpins.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/common.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/version.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/xmega.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/fuse.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/lock.h \
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay.h \
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay_basic.h \
/opt/microchip/xc8/v2.10/avr/avr/include/math.h \
/opt/microchip/xc8/v2.10/avr/avr/include/avr/interrupt.h
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/xc.h:
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/cci.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/io.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/sfr_defs.h:
/opt/microchip/xc8/v2.10/avr/avr/include/inttypes.h:
/opt/microchip/xc8/v2.10/avr/lib/gcc/avr/5.4.0/include/stdint.h:
/opt/microchip/xc8/v2.10/avr/avr/include/stdint.h:
/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/include/avr/iotn10.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/portpins.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/common.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/version.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/xmega.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/fuse.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/lock.h:
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay.h:
/opt/microchip/xc8/v2.10/avr/avr/include/util/delay_basic.h:
/opt/microchip/xc8/v2.10/avr/avr/include/math.h:
/opt/microchip/xc8/v2.10/avr/avr/include/avr/interrupt.h:

+ 17
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/dist/default/production/memoryfile.xml View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<executable name="dist/default/production/tests7_timer_6000hz.X.production.elf">
<memory name="program">
<units>bytes</units>
<length>1024</length>
<used>94</used>
<free>930</free>
</memory>
<memory name="data">
<units>bytes</units>
<length>32</length>
<used>0</used>
<free>32</free>
</memory>
</executable>
</project>

BIN
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/dist/default/production/tests7_timer_6000hz.X.production.elf View File


+ 9
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/dist/default/production/tests7_timer_6000hz.X.production.hex View File

@ -0,0 +1,9 @@
:100000000AC02CC02BC02AC029C028C027C026C0C7
:1000100025C024C023C011271FBFCFE5D0E0DEBF1D
:0A002000CDBF03D000C0F894FFCF5D
:10002A00CF93DF9300D0CDB7DEB741E050E064E074
:10003A00E42FF52F6083CE5FDF4F18831A93C150E8
:10004A00D04040E050E064E0E42FF52F60830000E8
:02005A00F8CFDD
:02005C00D1CF02
:00000001FF

+ 395
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/dist/default/production/tests7_timer_6000hz.X.production.map View File

@ -0,0 +1,395 @@
Archive member included to satisfy reference by file (symbol)
/opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o (exit)
Discarded input sections
.data 0x00000000 0x0 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.bss 0x00000000 0x0 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.text 0x00000000 0x0 build/default/production/main.o
.data 0x00000000 0x0 build/default/production/main.o
.bss 0x00000000 0x0 build/default/production/main.o
.text 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.data 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.bss 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.mul
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.div
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.prologue
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc 0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.builtins
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.fmul
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
.text.libgcc.fixed
0x00000000 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
Memory Configuration
Name Origin Length Attributes
text 0x00000000 0x00000400 xr
data 0x00800040 0x00000020 rw !x
config 0x00820000 0x00000001 rw !x
lock 0x00830000 0x00000002 rw !x
signature 0x00840000 0x00000004 rw !x
*default* 0x00000000 0xffffffff
Linker script and memory map
0x00004000 __RODATA_PM_OFFSET__ = 0x4000
LOAD /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x00000001 __MPLAB_BUILD = 0x1
LOAD build/default/production/main.o
START GROUP
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avrtiny/libm.a
END GROUP
START GROUP
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avrtiny/libm.a
LOAD /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avrtiny/libc.a
LOAD /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/libattiny10.a
END GROUP
0x00000000 __TEXT_REGION_ORIGIN__ = DEFINED (__TEXT_REGION_ORIGIN__)?__TEXT_REGION_ORIGIN__:0x0
[0x00800040] __DATA_REGION_ORIGIN__ = DEFINED (__DATA_REGION_ORIGIN__)?__DATA_REGION_ORIGIN__:0x800040
[0x00000400] __TEXT_REGION_LENGTH__ = DEFINED (__TEXT_REGION_LENGTH__)?__TEXT_REGION_LENGTH__:0x1000
[0x00000020] __DATA_REGION_LENGTH__ = DEFINED (__DATA_REGION_LENGTH__)?__DATA_REGION_LENGTH__:0x100
[0x00000001] __FUSE_REGION_LENGTH__ = DEFINED (__FUSE_REGION_LENGTH__)?__FUSE_REGION_LENGTH__:0x2
0x00000002 __LOCK_REGION_LENGTH__ = DEFINED (__LOCK_REGION_LENGTH__)?__LOCK_REGION_LENGTH__:0x2
0x00000004 __SIGNATURE_REGION_LENGTH__ = DEFINED (__SIGNATURE_REGION_LENGTH__)?__SIGNATURE_REGION_LENGTH__:0x4
0x00004000 __RODATA_PM_OFFSET__ = DEFINED (__RODATA_PM_OFFSET__)?__RODATA_PM_OFFSET__:0x4000
.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 0x00000000 0x2a
*(.vectors)
.vectors 0x00000000 0x16 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x00000000 __vectors
0x00000000 __vector_default
*(.vectors)
*(.progmem.gcc*)
*(.dinit)
.dinit 0x00000016 0x0 data_init
0x00000016 . = ALIGN (0x2)
0x00000016 __trampolines_start = .
*(.trampolines)
.trampolines 0x00000016 0x0 linker stubs
*(.trampolines*)
0x00000016 __trampolines_end = .
*libprintf_flt.a:*(.progmem.data)
*libc.a:*(.progmem.data)
0x00000016 . = ALIGN (0x2)
*(.jumptables)
*(.jumptables*)
*(.lowtext)
*(.lowtext*)
0x00000016 __ctors_start = .
*(.ctors)
0x00000016 __ctors_end = .
0x00000016 __dtors_start = .
*(.dtors)
0x00000016 __dtors_end = .
SORT(*)(.ctors)
SORT(*)(.dtors)
*(.init0)
.init0 0x00000016 0x0 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x00000016 __init
*(.init0)
*(.init1)
*(.init1)
*(.init2)
.init2 0x00000016 0xc /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
*(.init2)
*(.init3)
*(.init3)
*(.init4)
*(.init4)
*(.init5)
*(.init5)
*(.init6)
*(.init6)
*(.init7)
*(.init7)
*(.init8)
*(.init8)
*(.init9)
.init9 0x00000022 0x4 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
*(.init9)
0x00000026 . = ALIGN (0x2)
*(.fini9)
.fini9 0x00000026 0x0 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
0x00000026 exit
0x00000026 _exit
*(.fini9)
*(.fini8)
*(.fini8)
*(.fini7)
*(.fini7)
*(.fini6)
*(.fini6)
*(.fini5)
*(.fini5)
*(.fini4)
*(.fini4)
*(.fini3)
*(.fini3)
*(.fini2)
*(.fini2)
*(.fini1)
*(.fini1)
*(.fini0)
.fini0 0x00000026 0x4 /opt/microchip/xc8/v2.10/avr/bin/../lib/gcc/avr/5.4.0/avrtiny/libgcc.a(_exit.o)
*(.fini0)
0x0000002a _etext = .
.rodata
*(.rodata)
*(.rodata*)
*(.gnu.linkonce.r*)
.data 0x00800040 0x0 load address 0x0000002a
[!provide] PROVIDE (__data_start, .)
*(.gnu.linkonce.d*)
0x00800040 . = ALIGN (0x2)
0x00800040 _edata = .
[!provide] PROVIDE (__data_end, .)
.bss 0x00800040 0x0
[!provide] PROVIDE (__bss_start, .)
*(COMMON)
[!provide] PROVIDE (__bss_end, .)
0x0000002a __data_load_start = LOADADDR (.data)
0x0000002a __data_load_end = (__data_load_start + SIZEOF (.data))
.noinit 0x00800040 0x0
[!provide] PROVIDE (__noinit_start, .)
*(.noinit*)
[!provide] PROVIDE (__noinit_end, .)
0x00800040 _end = .
.lock
*(.lock*)
.signature
*(.signature*)
.config
*(.fuse)
*(.lfuse)
*(.hfuse)
*(.efuse)
*(.config*)
.stab
*(.stab)
.stabstr
*(.stabstr)
.stab.excl
*(.stab.excl)
.stab.exclstr
*(.stab.exclstr)
.stab.index
*(.stab.index)
.stab.indexstr
*(.stab.indexstr)
.comment 0x00000000 0x2f
*(.comment)
.comment 0x00000000 0x2f build/default/production/main.o
0x30 (size before relaxing)
.note.gnu.build-id
*(.note.gnu.build-id)
.debug
*(.debug)
.line
*(.line)
.debug_srcinfo
*(.debug_srcinfo)
.debug_sfnames
*(.debug_sfnames)
.debug_aranges 0x00000000 0x20
*(.debug_aranges)
.debug_aranges
0x00000000 0x20 build/default/production/main.o
.debug_pubnames
*(.debug_pubnames)
.debug_info 0x00000000 0x549
*(.debug_info .gnu.linkonce.wi.*)
.debug_info 0x00000000 0x305 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_info 0x00000305 0x244 build/default/production/main.o
.debug_abbrev 0x00000000 0x330
*(.debug_abbrev)
.debug_abbrev 0x00000000 0x2d9 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_abbrev 0x000002d9 0x57 build/default/production/main.o
.debug_line 0x00000000 0x16c
*(.debug_line .debug_line.* .debug_line_end)
.debug_line 0x00000000 0xd9 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_line 0x000000d9 0x93 build/default/production/main.o
.debug_frame 0x00000000 0x34
*(.debug_frame)
.debug_frame 0x00000000 0x34 build/default/production/main.o
.debug_str 0x00000000 0x115
*(.debug_str)
.debug_str 0x00000000 0x115 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.debug_str 0x00000115 0x0 build/default/production/main.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 0x00000000 0x10
*(.debug_ranges)
.debug_ranges 0x00000000 0x10 build/default/production/main.o
.debug_macro
*(.debug_macro)
OUTPUT(dist/default/production/tests7_timer_6000hz.X.production.elf elf32-avr)
LOAD linker stubs
LOAD data_init
.note.gnu.avr.deviceinfo
0x00000000 0x3c
.note.gnu.avr.deviceinfo
0x00000000 0x3c /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
.text.main 0x0000002a 0x32
.text.main 0x0000002a 0x32 build/default/production/main.o
0x0000002a main
.text 0x0000005c 0x2
.text 0x0000005c 0x2 /home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10/gcc/dev/attiny10/avrtiny/crtattiny10.o
0x0000005c __vector_1
0x0000005c __bad_interrupt
0x0000005c __vector_6
0x0000005c __vector_3
0x0000005c __vector_7
0x0000005c __vector_5
0x0000005c __vector_4
0x0000005c __vector_9
0x0000005c __vector_2
0x0000005c __vector_8
0x0000005c __vector_10

+ 150
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/main.c View File

@ -0,0 +1,150 @@
#include <xc.h>
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
//#include <avr/sleep.h>
//#include <util/atomic.h>
//#include <avr/wdt.h>
//tests5 tested and works (at ~950hz). unplug cable to programmer to see pin 4 active.
//however...
//tests6 DEADEND
//never worked right. giving up and using delay.
//reference: https://www.avrfreaks.net/forum/sample-project-attiny10
//https://blog.podkalicki.com/attiny13-blinky-with-timer-compa/
//watchdog is too slow and inaccurate to get 6000Hz
//ISR(TIM0_COMPA_vect)
//{
// // Toggle PB2 Hi/Low depending on current state
// PINB = 1<<2;
// TIFR0 |= 1<<OCF0A; //clear flag (is this required here? documentation unclear)
// //PORTB ^= _BV(LED_PIN); // toggle LED pin
//}
/*
Delay in powerdown mode. Wake up by watchdog interrupt.
* //NOTE: see earlier code, e.g. tests3 in attiny10 elec projects 2020
*/
/*
void delay_power_down_wdt(uint8_t wdto)
{
wdt_reset();
wdt_enable(wdto);
WDTCSR |= (1<<WDIE);
//so far (with 128Khz clk) this sleep will be about 30-40 seconds.
//(however, I'll add the below to)
//adjust sleep speed here:
// 0110 is 1hz at 128KHz
//WDTCSR |= (0<< WDP3);
//WDTCSR |= (1<< WDP2);
//WDTCSR |= (1<< WDP1);
//WDTCSR |= (0<< WDP0);
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
// Make sure interrups are enabled and the I flag is restored
NONATOMIC_BLOCK(NONATOMIC_RESTORESTATE)
{
sleep_cpu();
wdt_disable();
}
sleep_disable();
}
*/
int main(void)
{
//////// OCR0A = 0;
//////// TCNT0 = 0;
//////// TCCR0A = 0;
//////// TCCR0B = 0;
////////
//////// TCCR0A |= _BV(WGM01); // set timer counter mode to CTC
//////// // TCCR0B |= _BV(CS02)|_BV(CS00); // set prescaler to 1024 (CLK=1200000Hz/1024/256=4.57Hz, 0.22s)
//////// TCCR0B |= _BV(CS00); // set prescaler to 1 (CLK=1MHz/1)
//OCR0A is 16 bits. in ASM it must be loaded separately.
//in C, it can be loaded > 256? (test)
//520 about 950hz, 25us wide pulse
//OCR0A = 520; // with one timer, ever 166.667hz we want to count once (3000hz)
//OCR0A = 1; //475hz
//this goes to 475hz (pulses). doesn't make sense.
//// OCR0AH = 0xFF; //
//// OCR0AL = 0xFF;
//attiny10 output compare broken apparently
//this still 960hz, with 100us or so pulse size (high is 100us, low is longer)
//OCR0A = 100;
//inline asm to load values into 16 bit register
//; variables
//; For 1 Hz output, the timer delay has to be 1/2 second (1/2 second on / 1/2 second off)
//; delay = OCR0A * 1024 * 8 / 8000000
//; for 1/2 second, OCR0A = 488 (0x01E8)
//.EQU OCR0AHigh = 0x01
//.EQU OCR0ALow = 0xe8
// in bash type: printf "%x\n" 488
//.EQU OCR0AHigh = 0x02
//.EQU OCR0ALow = 0x08
// ldi r17, OCR0AHigh //; Sets the output compare register value
//ldi r16, OCR0ALow
//this asm doesn't work (why?) //perhaps OCR0A is really just 8 bits on attiny10...?)
////// asm volatile(
////// "ldi r17, 0x02"
////// "ldi r16, 0x08"
////// "out OCR0AH, r17"
////// "out OCR0AL, r16"
////// );
//this asm works
// asm volatile("nop\n\t"
//"nop\n\t"
//"nop\n\t"
//"nop\n\t"
//::);
////////
//////// TIMSK0 |= _BV(OCIE0A); // enable Timer CTC interrupt
////////
// PB2 change to output
DDRB = 1<<2;
//// sei();
int x = 0;
while(1)
{
//this goes about 60.3KHz.
//experiment FAIL
//will just buy a 6KHz oscillator.
PINB = 1<<2;
//EDIT: disabled optimization in mplab (level 0)
//and ended up geting much slower IO
//asm("nop;");
//for(x=0;x<2;x++){
// asm("nop;""nop;""nop;""nop;""nop;"
//"nop;""nop;"//"nop;""nop;"//"nop;""nop;"
// );
//}//just this asm block is about 121.22KHz
}
}

+ 158
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Makefile-default.mk View File

@ -0,0 +1,158 @@
#
# 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=dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
else
IMAGE_TYPE=production
OUTPUT_SUFFIX=hex
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.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
# Object Files Quoted if spaced
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.o
POSSIBLE_DEPFILES=${OBJECTDIR}/main.o.d
# Object Files
OBJECTFILES=${OBJECTDIR}/main.o
# Source Files
SOURCEFILES=main.c
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 dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
MP_PROCESSOR_OPTION=ATtiny10
# ------------------------------------------------------------------------------------
# Rules for buildStep: compile
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${OBJECTDIR}/main.o: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/main.o.d
@${RM} ${OBJECTDIR}/main.o
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -g -DDEBUG -gdwarf-2 -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O0 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c
else
${OBJECTDIR}/main.o: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/main.o.d
@${RM} ${OBJECTDIR}/main.o
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -x c -D__$(MP_PROCESSOR_OPTION)__ -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O0 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -gdwarf-3 -MD -MP -MF "${OBJECTDIR}/main.o.d" -MT "${OBJECTDIR}/main.o.d" -MT ${OBJECTDIR}/main.o -o ${OBJECTDIR}/main.o main.c
endif
# ------------------------------------------------------------------------------------
# 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: link
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.map -D__DEBUG=1 -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -gdwarf-2 -Wl,--gc-sections -O0 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -gdwarf-3 $(COMPARISON_BUILD) -Wl,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -o dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -o dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1
@${RM} dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.hex
else
dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.map -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10" -Wl,--gc-sections -O0 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -Wall -gdwarf-3 $(COMPARISON_BUILD) -Wl,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml -o dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -o dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--start-group -Wl,-lm -Wl,--end-group
${MP_CC_DIR}/avr-objcopy -O ihex "dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}" "dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.hex"
endif
# Subprojects
.build-subprojects:
# Subprojects
.clean-subprojects:
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r build/default
${RM} -r dist/default
# Enable dependency checking
.dep.inc: .depcheck-impl
DEPFILES=$(shell "${PATH_TO_IDE_BIN}"mplabwildcard ${POSSIBLE_DEPFILES})
ifneq (${DEPFILES},)
include ${DEPFILES}
endif

+ 10
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Makefile-genesis.properties View File

@ -0,0 +1,10 @@
#
#Wed Jul 15 02:31:35 EDT 2020
default.Pack.dfplocation=/home/dev/.mchp_packs/Microchip/ATtiny_DFP/2.0.10
default.languagetoolchain.dir=/opt/microchip/xc8/v2.10/bin
configurations-xml=0eecc53d82e1a001c204dd2d47a4259e
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e453b0cf7f7da72a932cfdb2f655401
default.languagetoolchain.version=2.10
host.platform=linux
conf.ids=default
default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=23d12c447ed4f9462f01e2202bc2f36a

+ 69
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Makefile-impl.mk View File

@ -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=tests7_timer_6000hz.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

+ 36
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Makefile-local-default.mk View File

@ -0,0 +1,36 @@
#
# 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/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/
# Adding MPLAB X bin directory to path.
PATH:=/opt/microchip/mplabx/v5.25/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/v5.25/sys/java/jre1.8.0_181/bin/"
OS_CURRENT="$(shell uname -s)"
MP_CC="/opt/microchip/xc8/v2.10/bin/xc8-cc"
# MP_CPPC is not defined
# MP_BC is not defined
MP_AS="/opt/microchip/xc8/v2.10/bin/xc8-cc"
MP_LD="/opt/microchip/xc8/v2.10/bin/xc8-cc"
MP_AR="/opt/microchip/xc8/v2.10/bin/xc8-ar"
DEP_GEN=${MP_JAVA_PATH}java -jar "/opt/microchip/mplabx/v5.25/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
MP_CC_DIR="/opt/microchip/xc8/v2.10/bin"
# MP_CPPC_DIR is not defined
# MP_BC_DIR is not defined
MP_AS_DIR="/opt/microchip/xc8/v2.10/bin"
MP_LD_DIR="/opt/microchip/xc8/v2.10/bin"
MP_AR_DIR="/opt/microchip/xc8/v2.10/bin"
# MP_BC_DIR is not defined

+ 13
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Makefile-variables.mk View File

@ -0,0 +1,13 @@
#
# Generated - do not edit!
#
# NOCDDL
#
CND_BASEDIR=`pwd`
# default configuration
CND_ARTIFACT_DIR_default=dist/default/production
CND_ARTIFACT_NAME_default=tests7_timer_6000hz.X.production.hex
CND_ARTIFACT_PATH_default=dist/default/production/tests7_timer_6000hz.X.production.hex
CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package
CND_PACKAGE_NAME_default=tests7timer6000hz.x.tar
CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/tests7timer6000hz.x.tar

+ 73
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/Package-default.bash View File

@ -0,0 +1,73 @@
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_CONF=default
CND_DISTDIR=dist
TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/tests7_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
OUTPUT_BASENAME=tests7_timer_6000hz.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
PACKAGE_TOP_DIR=tests7timer6000hz.x/
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
# Setup
cd "${TOP}"
mkdir -p ${CND_DISTDIR}/${CND_CONF}/package
rm -rf ${TMPDIR}
mkdir -p ${TMPDIR}
# Copy files and create directories and links
cd "${TOP}"
makeDirectory ${TMPDIR}/tests7timer6000hz.x/bin
copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
# Generate tar file
cd "${TOP}"
rm -f ${CND_DISTDIR}/${CND_CONF}/package/tests7timer6000hz.x.tar
cd ${TMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/tests7timer6000hz.x.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${TMPDIR}

+ 160
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/configurations.xml View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="65">
<logicalFolder name="root" displayName="root" projectFiles="true">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="LinkerScript"
displayName="Linker Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>main.c</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="default" type="2">
<toolsSet>
<developmentServer>localhost</developmentServer>
<targetDevice>ATtiny10</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool></platformTool>
<languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>2.10</languageToolchainVersion>
<platform>2</platform>
</toolsSet>
<packs>
<pack name="ATtiny_DFP" vendor="Microchip" version="2.0.10"/>
</packs>
<compileType>
<linkerTool>
<linkerLibItems>
</linkerLibItems>
</linkerTool>
<archiverTool>
</archiverTool>
<loading>
<useAlternateLoadableFile>false</useAlternateLoadableFile>
<parseOnProdLoad>false</parseOnProdLoad>
<alternateLoadableFile></alternateLoadableFile>
</loading>
<subordinates>
</subordinates>
</compileType>
<makeCustomizationType>
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
<makeCustomizationPreStep></makeCustomizationPreStep>
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
<makeCustomizationPostStep></makeCustomizationPostStep>
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
</makeCustomizationType>
<HI-TECH-COMP>
<property key="additional-warnings" value="true"/>
<property key="asmlist" value="true"/>
<property key="default-bitfield-type" value="true"/>
<property key="default-char-type" value="true"/>
<property key="define-macros" value=""/>
<property key="disable-optimizations" value="true"/>
<property key="extra-include-directories" value=""/>
<property key="favor-optimization-for" value="-speed,+space"/>
<property key="garbage-collect-data" value="true"/>
<property key="garbage-collect-functions" value="true"/>
<property key="identifier-length" value="255"/>
<property key="local-generation" value="false"/>
<property key="operation-mode" value="free"/>
<property key="opt-xc8-compiler-strict_ansi" value="false"/>
<property key="optimization-assembler" value="true"/>
<property key="optimization-assembler-files" value="true"/>
<property key="optimization-debug" value="false"/>
<property key="optimization-invariant-enable" value="false"/>
<property key="optimization-invariant-value" value="16"/>
<property key="optimization-level" value="-O0"/>
<property key="optimization-speed" value="false"/>
<property key="optimization-stable-enable" value="false"/>
<property key="pack-struct" value="true"/>
<property key="preprocess-assembler" value="true"/>
<property key="short-enums" value="true"/>
<property key="undefine-macros" value=""/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
<property key="verbose" value="false"/>
<property key="warning-level" value="-3"/>
<property key="what-to-do" value="ignore"/>
</HI-TECH-COMP>
<HI-TECH-LINK>
<property key="additional-options-checksum" value=""/>
<property key="additional-options-code-offset" value=""/>
<property key="additional-options-command-line" value=""/>
<property key="additional-options-errata" value=""/>
<property key="additional-options-extend-address" value="false"/>
<property key="additional-options-trace-type" value=""/>
<property key="additional-options-use-response-files" value="false"/>
<property key="backup-reset-condition-flags" value="false"/>
<property key="calibrate-oscillator" value="false"/>
<property key="calibrate-oscillator-value" value="0x3400"/>
<property key="clear-bss" value="true"/>
<property key="code-model-external" value="wordwrite"/>
<property key="code-model-rom" value=""/>
<property key="create-html-files" value="false"/>
<property key="data-model-ram" value=""/>
<property key="data-model-size-of-double" value="24"/>
<property key="data-model-size-of-double-gcc" value="no-short-double"/>
<property key="data-model-size-of-float" value="24"/>
<property key="data-model-size-of-float-gcc" value="no-short-float"/>
<property key="display-class-usage" value="false"/>
<property key="display-hex-usage" value="false"/>
<property key="display-overall-usage" value="true"/>
<property key="display-psect-usage" value="false"/>
<property key="extra-lib-directories" value=""/>
<property key="fill-flash-options-addr" value=""/>
<property key="fill-flash-options-const" value=""/>
<property key="fill-flash-options-how" value="0"/>
<property key="fill-flash-options-inc-const" value="1"/>
<property key="fill-flash-options-increment" value=""/>
<property key="fill-flash-options-seq" value=""/>
<property key="fill-flash-options-what" value="0"/>
<property key="format-hex-file-for-download" value="false"/>
<property key="initialize-data" value="true"/>
<property key="input-libraries" value="libm"/>
<property key="keep-generated-startup.as" value="false"/>
<property key="link-in-c-library" value="true"/>
<property key="link-in-c-library-gcc" value=""/>
<property key="link-in-peripheral-library" value="false"/>
<property key="managed-stack" value="false"/>
<property key="opt-xc8-linker-file" value="false"/>
<property key="opt-xc8-linker-link_startup" value="false"/>
<property key="opt-xc8-linker-serial" value=""/>
<property key="program-the-device-with-default-config-words" value="true"/>
<property key="remove-unused-sections" value="true"/>
</HI-TECH-LINK>
<XC8-CO>
<property key="coverage-enable" value=""/>
</XC8-CO>
<XC8-config-global>
<property key="advanced-elf" value="true"/>
<property key="gcc-opt-driver-new" value="true"/>
<property key="gcc-opt-std" value="-std=c99"/>
<property key="gcc-output-file-format" value="dwarf-3"/>
<property key="omit-pack-options" value="false"/>
<property key="output-file-format" value="-mcof,+elf"/>
<property key="stack-size-high" value="auto"/>
<property key="stack-size-low" value="auto"/>
<property key="stack-size-main" value="auto"/>
<property key="stack-type" value="compiled"/>
<property key="user-pack-device-support" value=""/>
</XC8-config-global>
</conf>
</confs>
</configurationDescriptor>

+ 25
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/private/configurations.xml View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="65">
<projectmakefile>Makefile</projectmakefile>
<defaultConf>0</defaultConf>
<confs>
<conf name="default" type="2">
<platformToolSN></platformToolSN>
<languageToolchainDir>/opt/microchip/xc8/v2.10/bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>
</mdbdebugger>
<runprofile version="6">
<args></args>
<rundir></rundir>
<buildfirst>true</buildfirst>
<console-type>0</console-type>
<terminal-type>0</terminal-type>
<remove-instrumentation>0</remove-instrumentation>
<environment>
</environment>
</runprofile>
</conf>
</confs>
</configurationDescriptor>

+ 9
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/private/private.xml View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/dev/Desktop/code/electronics/attiny10_mplab_test/tests7_timer_6000hz.X/main.c</file>
</group>
</open-files>
</project-private>

+ 35
- 0
Attiny_Solar_Energy_Harvest/code/mplab/tests7_timer_6000hz_FAIL.X/nbproject/project.xml View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/make-project/1">
<name>tests7_timer_6000hz</name>
<name>tests6_timer_6000hz</name>
<name>tests5_timer_6000hz</name>
<name>tests4_timer_6000hz</name>
<name>tests3</name>
<name>tests2</name>
<name>tests1</name>
<name>test2</name>
<name>test1</name>
<creation-uuid>1f6b2f6c-8c6d-40dd-a737-d73d987b2bef</creation-uuid>
<make-project-type>0</make-project-type>
<c-extensions>c</c-extensions>
<cpp-extensions/>
<header-extensions/>
<asminc-extensions/>
<sourceEncoding>ISO-8859-1</sourceEncoding>
<make-dep-projects/>
<sourceRootList/>
<confList>
<confElem>
<name>default</name>
<type>2</type>
</confElem>
</confList>
<formatting>
<project-formatting-style>false</project-formatting-style>
</formatting>
</data>
</configuration>
</project>

+ 13
- 0
Attiny_Solar_Energy_Harvest/docs/38.tex View File

@ -412,6 +412,19 @@ From Programmer Source code:
This programmer is not foolproof, so establish a routine, and keep a working
model (pcb w/attiny) as a prototype to isolate what is broken.
\subsection{Attiny10 Timer Fail}
The goal was to get a 6KHz square wave out of the Attiny10 (first using the timer). After a night of trying to wrangle with timer 0 and CTC mode of the Attiny10 timer (which failed
to work as expected). I've decided to buy a 6KHz oscillator. I was able to get 60.3KHz
out of the Attiny using no optimization in mplab and IO as fast as possible. I was able
to get 6.13Khz using optimization and a for loop (unfortunately the nops got optimized out).
I also learned that the cable I was using to program the attiny10 was giving me much trouble.
I ended up soldering one side to an uno. That out of the way, When programming the attiny10
with my protoboard, it's as easy as, 1) connect cable to protoboard, 2) press P in serial monitor of Uno,
3) paste hex contents of mplab build into serial monitor. No need to ever reset the uno, even if
it doesn't print that it detects the attiny. It's pretty good about this, and if connected
correctly, will just write to the chip, when P is pressed.
\subsection{Further Notes}
https://www.eevblog.com/forum/microcontrollers/powering-devices-via-gpio-pins/msg2720044/\#msg2720044 - Using GPIO to power devices.

Loading…
Cancel
Save