From e9f3d4a56d10de933c9c22646a7b084ec3cff20f Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Fri, 24 Apr 2020 13:16:17 -0500 Subject: Add MORE stuff I forget to commit --- HW4.X/2020-04-14 18-07.pdf | Bin 0 -> 832828 bytes HW4.X/HW4.zip | Bin 0 -> 740790 bytes HW4.X/Makefile | 113 +++++ HW4.X/disc08_UART.c | 113 +++++ HW4.X/disc08_uart_in_1.txt | 29 ++ HW4.X/disc08_uart_in_2.txt | 3 + HW4.X/dist/default/debug/memoryfile.xml | 18 + HW4.X/hw4_uart_caesar_cipher_in.txt | 7 + HW4.X/hw4_uart_caesar_cipher_strap012.c | 109 +++++ HW4.X/hw4_uart_caesar_cipher_strap012.png | Bin 0 -> 44236 bytes HW4.X/nbproject/Makefile-default.mk | 161 +++++++ HW4.X/nbproject/Makefile-genesis.properties | 10 + HW4.X/nbproject/Makefile-impl.mk | 69 +++ HW4.X/nbproject/Makefile-local-default.mk | 38 ++ HW4.X/nbproject/Makefile-variables.mk | 13 + HW4.X/nbproject/Package-default.bash | 73 ++++ HW4.X/nbproject/configurations.xml | 625 ++++++++++++++++++++++++++++ HW4.X/nbproject/private/configurations.xml | 25 ++ HW4.X/nbproject/private/private.xml | 7 + HW4.X/nbproject/project.xml | 29 ++ 20 files changed, 1442 insertions(+) create mode 100644 HW4.X/2020-04-14 18-07.pdf create mode 100644 HW4.X/HW4.zip create mode 100644 HW4.X/Makefile create mode 100644 HW4.X/disc08_UART.c create mode 100644 HW4.X/disc08_uart_in_1.txt create mode 100644 HW4.X/disc08_uart_in_2.txt create mode 100644 HW4.X/dist/default/debug/memoryfile.xml create mode 100644 HW4.X/hw4_uart_caesar_cipher_in.txt create mode 100644 HW4.X/hw4_uart_caesar_cipher_strap012.c create mode 100644 HW4.X/hw4_uart_caesar_cipher_strap012.png create mode 100644 HW4.X/nbproject/Makefile-default.mk create mode 100644 HW4.X/nbproject/Makefile-genesis.properties create mode 100644 HW4.X/nbproject/Makefile-impl.mk create mode 100644 HW4.X/nbproject/Makefile-local-default.mk create mode 100644 HW4.X/nbproject/Makefile-variables.mk create mode 100644 HW4.X/nbproject/Package-default.bash create mode 100644 HW4.X/nbproject/configurations.xml create mode 100644 HW4.X/nbproject/private/configurations.xml create mode 100644 HW4.X/nbproject/private/private.xml create mode 100644 HW4.X/nbproject/project.xml (limited to 'HW4.X') diff --git a/HW4.X/2020-04-14 18-07.pdf b/HW4.X/2020-04-14 18-07.pdf new file mode 100644 index 0000000..ec09db0 Binary files /dev/null and b/HW4.X/2020-04-14 18-07.pdf differ diff --git a/HW4.X/HW4.zip b/HW4.X/HW4.zip new file mode 100644 index 0000000..bf1fb70 Binary files /dev/null and b/HW4.X/HW4.zip differ diff --git a/HW4.X/Makefile b/HW4.X/Makefile new file mode 100644 index 0000000..fca8e2c --- /dev/null +++ b/HW4.X/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/HW4.X/disc08_UART.c b/HW4.X/disc08_UART.c new file mode 100644 index 0000000..c0efdf5 --- /dev/null +++ b/HW4.X/disc08_UART.c @@ -0,0 +1,113 @@ +//#include +#include +#include + +// PIC24FJ64GA002 Configuration Bit Settings +// CW1: FLASH CONFIGURATION WORD 1 (see PIC24 Family Reference Manual 24.1) +#pragma config ICS = PGx1 // Comm Channel Select (Emulator EMUC1/EMUD1 pins are shared with PGC1/PGD1) +#pragma config FWDTEN = OFF // Watchdog Timer Enable (Watchdog Timer is disabled) +#pragma config GWRP = OFF // General Code Segment Write Protect (Writes to program memory are allowed) +#pragma config GCP = OFF // General Code Segment Code Protect (Code protection is disabled) +#pragma config JTAGEN = OFF // JTAG Port Enable (JTAG port is disabled) + + +// CW2: FLASH CONFIGURATION WORD 2 (see PIC24 Family Reference Manual 24.1) +#pragma config POSCMOD = NONE // Primary Oscillator Select (Primary oscillator disabled. + // Primary Oscillator refers to an external osc connected to the OSC1 and OSC2 pins) +#pragma config I2C1SEL = PRI // I2C1 Pin Location Select (Use default SCL1/SDA1 pins) +#pragma config IOL1WAY = OFF // IOLOCK Protection (IOLOCK may be changed via unlocking seq) +#pragma config OSCIOFNC = ON // OSC2/CLKO/RC15 functions as port I/O (RC15) +#pragma config FCKSM = CSECME // Clock Switching and Monitor (Clock switching is enabled, + // Fail-Safe Clock Monitor is enabled) +#pragma config FNOSC = FRCPLL // Oscillator Select (Fast RC Oscillator with PLL module (FRCPLL)) + +volatile unsigned char buffer[64]; +volatile unsigned char front = 0; +volatile unsigned char back = 0; + +void __attribute__((__interrupt__,__auto_psv__)) _U1RXInterrupt(void) +{ + IFS0bits.U1RXIF = 0; + buffer[front++] = U1RXREG; + front &= 63; +} + +void PPutch(const unsigned char c) +{ + while (!IFS0bits.U1TXIF) ; + IFS0bits.U1TXIF = 0; + if (c >= 65 && c <= 90) + U1TXREG = (c - 65 + 3) % 26 + 65; + else + U1TXREG = c; + +} + +unsigned char PGetch(void) +{ + unsigned char x; + + while (front == back) ; + x = buffer[back++]; + back &= 63; + return x; +} + +void setup(void) +{ + CLKDIVbits.RCDIV = 0; + AD1PCFG = 0x9fff; // For digital I/O. + + // I think the following two lines are irrelevant. The UART doc + // Page 3, when describing the UARTEN bit in UxMODE says that when UARTEN + // is set, TRISx are ignored and instead UEN and UTXEN control pins. + _TRISB6 = 0; // U1TX output + _TRISB10 = 1; // U1RX input + + U1MODE = 0; // UEN<1:0> bits control the pins + // U1BRG = 34; // 115200 baud, + // U1MODEbits.BRGH = 1; + U1MODEbits.BRGH = 0; + U1BRG = 25; // 38400 baud (check the calculation with the datasheet) + U1MODEbits.UEN = 0; + U1MODEbits.UARTEN = 1; + U1STAbits.UTXEN = 1; + + // Peripheral Pin Select + __builtin_write_OSCCONL(OSCCON & 0xbf); // unlock PPS + _RP6R = 0x0003; //RB6->UART1:U1TX; See Table 10-3 on P109 of the datasheet + _U1RXR = 10; //RB10->UART1:U1RX; + __builtin_write_OSCCONL(OSCCON | 0x40); // lock PPS + + IFS0bits.U1RXIF = 0; + IEC0bits.U1RXIE = 1; +} + +int main(int argc, char *argv[]) +{ + + setup(); + + int i; + + // waste some time + for (i = 0; i < 30000; i++) i = i; + + // transmit data on UART +// for (i = ' '; i < 0x7f; i++) +// PPutch(i); + PPutch(0x0D); // new line characters + PPutch(0x0A); + + while (1) + { + unsigned int x; + + x = PGetch(); + if (x>='a' && x<='z') + x += 'A' - 'a'; + PPutch(x); + } + + return 0; // never reached (we hope) +} diff --git a/HW4.X/disc08_uart_in_1.txt b/HW4.X/disc08_uart_in_1.txt new file mode 100644 index 0000000..a657647 --- /dev/null +++ b/HW4.X/disc08_uart_in_1.txt @@ -0,0 +1,29 @@ +wait 100 ms + +42 + +wait 10 ms + +34 + +wait 20 ms + +3c + +wait 1 ms + +0D 0A + +wait 200 ms + +"This is a message put in via a message file and fed as UART input." + +wait 1 ms + +0D 0A + +"The answer is.... 42!" +wait 1 ms + +0D 0A + diff --git a/HW4.X/disc08_uart_in_2.txt b/HW4.X/disc08_uart_in_2.txt new file mode 100644 index 0000000..45e3473 --- /dev/null +++ b/HW4.X/disc08_uart_in_2.txt @@ -0,0 +1,3 @@ +wait 1 ms + +"123456789a123456789b123456789c d e f g h i j k " \ No newline at end of file diff --git a/HW4.X/dist/default/debug/memoryfile.xml b/HW4.X/dist/default/debug/memoryfile.xml new file mode 100644 index 0000000..17d0980 --- /dev/null +++ b/HW4.X/dist/default/debug/memoryfile.xml @@ -0,0 +1,18 @@ + + + + + + bytes + 8192 + 66 + 8126 + + + bytes + 65274 + 807 + 64467 + + + diff --git a/HW4.X/hw4_uart_caesar_cipher_in.txt b/HW4.X/hw4_uart_caesar_cipher_in.txt new file mode 100644 index 0000000..f87482e --- /dev/null +++ b/HW4.X/hw4_uart_caesar_cipher_in.txt @@ -0,0 +1,7 @@ +wait 200 ms + +"QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD" + +wait 1 ms + +0D 0A diff --git a/HW4.X/hw4_uart_caesar_cipher_strap012.c b/HW4.X/hw4_uart_caesar_cipher_strap012.c new file mode 100644 index 0000000..af2e50e --- /dev/null +++ b/HW4.X/hw4_uart_caesar_cipher_strap012.c @@ -0,0 +1,109 @@ +#include +#include +#include + +// PIC24FJ64GA002 Configuration Bit Settings +// CW1: FLASH CONFIGURATION WORD 1 (see PIC24 Family Reference Manual 24.1) +#pragma config ICS = PGx1 // Comm Channel Select (Emulator EMUC1/EMUD1 pins are shared with PGC1/PGD1) +#pragma config FWDTEN = OFF // Watchdog Timer Enable (Watchdog Timer is disabled) +#pragma config GWRP = OFF // General Code Segment Write Protect (Writes to program memory are allowed) +#pragma config GCP = OFF // General Code Segment Code Protect (Code protection is disabled) +#pragma config JTAGEN = OFF // JTAG Port Enable (JTAG port is disabled) + + +// CW2: FLASH CONFIGURATION WORD 2 (see PIC24 Family Reference Manual 24.1) +#pragma config POSCMOD = NONE // Primary Oscillator Select (Primary oscillator disabled. + // Primary Oscillator refers to an external osc connected to the OSC1 and OSC2 pins) +#pragma config I2C1SEL = PRI // I2C1 Pin Location Select (Use default SCL1/SDA1 pins) +#pragma config IOL1WAY = OFF // IOLOCK Protection (IOLOCK may be changed via unlocking seq) +#pragma config OSCIOFNC = ON // OSC2/CLKO/RC15 functions as port I/O (RC15) +#pragma config FCKSM = CSECME // Clock Switching and Monitor (Clock switching is enabled, + // Fail-Safe Clock Monitor is enabled) +#pragma config FNOSC = FRCPLL // Oscillator Select (Fast RC Oscillator with PLL module (FRCPLL)) + +volatile unsigned char buffer[64]; +volatile unsigned char front = 0; +volatile unsigned char back = 0; + +void __attribute__((__interrupt__,__auto_psv__)) _U1RXInterrupt(void) +{ + IFS0bits.U1RXIF = 0; + buffer[front++] = U1RXREG; + front &= 63; +} + +void PPutch(const unsigned char c) +{ + while (!IFS0bits.U1TXIF) ; + IFS0bits.U1TXIF = 0; + U1TXREG = ((c+3-65) %26) + 65; +} + +unsigned char PGetch(void) +{ + unsigned char x; + + while (front == back) ; + x = buffer[back++]; + back &= 63; + return x; +} + +void setup(void) +{ + CLKDIVbits.RCDIV = 0; + AD1PCFG = 0x9fff; // For digital I/O. + + // I think the following two lines are irrelevant. The UART doc + // Page 3, when describing the UARTEN bit in UxMODE says that when UARTEN + // is set, TRISx are ignored and instead UEN and UTXEN control pins. + _TRISB6 = 0; // U1TX output + _TRISB10 = 1; // U1RX input + + U1MODE = 0; // UEN<1:0> bits control the pins + // U1BRG = 34; // 115200 baud, + // U1MODEbits.BRGH = 1; + U1MODEbits.BRGH = 0; + U1BRG = 25; // 38400 baud (check the calculation with the datasheet) + U1MODEbits.UEN = 0; + U1MODEbits.UARTEN = 1; + U1STAbits.UTXEN = 1; + + // Peripheral Pin Select + __builtin_write_OSCCONL(OSCCON & 0xbf); // unlock PPS + _RP6R = 0x0003; //RB6->UART1:U1TX; See Table 10-3 on P109 of the datasheet + _U1RXR = 10; //RB10->UART1:U1RX; + __builtin_write_OSCCONL(OSCCON | 0x40); // lock PPS + + IFS0bits.U1RXIF = 0; + IEC0bits.U1RXIE = 1; +} + +int main(int argc, char *argv[]) +{ + + setup(); + + int i; + + // waste some time + for (i = 0; i < 30000; i++) i = i; + + // transmit data on UART +// for (i = ' '; i < 0x7f; i++) +// PPutch(i); + PPutch(0x0D); // new line characters + PPutch(0x0A); + + while (1) + { + unsigned int x; + + x = PGetch(); + if (x>='a' && x<='z') + x += 'A' - 'a'; + PPutch(x); + } + + return 0; // never reached (we hope) +} \ No newline at end of file diff --git a/HW4.X/hw4_uart_caesar_cipher_strap012.png b/HW4.X/hw4_uart_caesar_cipher_strap012.png new file mode 100644 index 0000000..6d28588 Binary files /dev/null and b/HW4.X/hw4_uart_caesar_cipher_strap012.png differ diff --git a/HW4.X/nbproject/Makefile-default.mk b/HW4.X/nbproject/Makefile-default.mk new file mode 100644 index 0000000..2224aa5 --- /dev/null +++ b/HW4.X/nbproject/Makefile-default.mk @@ -0,0 +1,161 @@ +# +# 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}/HW4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +else +IMAGE_TYPE=production +OUTPUT_SUFFIX=hex +DEBUGGABLE_SUFFIX=elf +FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/HW4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +endif + +ifeq ($(COMPARE_BUILD), true) +COMPARISON_BUILD=-mafrlcsj +else +COMPARISON_BUILD= +endif + +ifdef SUB_IMAGE_ADDRESS +SUB_IMAGE_ADDRESS_COMMAND=--image-address $(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=disc08_UART.c + +# Object Files Quoted if spaced +OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/disc08_UART.o +POSSIBLE_DEPFILES=${OBJECTDIR}/disc08_UART.o.d + +# Object Files +OBJECTFILES=${OBJECTDIR}/disc08_UART.o + +# Source Files +SOURCEFILES=disc08_UART.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}/HW4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} + +MP_PROCESSOR_OPTION=24FJ64GA002 +MP_LINKER_FILE_OPTION=,--script=p24FJ64GA002.gld +# ------------------------------------------------------------------------------------ +# Rules for buildStep: compile +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +${OBJECTDIR}/disc08_UART.o: disc08_UART.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/disc08_UART.o.d + @${RM} ${OBJECTDIR}/disc08_UART.o + ${MP_CC} $(MP_EXTRA_CC_PRE) disc08_UART.c -o ${OBJECTDIR}/disc08_UART.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/disc08_UART.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_SIMULATOR=1 -omf=elf -DXPRJ_default=$(CND_CONF) -legacy-libc $(COMPARISON_BUILD) -O0 -msmart-io=1 -Wall -msfr-warn=off -mdfp=${DFP_DIR}/xc16 + @${FIXDEPS} "${OBJECTDIR}/disc08_UART.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ + +else +${OBJECTDIR}/disc08_UART.o: disc08_UART.c nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}" + @${RM} ${OBJECTDIR}/disc08_UART.o.d + @${RM} ${OBJECTDIR}/disc08_UART.o + ${MP_CC} $(MP_EXTRA_CC_PRE) disc08_UART.c -o ${OBJECTDIR}/disc08_UART.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/disc08_UART.o.d" -g -omf=elf -DXPRJ_default=$(CND_CONF) -legacy-libc $(COMPARISON_BUILD) -O0 -msmart-io=1 -Wall -msfr-warn=off -mdfp=${DFP_DIR}/xc16 + @${FIXDEPS} "${OBJECTDIR}/disc08_UART.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ + +endif + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: assemble +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +else +endif + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: assemblePreproc +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +else +endif + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: link +ifeq ($(TYPE_IMAGE), DEBUG_RUN) +dist/${CND_CONF}/${IMAGE_TYPE}/HW4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} + ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/HW4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -D__DEBUG=__DEBUG -D__MPLAB_DEBUGGER_SIMULATOR=1 -omf=elf -DXPRJ_default=$(CND_CONF) -legacy-libc $(COMPARISON_BUILD) -Wl,,,--defsym=__MPLAB_BUILD=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,-D__DEBUG=__DEBUG,--defsym=__MPLAB_DEBUGGER_SIMULATOR=1,$(MP_LINKER_FILE_OPTION),--stack=16,--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--no-force-link,--smart-io,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--report-mem,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml$(MP_EXTRA_LD_POST) -mdfp=${DFP_DIR}/xc16 + +else +dist/${CND_CONF}/${IMAGE_TYPE}/HW4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} + ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/HW4.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -omf=elf -DXPRJ_default=$(CND_CONF) -legacy-libc $(COMPARISON_BUILD) -Wl,,,--defsym=__MPLAB_BUILD=1,$(MP_LINKER_FILE_OPTION),--stack=16,--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--no-force-link,--smart-io,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--report-mem,--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml$(MP_EXTRA_LD_POST) -mdfp=${DFP_DIR}/xc16 + ${MP_CC_DIR}\\xc16-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/HW4.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -a -omf=elf -mdfp=${DFP_DIR}/xc16 + +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/HW4.X/nbproject/Makefile-genesis.properties b/HW4.X/nbproject/Makefile-genesis.properties new file mode 100644 index 0000000..45bbb35 --- /dev/null +++ b/HW4.X/nbproject/Makefile-genesis.properties @@ -0,0 +1,10 @@ +# +#Tue Apr 14 18:09:38 CDT 2020 +default.Pack.dfplocation=C\:\\Program Files (x86)\\Microchip\\MPLABX\\v5.35\\packs\\Microchip\\PIC24F-GA-GB_DFP\\1.2.101 +default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=859fc649e7017fd01769e2187e1537a7 +default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.50\\bin +configurations-xml=68d974e083f3738d22daa1f706138178 +com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=5db0f4d6bbe0ec2a1f1096ccfb9d7ad3 +default.languagetoolchain.version=1.50 +host.platform=windows +conf.ids=default diff --git a/HW4.X/nbproject/Makefile-impl.mk b/HW4.X/nbproject/Makefile-impl.mk new file mode 100644 index 0000000..0315398 --- /dev/null +++ b/HW4.X/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=HW4.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/HW4.X/nbproject/Makefile-local-default.mk b/HW4.X/nbproject/Makefile-local-default.mk new file mode 100644 index 0000000..c75d9df --- /dev/null +++ b/HW4.X/nbproject/Makefile-local-default.mk @@ -0,0 +1,38 @@ +# +# Generated Makefile - do not edit! +# +# +# This file contains information about the location of compilers and other tools. +# If you commmit this file into your revision control server, you will be able to +# to checkout the project and build it from the command line with make. However, +# if more than one person works on the same project, then this file might show +# conflicts since different users are bound to have compilers in different places. +# In that case you might choose to not commit this file and let MPLAB X recreate this file +# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at +# least once so the file gets created and the project can be built. Finally, you can also +# avoid using this file at all if you are only building from the command line with make. +# You can invoke make with the values of the macros: +# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... +# +SHELL=cmd.exe +PATH_TO_IDE_BIN=C:/Program Files (x86)/Microchip/MPLABX/v5.35/mplab_platform/platform/../mplab_ide/modules/../../bin/ +# Adding MPLAB X bin directory to path. +PATH:=C:/Program Files (x86)/Microchip/MPLABX/v5.35/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH) +# Path to java used to run MPLAB X when this makefile was created +MP_JAVA_PATH="C:\Program Files (x86)\Microchip\MPLABX\v5.35\sys\java\jre1.8.0_181/bin/" +OS_CURRENT="$(shell uname -s)" +MP_CC="C:\Program Files\Microchip\xc16\v1.50\bin\xc16-gcc.exe" +# MP_CPPC is not defined +# MP_BC is not defined +MP_AS="C:\Program Files\Microchip\xc16\v1.50\bin\xc16-as.exe" +MP_LD="C:\Program Files\Microchip\xc16\v1.50\bin\xc16-ld.exe" +MP_AR="C:\Program Files\Microchip\xc16\v1.50\bin\xc16-ar.exe" +DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files (x86)/Microchip/MPLABX/v5.35/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar" +MP_CC_DIR="C:\Program Files\Microchip\xc16\v1.50\bin" +# MP_CPPC_DIR is not defined +# MP_BC_DIR is not defined +MP_AS_DIR="C:\Program Files\Microchip\xc16\v1.50\bin" +MP_LD_DIR="C:\Program Files\Microchip\xc16\v1.50\bin" +MP_AR_DIR="C:\Program Files\Microchip\xc16\v1.50\bin" +# MP_BC_DIR is not defined +DFP_DIR="C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/PIC24F-GA-GB_DFP/1.2.101" diff --git a/HW4.X/nbproject/Makefile-variables.mk b/HW4.X/nbproject/Makefile-variables.mk new file mode 100644 index 0000000..ebf84b1 --- /dev/null +++ b/HW4.X/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=HW4.X.production.hex +CND_ARTIFACT_PATH_default=dist/default/production/HW4.X.production.hex +CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package +CND_PACKAGE_NAME_default=hw4.x.tar +CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/hw4.x.tar diff --git a/HW4.X/nbproject/Package-default.bash b/HW4.X/nbproject/Package-default.bash new file mode 100644 index 0000000..bde3a6d --- /dev/null +++ b/HW4.X/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}/HW4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +OUTPUT_BASENAME=HW4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} +PACKAGE_TOP_DIR=hw4.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}/hw4.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/hw4.x.tar +cd ${TMPDIR} +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/hw4.x.tar * +checkReturnCode + +# Cleanup +cd "${TOP}" +rm -rf ${TMPDIR} diff --git a/HW4.X/nbproject/configurations.xml b/HW4.X/nbproject/configurations.xml new file mode 100644 index 0000000..6f5b503 --- /dev/null +++ b/HW4.X/nbproject/configurations.xml @@ -0,0 +1,625 @@ + + + + + + + + + disc08_UART.c + + + Makefile + + + + . + + Makefile + + + + localhost + PIC24FJ64GA002 + + + Simulator + XC16 + 1.50 + 3 + + + + + + + + + + + + + false + false + + + + + + + false + + false + + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HW4.X/nbproject/private/configurations.xml b/HW4.X/nbproject/private/configurations.xml new file mode 100644 index 0000000..5adae45 --- /dev/null +++ b/HW4.X/nbproject/private/configurations.xml @@ -0,0 +1,25 @@ + + + Makefile + 0 + + + + C:\Program Files\Microchip\xc16\v1.50\bin + + place holder 1 + place holder 2 + + + + + true + 0 + 0 + 0 + + + + + + diff --git a/HW4.X/nbproject/private/private.xml b/HW4.X/nbproject/private/private.xml new file mode 100644 index 0000000..6807a2b --- /dev/null +++ b/HW4.X/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/HW4.X/nbproject/project.xml b/HW4.X/nbproject/project.xml new file mode 100644 index 0000000..32d1aa6 --- /dev/null +++ b/HW4.X/nbproject/project.xml @@ -0,0 +1,29 @@ + + + com.microchip.mplab.nbide.embedded.makeproject + + + HW4 + 72deec3c-ee4e-462c-9c3d-82ae14e25b90 + 0 + c + + + + ISO-8859-1 + + + . + + + + default + 2 + + + + false + + + + -- cgit v1.2.3