commit a53798da411b187ba0eabd8b17f0dc9c950101a7 Author: Mickaël TANSORIER Date: Tue Mar 1 22:28:28 2016 +0100 Initial commit Creation infini table project diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fca8e2c --- /dev/null +++ b/Makefile @@ -0,0 +1,113 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin +RANLIB=ranlib + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... +# WARNING: the IDE does not call this target since it takes a long time to +# simply run make. Instead, the IDE removes the configuration directories +# under build and dist directly without calling make. +# This target is left here so people can do a clean when running a clean +# outside the IDE. + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/Table-infini-main.c b/Table-infini-main.c new file mode 100644 index 0000000..dbfbab7 --- /dev/null +++ b/Table-infini-main.c @@ -0,0 +1,243 @@ +/* + * File: Table-infini-main.c + * Author: Mickaël Tansorier + * + * Created on 9 mars 2015, 18:44 + * + * License CC-BY-NC-SA + * https://creativecommons.org/licenses/by-nc-sa/3.0/fr/ + */ + +/* CONFIGURATION */ +#pragma config CP = ON // Flash Program Memory Code Protection bit +#pragma config CCPMX = RB3 // CCP1 Pin Selection bit +#pragma config DEBUG = OFF // In-Circuit Debugger Mode bit +#pragma config WRT = OFF // Flash Program Memory Write Enable bits +#pragma config CPD = ON // Data EE Memory Code Protection bit +#pragma config LVP = OFF // Low-Voltage Programming Enable bit +#pragma config BOREN = OFF // Brown-out Reset Enable bit (desactiver si fonctionne en 3V) +#pragma config MCLRE = OFF // RA5/MCLR/VPP Pin Function Select bit +#pragma config PWRTE = ON // Power-up Timer Enable bit (choix reset inten)) +#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled) +#pragma config FOSC = INTOSCIO + +#include +#include +#include + +#define _XTAL_FREQ 8000000 //set your internal(or)external oscillator speed + + +/* ALIAS */ +#define RED PORTBbits.RB1 +#define GREEN PORTBbits.RB2 +#define BLUE PORTBbits.RB3 + +#define LED1 PORTBbits.RB4 +#define LED2 PORTBbits.RB5 +#define LED3 PORTBbits.RB6 +#define LED4 PORTBbits.RB7 +#define LED5 PORTAbits.RA0 +#define LED6 PORTAbits.RA1 +#define LED7 PORTAbits.RA2 +#define LED8 PORTAbits.RA3 +#define LED9 PORTAbits.RA4 +#define LED10 PORTAbits.RA6 + +/* FONCTIONS */ +void init_oscillator (void); +void init_timer0 (void); +void init_int0 (void); +void interrupt ISR (void); +void change_color_toutes_leds (void); + +/* VARIABLES */ +volatile unsigned char PWM_COUNTER = 0; // 0 to 100 : nb ntrerrupt during PWM cycle +volatile unsigned char duty_RED = 0; // 0 to 100 +volatile unsigned char duty_GREEN = 0; // 0 to 100 +volatile unsigned char duty_BLUE = 0; // 0 to 100 +volatile unsigned char mode = 0; // 0 to 4 : 4 differents mode + +/* + * MAIN + */ +int main(void) { + + init_oscillator(); + + /* DEFINE PORTs */ + TRISA=0x00; + TRISB=0x01; // int0 + + /* INIT */ + init_timer0(); + init_int0(); + + /* INTERRUPT */ + INTCONbits.GIE = 1; // Enables all unmasked interrupts + + /* INIT PORT */ + PORTA=0x00; + PORTB=0x00; + + while(1) + { + + if(mode==1 || mode==0) + { + change_color_toutes_leds(); + } + if(mode==2 || mode==0){ + duty_RED = 100; + duty_GREEN = 0; + duty_BLUE = 0; + LED1 = LED2 = LED3 = LED4 = LED5 = LED6 = LED7 = LED8 = LED9 = LED10 = 1; + __delay_ms(1000); + } + + if(mode==3 || mode==0){ + duty_RED = 0; + duty_GREEN = 100; + duty_BLUE = 0; + LED1 = LED2 = LED3 = LED4 = LED5 = LED6 = LED7 = LED8 = LED9 = LED10 = 1; + __delay_ms(1000); + } + + if(mode==4 || mode==0){ + duty_RED = 0; + duty_GREEN = 0; + duty_BLUE = 100; + LED1 = LED2 = LED3 = LED4 = LED5 = LED6 = LED7 = LED8 = LED9 = LED10 = 1; + __delay_ms(1000); + } + + } + return 0; +} + +void init_oscillator(void){ + OSCCONbits.IRCF = 0b111; // 8MHz + OSCCONbits.SCS = 0b00; // Oscillator mode defined by FOSC + OSCCONbits.IOFS = 1; // Frequency is stable +} + +void init_timer0(void) +{ + /* interruption timer */ + OPTION_REGbits.T0CS = 0; // Internal instruction cycle clock (CLKO) + OPTION_REGbits.PSA = 0; // Prescaler is assigned to the Timer0 module + + /* T=(4/Fosc)*Presc*(2^8-TMR0) + * T=(4/8000000)*8*(256 - (256 - 25)) + * T=100us + */ + OPTION_REGbits.PS = 0b010; // Prescaler Rate Select bits + TMR0 = 256-25; + + INTCONbits.TMR0IE = 1; // Enables the TMR0 interrupt + INTCONbits.TMR0IF = 0; // Enables the TMR0 interrupt +} + +void init_int0(void){ + OPTION_REGbits.nRBPU = 0; //PORTB Pull-up Enable bit + OPTION_REGbits.INTEDG = 0; //Interrupt Edge Select bit 1=front montant, 0= front descenndant + INTCONbits.INT0IE = 1; //Enables the RB0/INT external interrupt + INTCONbits.INT0IF = 0; +} + +void interrupt ISR(void) +{ + /* Check if it is TMR0 Overflow ISR */ + if(INTCONbits.TMR0IE && INTCONbits.TMR0IF){ + + if(PWM_COUNTER < duty_RED) {RED = 1;} + else{RED=0;} + + if(PWM_COUNTER < duty_GREEN){GREEN = 1;} + else{GREEN=0;} + + if(PWM_COUNTER < duty_BLUE){BLUE = 1;} + else{BLUE=0;} + + PWM_COUNTER++; + if(PWM_COUNTER>=100){ + PWM_COUNTER=0; + } + + TMR0 = 255-25; + INTCONbits.TMR0IF=0; //reactive l'interruption + } + /* changement de mode */ + if(INTCONbits.INT0IE && INTCONbits.INT0IF) + { + + mode++; + if(mode>4) mode=0; + if(mode==0){LED1=LED2=LED3=1;} + else if(mode==1){LED1=1;LED2=LED3=0;} + else if(mode==2){LED2=1;LED1=LED3=0;} + else if(mode==3){LED1=LED2=1;LED3=0;} + else if(mode==4){LED3=1;LED2=LED1=0;} + else{LED3=LED1=1;LED2=0;} + __delay_ms(250); + INTCONbits.INT0IF=0; // ennable interrupt + + } +} + + +/* + * CHANGE LEDS COLOR + */ +void change_color_toutes_leds(void) +{ + /* differents states */ + //--- --- ___ ___ ___ --- + //___ --- --- --- ___ ___ + //___ ___ ___ --- --- --- + + // initial state + duty_RED=100; + duty_GREEN=0; + duty_BLUE=0; + // Leds on + LED1 = LED2 = LED3 = LED4 = LED5 = LED6 = LED7 = LED8 = LED9 = LED10 = 1; + + signed char i; + // up green + for(i=0;i<=100;i++){ + duty_GREEN=i; + __delay_ms(10); + } + if(mode!=1 && mode!=0)return; + // down red + for(i=100;i>=0;i--){ + duty_RED=i; + __delay_ms(10); + } + if(mode!=1 && mode!=0)return; + // up blue + for(i=0;i<=100;i++){ + duty_BLUE=i; + __delay_ms(10); + } + if(mode!=1 && mode!=0)return; + // down green + for(i=100;i>=0;i--){ + duty_GREEN=i; + __delay_ms(10); + } + if(mode!=1 && mode!=0)return; + // up red + for(i=0;i<=100;i++){ + duty_RED=i; + __delay_ms(10); + } + if(mode!=1 && mode!=0)return; + // down blue + for(i=100;i>=0;i--){ + duty_BLUE=i; + __delay_ms(10); + } +} + diff --git a/nbproject/Makefile-default.mk b/nbproject/Makefile-default.mk new file mode 100644 index 0000000..c8de44d --- /dev/null +++ b/nbproject/Makefile-default.mk @@ -0,0 +1,207 @@ +# +# Generated Makefile - do not edit! +# +# Edit the Makefile in the project folder instead (../Makefile). Each target +# has a -pre and a -post target defined where you can add customized code. +# +# This makefile implements configuration specific macros and targets. + + +# Include project Makefile +ifeq "${IGNORE_LOCAL}" "TRUE" +# do not include local makefile. User is passing all local related variables already +else +include Makefile +# Include makefile containing local settings +ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk" +include nbproject/Makefile-local-default.mk +endif +endif + +# Environment +MKDIR=gnumkdir -p +RM=rm -f +MV=mv +CP=cp + +# Macros +CND_CONF=default +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +IMAGE_TYPE=debug +OUTPUT_SUFFIX=elf +DEBUGGABLE_SUFFIX=elf +FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Table_infini.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +else +IMAGE_TYPE=production +OUTPUT_SUFFIX=hex +DEBUGGABLE_SUFFIX=elf +FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Table_infini.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +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=save_old.c save_old2.c main_table_infini.c save_old_old.c save_old3.c + +# Object Files Quoted if spaced +OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/save_old.p1 ${OBJECTDIR}/save_old2.p1 ${OBJECTDIR}/main_table_infini.p1 ${OBJECTDIR}/save_old_old.p1 ${OBJECTDIR}/save_old3.p1 +POSSIBLE_DEPFILES=${OBJECTDIR}/save_old.p1.d ${OBJECTDIR}/save_old2.p1.d ${OBJECTDIR}/main_table_infini.p1.d ${OBJECTDIR}/save_old_old.p1.d ${OBJECTDIR}/save_old3.p1.d + +# Object Files +OBJECTFILES=${OBJECTDIR}/save_old.p1 ${OBJECTDIR}/save_old2.p1 ${OBJECTDIR}/main_table_infini.p1 ${OBJECTDIR}/save_old_old.p1 ${OBJECTDIR}/save_old3.p1 + +# Source Files +SOURCEFILES=save_old.c save_old2.c main_table_infini.c save_old_old.c save_old3.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}/Table_infini.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} + +MP_PROCESSOR_OPTION=16F87 +# ------------------------------------------------------------------------------------ +# Rules for buildStep: compile +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +${OBJECTDIR}/save_old.p1: save_old.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/save_old.p1.d + @${RM} ${OBJECTDIR}/save_old.p1 + ${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G -D__DEBUG=1 --debugger=none --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -o${OBJECTDIR}/save_old.p1 save_old.c + @-${MV} ${OBJECTDIR}/save_old.d ${OBJECTDIR}/save_old.p1.d + @${FIXDEPS} ${OBJECTDIR}/save_old.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ + +${OBJECTDIR}/save_old2.p1: save_old2.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/save_old2.p1.d + @${RM} ${OBJECTDIR}/save_old2.p1 + ${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G -D__DEBUG=1 --debugger=none --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -o${OBJECTDIR}/save_old2.p1 save_old2.c + @-${MV} ${OBJECTDIR}/save_old2.d ${OBJECTDIR}/save_old2.p1.d + @${FIXDEPS} ${OBJECTDIR}/save_old2.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ + +${OBJECTDIR}/main_table_infini.p1: main_table_infini.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/main_table_infini.p1.d + @${RM} ${OBJECTDIR}/main_table_infini.p1 + ${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G -D__DEBUG=1 --debugger=none --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -o${OBJECTDIR}/main_table_infini.p1 main_table_infini.c + @-${MV} ${OBJECTDIR}/main_table_infini.d ${OBJECTDIR}/main_table_infini.p1.d + @${FIXDEPS} ${OBJECTDIR}/main_table_infini.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ + +${OBJECTDIR}/save_old_old.p1: save_old_old.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/save_old_old.p1.d + @${RM} ${OBJECTDIR}/save_old_old.p1 + ${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G -D__DEBUG=1 --debugger=none --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -o${OBJECTDIR}/save_old_old.p1 save_old_old.c + @-${MV} ${OBJECTDIR}/save_old_old.d ${OBJECTDIR}/save_old_old.p1.d + @${FIXDEPS} ${OBJECTDIR}/save_old_old.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ + +${OBJECTDIR}/save_old3.p1: save_old3.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/save_old3.p1.d + @${RM} ${OBJECTDIR}/save_old3.p1 + ${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G -D__DEBUG=1 --debugger=none --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -o${OBJECTDIR}/save_old3.p1 save_old3.c + @-${MV} ${OBJECTDIR}/save_old3.d ${OBJECTDIR}/save_old3.p1.d + @${FIXDEPS} ${OBJECTDIR}/save_old3.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ + +else +${OBJECTDIR}/save_old.p1: save_old.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/save_old.p1.d + @${RM} ${OBJECTDIR}/save_old.p1 + ${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -o${OBJECTDIR}/save_old.p1 save_old.c + @-${MV} ${OBJECTDIR}/save_old.d ${OBJECTDIR}/save_old.p1.d + @${FIXDEPS} ${OBJECTDIR}/save_old.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ + +${OBJECTDIR}/save_old2.p1: save_old2.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/save_old2.p1.d + @${RM} ${OBJECTDIR}/save_old2.p1 + ${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -o${OBJECTDIR}/save_old2.p1 save_old2.c + @-${MV} ${OBJECTDIR}/save_old2.d ${OBJECTDIR}/save_old2.p1.d + @${FIXDEPS} ${OBJECTDIR}/save_old2.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ + +${OBJECTDIR}/main_table_infini.p1: main_table_infini.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/main_table_infini.p1.d + @${RM} ${OBJECTDIR}/main_table_infini.p1 + ${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -o${OBJECTDIR}/main_table_infini.p1 main_table_infini.c + @-${MV} ${OBJECTDIR}/main_table_infini.d ${OBJECTDIR}/main_table_infini.p1.d + @${FIXDEPS} ${OBJECTDIR}/main_table_infini.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ + +${OBJECTDIR}/save_old_old.p1: save_old_old.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/save_old_old.p1.d + @${RM} ${OBJECTDIR}/save_old_old.p1 + ${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -o${OBJECTDIR}/save_old_old.p1 save_old_old.c + @-${MV} ${OBJECTDIR}/save_old_old.d ${OBJECTDIR}/save_old_old.p1.d + @${FIXDEPS} ${OBJECTDIR}/save_old_old.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ + +${OBJECTDIR}/save_old3.p1: save_old3.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/save_old3.p1.d + @${RM} ${OBJECTDIR}/save_old3.p1 + ${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -o${OBJECTDIR}/save_old3.p1 save_old3.c + @-${MV} ${OBJECTDIR}/save_old3.d ${OBJECTDIR}/save_old3.p1.d + @${FIXDEPS} ${OBJECTDIR}/save_old3.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ + +endif + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: assemble +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +else +endif + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: link +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +dist/${CND_CONF}/${IMAGE_TYPE}/Table_infini.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} + ${MP_CC} $(MP_EXTRA_LD_PRE) --chip=$(MP_PROCESSOR_OPTION) -G -mdist/${CND_CONF}/${IMAGE_TYPE}/Table_infini.X.${IMAGE_TYPE}.map -D__DEBUG=1 --debugger=none --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -odist/${CND_CONF}/${IMAGE_TYPE}/Table_infini.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} + @${RM} dist/${CND_CONF}/${IMAGE_TYPE}/Table_infini.X.${IMAGE_TYPE}.hex + +else +dist/${CND_CONF}/${IMAGE_TYPE}/Table_infini.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} + ${MP_CC} $(MP_EXTRA_LD_PRE) --chip=$(MP_PROCESSOR_OPTION) -G -mdist/${CND_CONF}/${IMAGE_TYPE}/Table_infini.X.${IMAGE_TYPE}.map --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -odist/${CND_CONF}/${IMAGE_TYPE}/Table_infini.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} + +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 mplabwildcard ${POSSIBLE_DEPFILES}) +ifneq (${DEPFILES},) +include ${DEPFILES} +endif diff --git a/nbproject/Makefile-genesis.properties b/nbproject/Makefile-genesis.properties new file mode 100644 index 0000000..79970aa --- /dev/null +++ b/nbproject/Makefile-genesis.properties @@ -0,0 +1,8 @@ +# +#Fri Oct 09 17:10:44 CEST 2015 +default.languagetoolchain.dir=C\:\\Program Files (x86)\\Microchip\\xc8\\v1.34\\bin +com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=14bfd24937c194037d3fb4871f06392b +default.languagetoolchain.version=1.34 +host.platform=windows +conf.ids=default +default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=8e4b1923d51ddb95d5dd2242a6e4ff4e diff --git a/nbproject/Makefile-impl.mk b/nbproject/Makefile-impl.mk new file mode 100644 index 0000000..bf2ce38 --- /dev/null +++ b/nbproject/Makefile-impl.mk @@ -0,0 +1,69 @@ +# +# Generated Makefile - do not edit! +# +# Edit the Makefile in the project folder instead (../Makefile). Each target +# has a pre- and a post- target defined where you can add customization code. +# +# This makefile implements macros and targets common to all configurations. +# +# NOCDDL + + +# Building and Cleaning subprojects are done by default, but can be controlled with the SUB +# macro. If SUB=no, subprojects will not be built or cleaned. The following macro +# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf +# and .clean-reqprojects-conf unless SUB has the value 'no' +SUB_no=NO +SUBPROJECTS=${SUB_${SUB}} +BUILD_SUBPROJECTS_=.build-subprojects +BUILD_SUBPROJECTS_NO= +BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}} +CLEAN_SUBPROJECTS_=.clean-subprojects +CLEAN_SUBPROJECTS_NO= +CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} + + +# Project Name +PROJECTNAME=Table_infini.X + +# Active Configuration +DEFAULTCONF=default +CONF=${DEFAULTCONF} + +# All Configurations +ALLCONFS=default + + +# build +.build-impl: .build-pre + ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf + + +# clean +.clean-impl: .clean-pre + ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf + +# clobber +.clobber-impl: .clobber-pre .depcheck-impl + ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default clean + + + +# all +.all-impl: .all-pre .depcheck-impl + ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default build + + + +# dependency checking support +.depcheck-impl: +# @echo "# This code depends on make tool being used" >.dep.inc +# @if [ -n "${MAKE_VERSION}" ]; then \ +# echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \ +# echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \ +# echo "include \$${DEPFILES}" >>.dep.inc; \ +# echo "endif" >>.dep.inc; \ +# else \ +# echo ".KEEP_STATE:" >>.dep.inc; \ +# echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \ +# fi diff --git a/nbproject/Makefile-local-default.mk b/nbproject/Makefile-local-default.mk new file mode 100644 index 0000000..8c139b7 --- /dev/null +++ b/nbproject/Makefile-local-default.mk @@ -0,0 +1,37 @@ +# +# Generated Makefile - do not edit! +# +# +# This file contains information about the location of compilers and other tools. +# If you commmit this file into your revision control server, you will be able to +# to checkout the project and build it from the command line with make. However, +# if more than one person works on the same project, then this file might show +# conflicts since different users are bound to have compilers in different places. +# In that case you might choose to not commit this file and let MPLAB X recreate this file +# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at +# least once so the file gets created and the project can be built. Finally, you can also +# avoid using this file at all if you are only building from the command line with make. +# You can invoke make with the values of the macros: +# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... +# +SHELL=cmd.exe +PATH_TO_IDE_BIN=C:/Program Files (x86)/Microchip/MPLABX/v3.00.02-beta/mplab_ide/mplab_ide/modules/../../bin/ +# Adding MPLAB X bin directory to path. +PATH:=C:/Program Files (x86)/Microchip/MPLABX/v3.00.02-beta/mplab_ide/mplab_ide/modules/../../bin/:$(PATH) +# Path to java used to run MPLAB X when this makefile was created +MP_JAVA_PATH="C:\Program Files (x86)\Microchip\MPLABX\v3.00.02-beta\sys\java\jre1.7.0_67/bin/" +OS_CURRENT="$(shell uname -s)" +MP_CC="C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" +# MP_CPPC is not defined +# MP_BC is not defined +MP_AS="C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" +# MP_LD is not defined +# MP_AR is not defined +DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files (x86)/Microchip/MPLABX/v3.00.02-beta/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" +MP_CC_DIR="C:\Program Files (x86)\Microchip\xc8\v1.34\bin" +# MP_CPPC_DIR is not defined +# MP_BC_DIR is not defined +MP_AS_DIR="C:\Program Files (x86)\Microchip\xc8\v1.34\bin" +# MP_LD_DIR is not defined +# MP_AR_DIR is not defined +# MP_BC_DIR is not defined diff --git a/nbproject/Makefile-variables.mk b/nbproject/Makefile-variables.mk new file mode 100644 index 0000000..2bdb130 --- /dev/null +++ b/nbproject/Makefile-variables.mk @@ -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=Table_infini.X.production.hex +CND_ARTIFACT_PATH_default=dist/default/production/Table_infini.X.production.hex +CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package +CND_PACKAGE_NAME_default=tableinfini.x.tar +CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/tableinfini.x.tar diff --git a/nbproject/Package-default.bash b/nbproject/Package-default.bash new file mode 100644 index 0000000..6ae5332 --- /dev/null +++ b/nbproject/Package-default.bash @@ -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}/Table_infini.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +OUTPUT_BASENAME=Table_infini.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +PACKAGE_TOP_DIR=tableinfini.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}/tableinfini.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/tableinfini.x.tar +cd ${TMPDIR} +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/tableinfini.x.tar * +checkReturnCode + +# Cleanup +cd "${TOP}" +rm -rf ${TMPDIR} diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml new file mode 100644 index 0000000..1233d5d --- /dev/null +++ b/nbproject/configurations.xml @@ -0,0 +1,142 @@ + + + + + + + + + save_old.c + save_old2.c + main_table_infini.c + save_old_old.c + save_old3.c + + + Makefile + + + + . + + Makefile + + + + localhost + PIC16F87 + + + Simulator + XC8 + 1.34 + 3 + + + + + + + + + + false + false + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/private/SuppressibleMessageMemo.properties b/nbproject/private/SuppressibleMessageMemo.properties new file mode 100644 index 0000000..4c1d389 --- /dev/null +++ b/nbproject/private/SuppressibleMessageMemo.properties @@ -0,0 +1,25 @@ +# +#Mon Dec 14 11:52:54 CET 2015 +mdbDebugger/MEMORY_VIEW_LAST_HW_BP_RESOURCE_WARN=false +pkobskde/CHECK_4_HIGH_VOLTAGE_VPP=false +pk3/DEVID_MISMATCH=false +mdbDebugger/NO_HW_BP_RESOURCES_WARN=false +mdbDebugger/NO_HW_COMBINER_RESOURCES_WARNING=false +icd3/CAL_WARNING=false +mdbDebugger/MEMORY_VIEW_NO_HW_BP_RESOURCES_WARN=false +pk3/CHECK_CLOCK=false +mdbDebugger/LAST_HW_BP_RESOURCE_WARN=false +pk3/CHECK_4_HIGH_VOLTAGE_VPP=false +icd3/DEVID_MISMATCH=false +realice/DEVID_MISMATCH=false +realice/CHECK_CLOCK=false +pkoblicdbgr/DEVID_MISMATCH=false +pkoblicdbgr/CHECK_CLOCK=false +pkobskde/DEVID_MISMATCH=false +icd3/CHECK_CLOCK=false +realice/CHECK_4_HIGH_VOLTAGE_VPP=false +pkoblicdbgr/CHECK_4_HIGH_VOLTAGE_VPP=false +pk3/CAL_WARNING=false +icd3/CHECK_4_HIGH_VOLTAGE_VPP=false +pkobskde/CHECK_CLOCK=false +realice/CAL_WARNING=false diff --git a/nbproject/private/configurations.xml b/nbproject/private/configurations.xml new file mode 100644 index 0000000..f8e3346 --- /dev/null +++ b/nbproject/private/configurations.xml @@ -0,0 +1,25 @@ + + + Makefile + 0 + + + + C:\Program Files (x86)\Microchip\xc8\v1.34\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..ac1f837 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,10 @@ + + + + + + file:/C:/Users/micka/Documents/PIC/Table_infini.X/main_table_infini.c + file:/C:/Users/micka/Documents/PIC/Table_infini.X/newmain.c + + + diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..68eb828 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,17 @@ + + + com.microchip.mplab.nbide.embedded.makeproject + + + Table_infini + 272ab664-9d70-442d-9546-fe0346c4da6b + 0 + c + + + + ISO-8859-1 + + + +