diff options
author | Nao Pross <naopross@thearcway.org> | 2018-05-04 18:27:12 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-05-04 18:27:12 +0200 |
commit | 5e8e628da03121323351e54e6866826288e4c4bd (patch) | |
tree | 4b3476cec9c295b5c633ea6b801815a131e2780b /nbproject | |
parent | Add templated generic implementaions for uart, rename uart1.tpp to uart.tpp (diff) | |
download | SAMLiquidSmoke-5e8e628da03121323351e54e6866826288e4c4bd.tar.gz SAMLiquidSmoke-5e8e628da03121323351e54e6866826288e4c4bd.zip |
Implement most of basic HAL
Oscillator:
The oscillator is configured correctly.
Interrupts:
RX uart interrupts work.
The global interrupt vector table is enabled.
UART:
RX features work.
Diffstat (limited to '')
-rw-r--r-- | nbproject/Makefile-default.mk | 74 | ||||
-rw-r--r-- | nbproject/Makefile-genesis.properties | 4 | ||||
-rw-r--r-- | nbproject/configurations.xml | 27 |
3 files changed, 46 insertions, 59 deletions
diff --git a/nbproject/Makefile-default.mk b/nbproject/Makefile-default.mk index 4ebbf6b..920c95b 100644 --- a/nbproject/Makefile-default.mk +++ b/nbproject/Makefile-default.mk @@ -57,17 +57,17 @@ OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE} DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} # Source Files Quoted if spaced -SOURCEFILES_QUOTED_IF_SPACED=mcc_generated_files/interrupt_manager.c mcc_generated_files/mcc.c mcc_generated_files/pin_manager.c mcc_generated_files/uart1.c main.cpp +SOURCEFILES_QUOTED_IF_SPACED=main.cpp hal/hwconfig.cpp # Object Files Quoted if spaced -OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/mcc_generated_files/interrupt_manager.o ${OBJECTDIR}/mcc_generated_files/mcc.o ${OBJECTDIR}/mcc_generated_files/pin_manager.o ${OBJECTDIR}/mcc_generated_files/uart1.o ${OBJECTDIR}/main.o -POSSIBLE_DEPFILES=${OBJECTDIR}/mcc_generated_files/interrupt_manager.o.d ${OBJECTDIR}/mcc_generated_files/mcc.o.d ${OBJECTDIR}/mcc_generated_files/pin_manager.o.d ${OBJECTDIR}/mcc_generated_files/uart1.o.d ${OBJECTDIR}/main.o.d +OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.o ${OBJECTDIR}/hal/hwconfig.o +POSSIBLE_DEPFILES=${OBJECTDIR}/main.o.d ${OBJECTDIR}/hal/hwconfig.o.d # Object Files -OBJECTFILES=${OBJECTDIR}/mcc_generated_files/interrupt_manager.o ${OBJECTDIR}/mcc_generated_files/mcc.o ${OBJECTDIR}/mcc_generated_files/pin_manager.o ${OBJECTDIR}/mcc_generated_files/uart1.o ${OBJECTDIR}/main.o +OBJECTFILES=${OBJECTDIR}/main.o ${OBJECTDIR}/hal/hwconfig.o # Source Files -SOURCEFILES=mcc_generated_files/interrupt_manager.c mcc_generated_files/mcc.c mcc_generated_files/pin_manager.c mcc_generated_files/uart1.c main.cpp +SOURCEFILES=main.cpp hal/hwconfig.cpp CFLAGS= @@ -106,55 +106,7 @@ endif # ------------------------------------------------------------------------------------ # Rules for buildStep: compile ifeq ($(TYPE_IMAGE), DEBUG_RUN) -${OBJECTDIR}/mcc_generated_files/interrupt_manager.o: mcc_generated_files/interrupt_manager.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}/mcc_generated_files" - @${RM} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.o.d - @${RM} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.o - @${FIXDEPS} "${OBJECTDIR}/mcc_generated_files/interrupt_manager.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/mcc_generated_files/interrupt_manager.o.d" -o ${OBJECTDIR}/mcc_generated_files/interrupt_manager.o mcc_generated_files/interrupt_manager.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) - -${OBJECTDIR}/mcc_generated_files/mcc.o: mcc_generated_files/mcc.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}/mcc_generated_files" - @${RM} ${OBJECTDIR}/mcc_generated_files/mcc.o.d - @${RM} ${OBJECTDIR}/mcc_generated_files/mcc.o - @${FIXDEPS} "${OBJECTDIR}/mcc_generated_files/mcc.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/mcc_generated_files/mcc.o.d" -o ${OBJECTDIR}/mcc_generated_files/mcc.o mcc_generated_files/mcc.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) - -${OBJECTDIR}/mcc_generated_files/pin_manager.o: mcc_generated_files/pin_manager.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}/mcc_generated_files" - @${RM} ${OBJECTDIR}/mcc_generated_files/pin_manager.o.d - @${RM} ${OBJECTDIR}/mcc_generated_files/pin_manager.o - @${FIXDEPS} "${OBJECTDIR}/mcc_generated_files/pin_manager.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/mcc_generated_files/pin_manager.o.d" -o ${OBJECTDIR}/mcc_generated_files/pin_manager.o mcc_generated_files/pin_manager.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) - -${OBJECTDIR}/mcc_generated_files/uart1.o: mcc_generated_files/uart1.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}/mcc_generated_files" - @${RM} ${OBJECTDIR}/mcc_generated_files/uart1.o.d - @${RM} ${OBJECTDIR}/mcc_generated_files/uart1.o - @${FIXDEPS} "${OBJECTDIR}/mcc_generated_files/uart1.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/mcc_generated_files/uart1.o.d" -o ${OBJECTDIR}/mcc_generated_files/uart1.o mcc_generated_files/uart1.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) - else -${OBJECTDIR}/mcc_generated_files/interrupt_manager.o: mcc_generated_files/interrupt_manager.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}/mcc_generated_files" - @${RM} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.o.d - @${RM} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.o - @${FIXDEPS} "${OBJECTDIR}/mcc_generated_files/interrupt_manager.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/mcc_generated_files/interrupt_manager.o.d" -o ${OBJECTDIR}/mcc_generated_files/interrupt_manager.o mcc_generated_files/interrupt_manager.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) - -${OBJECTDIR}/mcc_generated_files/mcc.o: mcc_generated_files/mcc.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}/mcc_generated_files" - @${RM} ${OBJECTDIR}/mcc_generated_files/mcc.o.d - @${RM} ${OBJECTDIR}/mcc_generated_files/mcc.o - @${FIXDEPS} "${OBJECTDIR}/mcc_generated_files/mcc.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/mcc_generated_files/mcc.o.d" -o ${OBJECTDIR}/mcc_generated_files/mcc.o mcc_generated_files/mcc.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) - -${OBJECTDIR}/mcc_generated_files/pin_manager.o: mcc_generated_files/pin_manager.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}/mcc_generated_files" - @${RM} ${OBJECTDIR}/mcc_generated_files/pin_manager.o.d - @${RM} ${OBJECTDIR}/mcc_generated_files/pin_manager.o - @${FIXDEPS} "${OBJECTDIR}/mcc_generated_files/pin_manager.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/mcc_generated_files/pin_manager.o.d" -o ${OBJECTDIR}/mcc_generated_files/pin_manager.o mcc_generated_files/pin_manager.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) - -${OBJECTDIR}/mcc_generated_files/uart1.o: mcc_generated_files/uart1.c nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}/mcc_generated_files" - @${RM} ${OBJECTDIR}/mcc_generated_files/uart1.o.d - @${RM} ${OBJECTDIR}/mcc_generated_files/uart1.o - @${FIXDEPS} "${OBJECTDIR}/mcc_generated_files/uart1.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/mcc_generated_files/uart1.o.d" -o ${OBJECTDIR}/mcc_generated_files/uart1.o mcc_generated_files/uart1.c -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) - endif # ------------------------------------------------------------------------------------ @@ -166,6 +118,12 @@ ${OBJECTDIR}/main.o: main.cpp nbproject/Makefile-${CND_CONF}.mk @${RM} ${OBJECTDIR}/main.o @${FIXDEPS} "${OBJECTDIR}/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c++ -c -mprocessor=$(MP_PROCESSOR_OPTION) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/main.o.d" -o ${OBJECTDIR}/main.o main.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) +${OBJECTDIR}/hal/hwconfig.o: hal/hwconfig.cpp nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}/hal" + @${RM} ${OBJECTDIR}/hal/hwconfig.o.d + @${RM} ${OBJECTDIR}/hal/hwconfig.o + @${FIXDEPS} "${OBJECTDIR}/hal/hwconfig.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -DPKOBSKDEPlatformTool=1 -fframe-base-loclist -x c++ -c -mprocessor=$(MP_PROCESSOR_OPTION) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/hal/hwconfig.o.d" -o ${OBJECTDIR}/hal/hwconfig.o hal/hwconfig.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + else ${OBJECTDIR}/main.o: main.cpp nbproject/Makefile-${CND_CONF}.mk @${MKDIR} "${OBJECTDIR}" @@ -173,6 +131,12 @@ ${OBJECTDIR}/main.o: main.cpp nbproject/Makefile-${CND_CONF}.mk @${RM} ${OBJECTDIR}/main.o @${FIXDEPS} "${OBJECTDIR}/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -x c++ -c -mprocessor=$(MP_PROCESSOR_OPTION) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/main.o.d" -o ${OBJECTDIR}/main.o main.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) +${OBJECTDIR}/hal/hwconfig.o: hal/hwconfig.cpp nbproject/Makefile-${CND_CONF}.mk + @${MKDIR} "${OBJECTDIR}/hal" + @${RM} ${OBJECTDIR}/hal/hwconfig.o.d + @${RM} ${OBJECTDIR}/hal/hwconfig.o + @${FIXDEPS} "${OBJECTDIR}/hal/hwconfig.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CPPC} $(MP_EXTRA_CC_PRE) -g -x c++ -c -mprocessor=$(MP_PROCESSOR_OPTION) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/hal/hwconfig.o.d" -o ${OBJECTDIR}/hal/hwconfig.o hal/hwconfig.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + endif # ------------------------------------------------------------------------------------ @@ -180,12 +144,12 @@ endif ifeq ($(TYPE_IMAGE), DEBUG_RUN) dist/${CND_CONF}/${IMAGE_TYPE}/LiquidSmoke.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} - ${MP_CPPC} $(MP_EXTRA_LD_PRE) -g -mdebugger -DPKOBSKDEPlatformTool=1 -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/LiquidSmoke.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -mreserve=data@0x0:0x1FC -mreserve=boot@0x1FC02000:0x1FC02FEF -mreserve=boot@0x1FC02000:0x1FC0275F -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,-D=__DEBUG_D,--defsym=PKOBSKDEPlatformTool=1,--defsym=_min_heap_size=1K,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml + ${MP_CPPC} $(MP_EXTRA_LD_PRE) -g -mdebugger -DPKOBSKDEPlatformTool=1 -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/LiquidSmoke.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -mreserve=data@0x0:0x1FC -mreserve=boot@0x1FC02000:0x1FC02FEF -mreserve=boot@0x1FC02000:0x1FC0275F -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,-D=__DEBUG_D,--defsym=PKOBSKDEPlatformTool=1,--defsym=_min_heap_size=32K,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml else dist/${CND_CONF}/${IMAGE_TYPE}/LiquidSmoke.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} - ${MP_CPPC} $(MP_EXTRA_LD_PRE) -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/LiquidSmoke.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=_min_heap_size=1K,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml + ${MP_CPPC} $(MP_EXTRA_LD_PRE) -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/LiquidSmoke.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=_min_heap_size=32K,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml ${MP_CC_DIR}/xc32-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/LiquidSmoke.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} endif diff --git a/nbproject/Makefile-genesis.properties b/nbproject/Makefile-genesis.properties index 48b997c..a13ad0c 100644 --- a/nbproject/Makefile-genesis.properties +++ b/nbproject/Makefile-genesis.properties @@ -1,8 +1,8 @@ # -#Fri May 04 00:51:30 CEST 2018 +#Fri May 04 18:20:47 CEST 2018 default.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=fcf9db1a3d46b4ef4e0a46afcbf02251 default.languagetoolchain.dir=/opt/microchip/xc32/v2.05/bin -configurations-xml=662763a5f521e2ac61177edbdd1d9879 +configurations-xml=1b1713a10a7ac2a1a8df14051c73140a com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=c8c2915d32f5d7e4be49831bc9827ab0 default.languagetoolchain.version=2.05 host.platform=linux diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml index c64a84e..bbc3864 100644 --- a/nbproject/configurations.xml +++ b/nbproject/configurations.xml @@ -7,6 +7,8 @@ <logicalFolder name="f1" displayName="hal" projectFiles="true"> <itemPath>hal/pin.hpp</itemPath> <itemPath>hal/uart.hpp</itemPath> + <itemPath>hal/hwconfig.hpp</itemPath> + <itemPath>hal/confbits.hpp</itemPath> </logicalFolder> <logicalFolder name="MCC Generated Files" displayName="MCC Generated Files" @@ -26,7 +28,8 @@ projectFiles="true"> <logicalFolder name="hal" displayName="hal" projectFiles="true"> <itemPath>hal/pin.tpp</itemPath> - <itemPath>hal/uart1.tpp</itemPath> + <itemPath>hal/uart.tpp</itemPath> + <itemPath>hal/hwconfig.cpp</itemPath> </logicalFolder> <logicalFolder name="MCC Generated Files" displayName="MCC Generated Files" @@ -154,7 +157,7 @@ <property key="generate-16-bit-code" value="false"/> <property key="generate-cross-reference-file" value="false"/> <property key="generate-micro-compressed-code" value="false"/> - <property key="heap-size" value="1K"/> + <property key="heap-size" value="32K"/> <property key="input-libraries" value=""/> <property key="kseg-length" value=""/> <property key="kseg-origin" value=""/> @@ -238,6 +241,26 @@ <property key="programoptions.usehighvoltageonmclr" value="false"/> <property key="programoptions.uselvpprogramming" value="true"/> </PKOBSKDEPlatformTool> + <item path="mcc_generated_files/interrupt_manager.c" + ex="true" + overriding="false"> + </item> + <item path="mcc_generated_files/interrupt_manager.h" + ex="true" + overriding="false"> + </item> + <item path="mcc_generated_files/mcc.c" ex="true" overriding="false"> + </item> + <item path="mcc_generated_files/mcc.h" ex="true" overriding="false"> + </item> + <item path="mcc_generated_files/pin_manager.c" ex="true" overriding="false"> + </item> + <item path="mcc_generated_files/pin_manager.h" ex="true" overriding="false"> + </item> + <item path="mcc_generated_files/uart1.c" ex="true" overriding="false"> + </item> + <item path="mcc_generated_files/uart1.h" ex="true" overriding="false"> + </item> </conf> </confs> </configurationDescriptor> |