diff options
author | Nao Pross <naopross@thearcway.org> | 2018-05-04 00:16:36 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-05-04 00:16:36 +0200 |
commit | c3767ac0c6bcb9a1aed1e7b666061f829a371e1f (patch) | |
tree | 36d1339fb999c066f424b8f03707e9a996aff02a | |
parent | Defined Heap size (diff) | |
download | SAMLiquidSmoke-c3767ac0c6bcb9a1aed1e7b666061f829a371e1f.tar.gz SAMLiquidSmoke-c3767ac0c6bcb9a1aed1e7b666061f829a371e1f.zip |
Start own HAL implementation based on MCC's generated files
Other changes:
- Undo conversion of MCC files to C++
- Delete old Led implementation
-rw-r--r-- | Led.cpp | 34 | ||||
-rw-r--r-- | Led.hpp | 34 | ||||
-rw-r--r-- | hal/pin.hpp | 23 | ||||
-rw-r--r-- | hal/pin.tpp | 30 | ||||
-rw-r--r-- | hal/uart.hpp | 87 | ||||
-rw-r--r-- | hal/uart1.tpp | 45 | ||||
-rw-r--r-- | main.cpp | 43 | ||||
-rw-r--r-- | mcc_generated_files/interrupt_manager.c (renamed from mcc_generated_files/interrupt_manager.cpp) | 7 | ||||
-rw-r--r-- | mcc_generated_files/interrupt_manager.h (renamed from mcc_generated_files/interrupt_manager.hpp) | 8 | ||||
-rw-r--r-- | mcc_generated_files/mcc.c (renamed from mcc_generated_files/mcc.cpp) | 18 | ||||
-rw-r--r-- | mcc_generated_files/mcc.h (renamed from mcc_generated_files/mcc.hpp) | 15 | ||||
-rw-r--r-- | mcc_generated_files/pin_manager.c (renamed from mcc_generated_files/pin_manager.cpp) | 11 | ||||
-rw-r--r-- | mcc_generated_files/pin_manager.h (renamed from mcc_generated_files/pin_manager.hpp) | 9 | ||||
-rw-r--r-- | mcc_generated_files/uart1.c (renamed from mcc_generated_files/uart1.cpp) | 22 | ||||
-rw-r--r-- | mcc_generated_files/uart1.h (renamed from mcc_generated_files/uart1.hpp) | 11 | ||||
-rw-r--r-- | nbproject/Makefile-default.mk | 76 | ||||
-rw-r--r-- | nbproject/Makefile-genesis.properties | 4 | ||||
-rw-r--r-- | nbproject/configurations.xml | 19 | ||||
-rw-r--r-- | nbproject/project.xml | 4 |
19 files changed, 324 insertions, 176 deletions
diff --git a/Led.cpp b/Led.cpp deleted file mode 100644 index a01bb54..0000000 --- a/Led.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * File: Led.cpp - * Author: _prossn - * - * Created on 10. aprile 2018, 16:07 - */ - -#include "Led.hpp" - -Led::Led(Color color) : _color(color) -{ - -} - - -Led::~Led() -{ - -} - -Led::Color Led::color() const -{ - return _color; -} - -void Led::set(bool state) -{ - _state = state; -} - -bool Led::state() const -{ - return _state; -} diff --git a/Led.hpp b/Led.hpp deleted file mode 100644 index b082d7d..0000000 --- a/Led.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * File: Led.hpp - * Author: _prossn - * - * Created on 10. aprile 2018, 16:07 - */ - -#ifndef LED_HPP -#define LED_HPP - -#include <string> - -class Led { -public: - enum class Color { - RED, GREEN, BLUE - }; - - Led(Color color); - Led() = delete; - virtual ~Led(); - - Color color() const; - - void set(bool status); - bool state() const; - -private: - bool _state; - Color _color; -}; - -#endif /* LED_HPP */ - diff --git a/hal/pin.hpp b/hal/pin.hpp new file mode 100644 index 0000000..9df22d4 --- /dev/null +++ b/hal/pin.hpp @@ -0,0 +1,23 @@ +/* + * File: pin.hpp + * Author: naopross + * + * Created on May 3, 2018, 8:02 PM + */ + +#ifndef PIN_HPP +#define PIN_HPP + +template<typename reg, unsigned bit> +class pin { +public: + pin(reg *r); + virtual ~pin(); + + void set(bool v); + +private: + reg *_register; +}; + +#endif /* PIN_HPP */
\ No newline at end of file diff --git a/hal/pin.tpp b/hal/pin.tpp new file mode 100644 index 0000000..4f6bd4a --- /dev/null +++ b/hal/pin.tpp @@ -0,0 +1,30 @@ +/* + * File: pin.cpp + * Author: naopross + * + * Created on May 3, 2018, 8:02 PM + */ + +#include "pin.hpp" + +template<typename reg, unsigned bit> +pin<reg, bit>::pin(reg *r) +{ + _register = r; +} + + +template<typename reg, unsigned bit> +pin<reg, bit>::~pin() +{ + +} + +template<typename reg, unsigned bit> +void pin<reg, bit>::set(bool v) +{ + if (v) + *reinterpret_cast<volatile uint8_t *>(_register) |= 1<<bit; + else + *reinterpret_cast<volatile uint8_t *>(_register) &= ~(1<<bit); +}
\ No newline at end of file diff --git a/hal/uart.hpp b/hal/uart.hpp new file mode 100644 index 0000000..179dd4a --- /dev/null +++ b/hal/uart.hpp @@ -0,0 +1,87 @@ +/* + * File: uart.hpp + * Author: naopross + * + * Created on May 2, 2018, 7:04 PM + */ + +#ifndef UART_HPP +#define UART_HPP + +#include <cstdint> +#include <cstddef> +#include <string> + +extern "C" { +void usart_1_isr(); +void usart_2_isr(); +void usart_3_isr(); +void usart_4_isr(); +} + +namespace uart +{ + const unsigned devices_count = 4; + + enum class status : unsigned int + { + rx_data_available = 1<<0, + rx_overrun_error = 1<<1, + framing_error = 1<<2, + parity_error = 1<<3, + receiver_ide = 1<<4, + tx_complete = 1<<8, + tx_full = 1<<9, + }; + + enum class transfer_status : unsigned int + { + rx_full = 1<<0, + rx_data_present = 1<<1, + rx_empty = 1<<2, + tx_full = 1<<3, + tx_empty = 1<<4, + }; + + std::string rx_buffer[devices_count]; + std::string tx_buffer[devices_count]; + + template<unsigned dev> + void initialize(); + + template<unsigned dev> + uint8_t peek(uint16_t offset); + + template<unsigned dev> + uint8_t read(void); + + template<unsigned dev> + unsigned read(uint8_t *buffer, const unsigned numbytes); + + template<unsigned dev> + void write(const uint8_t byte); + + template<unsigned dev> + unsigned write(const uint8_t *buffer, const unsigned numbytes); + + template<unsigned dev> + status status(); + + template<unsigned dev> + transfer_status tranfer_status(); + + template<unsigned dev> + unsigned rx_buffer_size(); + + template<unsigned dev> + unsigned tx_buffer_size(); + + template<unsigned dev> + bool rx_buffer_empty(); + + template<unsigned dev> + bool tx_buffer_full(); +} + +#endif /* UART_HPP */ + diff --git a/hal/uart1.tpp b/hal/uart1.tpp new file mode 100644 index 0000000..a8a32f0 --- /dev/null +++ b/hal/uart1.tpp @@ -0,0 +1,45 @@ +/* + * File: uart.cpp + * Author: naopross + * + * Created on May 2, 2018, 7:05 PM + */ + +#include "uart.hpp" + +extern "C" { +#include <proc/p32mx470f512h.h> +#include <sys/attribs.h> +} + + +void __ISR(_UART_1_VECTOR, IPL1AUTO) usart_1_isr() +{ + if (IFS1bits.U1RXIF) { + uart::rx_buffer[0].push_back(static_cast<uint8_t>(U1RXREG)); + } +} + +namespace uart +{ + template<> + void initialize<1>() + { + // STSEL 1S; IREN disabled; PDSEL 8N; RTSMD disabled; RXINV disabled; SIDL disabled; WAKE disabled; ABAUD disabled; LPBACK disabled; BRGH enabled; UEN TX_RX; ON enabled; + U1MODE = 0x8008; + // UTXISEL TX_ONE_CHAR; UTXINV disabled; ADDR 0; URXEN disabled; OERR disabled; ADM_EN disabled; URXISEL RX_ONE_CHAR; UTXBRK disabled; UTXEN disabled; ADDEN disabled; + U1STA = 0x0; + // U1TXREG 0; + U1TXREG = 0x0; + // BaudRate = 9600; Frequency = 1000000 Hz; BRG 25; + U1BRG = 0x19; + + IEC1bits.U1RXIE = 1; + + U1STAbits.UTXEN = 1; + U1STAbits.URXEN = 1; + + //Enabling UART + U1MODEbits.ON = 1; + } +}
\ No newline at end of file @@ -8,36 +8,29 @@ #include <stdio.h> #include <stdlib.h> -#include "mcc_generated_files/mcc.hpp" +// #include "mcc_generated_files/mcc.h" + +#include "hal/uart1.tpp" +#include "hal/pin.tpp" + +extern "C" { + #include <xc.h> +} + + -/* - * - */ int main(int argc, char** argv) { - char c; - - SYSTEM_Initialize(); - - LED1_SetHigh(); - LED2_SetHigh(); - LED3_SetHigh(); - - UART1_Write('S'); - UART1_Write('\n'); - UART1_Write('\r'); + LATE = 0x0000; + TRISE = 0x002f; + CNPUE = 0x0000; + + pin<decltype(LATEbits), 4> led1(&LATEbits); + led1.set(1); - while (1) { - while (UART1_ReceiveBufferIsEmpty()); - - c = UART1_Read(); - LED1_Toggle(); - - UART1_Write(c); - UART1_Write('\n'); - UART1_Write('\r'); + while (true) { } - return (EXIT_SUCCESS); + return 0; } diff --git a/mcc_generated_files/interrupt_manager.cpp b/mcc_generated_files/interrupt_manager.c index 32ca3f4..67c5d29 100644 --- a/mcc_generated_files/interrupt_manager.cpp +++ b/mcc_generated_files/interrupt_manager.c @@ -42,6 +42,9 @@ MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE
TERMS.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
Section: Includes
@@ -65,3 +68,7 @@ void INTERRUPT_Initialize (void) __builtin_mtc0(12,0,(__builtin_mfc0(12,0) | 0x0001));
}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/mcc_generated_files/interrupt_manager.hpp b/mcc_generated_files/interrupt_manager.h index a01aacd..83dac16 100644 --- a/mcc_generated_files/interrupt_manager.hpp +++ b/mcc_generated_files/interrupt_manager.h @@ -46,6 +46,10 @@ #ifndef _INTERRUPT_MANAGER_H
#define _INTERRUPT_MANAGER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
@Summary
Initializes the interrupt priorities of the PIC32MX470F512H
@@ -75,4 +79,8 @@ */
void INTERRUPT_Initialize(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif
\ No newline at end of file diff --git a/mcc_generated_files/mcc.cpp b/mcc_generated_files/mcc.c index 3d34379..7f3a675 100644 --- a/mcc_generated_files/mcc.cpp +++ b/mcc_generated_files/mcc.c @@ -80,7 +80,11 @@ #pragma config BWP = OFF // Boot Flash Write Protect bit->Protection Disabled
#pragma config CP = OFF // Code Protect->Protection Disabled
-#include "mcc.hpp"
+#include "mcc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
@Summary
@@ -90,7 +94,7 @@ This array identifies the cause for exception.
*/
-static char *cause[] =
+static const char *cause[] =
{
"Interrupt", "Undefined", "Undefined", "Undefined",
"Load/fetch address error", "Store address error",
@@ -140,17 +144,17 @@ void _general_exception_handler () Refer to the MIPs Software User's manual */
uint8_t _excep_code;
uint8_t _excep_addr;
- uint8_t *_cause_str;
+ const uint8_t *_cause_str;
_excep_code = (_CP0_GET_CAUSE() & 0x0000007C) >> 2;
_excep_addr = _CP0_GET_EPC();
- _cause_str = reinterpret_cast<uint8_t*>(cause[_excep_code]);
+ _cause_str = cause[_excep_code];
while(1) {
}
}
-/**
- End of File
-*/
\ No newline at end of file +#ifdef __cplusplus
+}
+#endif
\ No newline at end of file diff --git a/mcc_generated_files/mcc.hpp b/mcc_generated_files/mcc.h index fe747b5..8fc44bf 100644 --- a/mcc_generated_files/mcc.hpp +++ b/mcc_generated_files/mcc.h @@ -45,12 +45,17 @@ #ifndef MCC_H
#define MCC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <xc.h>
-#include "pin_manager.hpp"
+#include "pin_manager.h"
#include <stdint.h>
#include <stdbool.h>
-#include "uart1.hpp"
-#include "interrupt_manager.hpp"
+#include "uart1.h"
+#include "interrupt_manager.h"
#define _XTAL_FREQ 8000000UL
@@ -128,6 +133,10 @@ void OSCILLATOR_Initialize(void); void _general_exception_handler (void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* MCC_H */
/**
End of File
diff --git a/mcc_generated_files/pin_manager.cpp b/mcc_generated_files/pin_manager.c index 6124d56..b0d4a93 100644 --- a/mcc_generated_files/pin_manager.cpp +++ b/mcc_generated_files/pin_manager.c @@ -49,10 +49,14 @@ /**
Section: Includes
*/
+#include "pin_manager.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "mcc.h"
#include <xc.h>
#include <sys/attribs.h>
-#include "pin_manager.hpp"
-#include "mcc.hpp"
/**
void PIN_MANAGER_Initialize(void)
@@ -129,3 +133,6 @@ void PIN_MANAGER_Initialize(void) }
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file diff --git a/mcc_generated_files/pin_manager.hpp b/mcc_generated_files/pin_manager.h index 650fe9a..f79a0ec 100644 --- a/mcc_generated_files/pin_manager.hpp +++ b/mcc_generated_files/pin_manager.h @@ -47,6 +47,11 @@ #ifndef _PIN_MANAGER_H
#define _PIN_MANAGER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
Section: Includes
*/
@@ -527,4 +532,8 @@ */
void PIN_MANAGER_Initialize(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/mcc_generated_files/uart1.cpp b/mcc_generated_files/uart1.c index 96ed3e3..bf35ee3 100644 --- a/mcc_generated_files/uart1.cpp +++ b/mcc_generated_files/uart1.c @@ -47,7 +47,11 @@ Section: Included Files
*/
-#include "uart1.hpp"
+#include "uart1.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
Section: Data Type Definitions
@@ -59,7 +63,7 @@ Defines the object required for the status of the queue.
*/
-union UART_BYTEQ_STATUS
+typedef union
{
struct
{
@@ -68,7 +72,7 @@ union UART_BYTEQ_STATUS uint8_t reserved:6;
} s;
uint8_t status;
-};
+} UART_BYTEQ_STATUS;
/** UART Driver Hardware Instance Object
@@ -76,7 +80,7 @@ union UART_BYTEQ_STATUS Defines the object required for the maintenance of the hardware instance.
*/
-struct UART_OBJECT
+typedef struct
{
/* RX Byte Q */
uint8_t *rxTail;
@@ -88,7 +92,7 @@ struct UART_OBJECT UART_BYTEQ_STATUS rxStatus;
UART_BYTEQ_STATUS txStatus;
-};
+} UART_OBJECT;
static UART_OBJECT uart1_obj;
@@ -326,7 +330,7 @@ UART1_TRANSFER_STATUS UART1_TransferStatusGet (void) status |= UART1_TRANSFER_STATUS_RX_DATA_PRESENT;
}
- return static_cast<UART1_TRANSFER_STATUS>(status);
+ return (UART1_TRANSFER_STATUS) status;
}
@@ -380,7 +384,7 @@ bool UART1_TransmitBufferIsFull(void) UART1_STATUS UART1_StatusGet (void)
{
- return static_cast<UART1_STATUS>(U1STA);
+ return (UART1_STATUS) U1STA;
}
@@ -388,3 +392,7 @@ UART1_STATUS UART1_StatusGet (void) /**
End of File
*/
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file diff --git a/mcc_generated_files/uart1.hpp b/mcc_generated_files/uart1.h index db61d1e..bd3971a 100644 --- a/mcc_generated_files/uart1.hpp +++ b/mcc_generated_files/uart1.h @@ -46,6 +46,10 @@ #ifndef _UART1_H
#define _UART1_H
+#ifdef __cplusplus // Provide C++ Compatibility
+ extern "C" {
+#endif
+
/**
Section: Included Files
*/
@@ -55,11 +59,6 @@ #include <stdint.h>
#include <stdlib.h>
#include <sys/attribs.h>
-#ifdef __cplusplus // Provide C++ Compatibility
-
- extern "C" {
-
-#endif
/**
Section: Data Types
@@ -159,7 +158,7 @@ void _UART_1(void); @Description
This routine initializes the UART driver instance for : 1
- index.
+ index.0x8008
This routine must be called before any other UART routine is called.
@Preconditions
diff --git a/nbproject/Makefile-default.mk b/nbproject/Makefile-default.mk index a247945..4ebbf6b 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.cpp mcc_generated_files/mcc.cpp mcc_generated_files/pin_manager.cpp mcc_generated_files/uart1.cpp main.cpp Led.cpp +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 # 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 ${OBJECTDIR}/Led.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 ${OBJECTDIR}/Led.o.d +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 # 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 ${OBJECTDIR}/Led.o +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 # Source Files -SOURCEFILES=mcc_generated_files/interrupt_manager.cpp mcc_generated_files/mcc.cpp mcc_generated_files/pin_manager.cpp mcc_generated_files/uart1.cpp main.cpp Led.cpp +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 CFLAGS= @@ -106,84 +106,72 @@ endif # ------------------------------------------------------------------------------------ # Rules for buildStep: compile ifeq ($(TYPE_IMAGE), DEBUG_RUN) -else -endif - -# ------------------------------------------------------------------------------------ -# Rules for buildStep: compileCPP -ifeq ($(TYPE_IMAGE), DEBUG_RUN) -${OBJECTDIR}/mcc_generated_files/interrupt_manager.o: mcc_generated_files/interrupt_manager.cpp nbproject/Makefile-${CND_CONF}.mk +${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) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/mcc_generated_files/interrupt_manager.o.d" -o ${OBJECTDIR}/mcc_generated_files/interrupt_manager.o mcc_generated_files/interrupt_manager.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + @${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.cpp nbproject/Makefile-${CND_CONF}.mk +${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) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/mcc_generated_files/mcc.o.d" -o ${OBJECTDIR}/mcc_generated_files/mcc.o mcc_generated_files/mcc.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + @${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.cpp nbproject/Makefile-${CND_CONF}.mk +${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) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/mcc_generated_files/pin_manager.o.d" -o ${OBJECTDIR}/mcc_generated_files/pin_manager.o mcc_generated_files/pin_manager.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + @${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.cpp nbproject/Makefile-${CND_CONF}.mk +${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) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/mcc_generated_files/uart1.o.d" -o ${OBJECTDIR}/mcc_generated_files/uart1.o mcc_generated_files/uart1.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) - -${OBJECTDIR}/main.o: main.cpp nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/main.o.d - @${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}/Led.o: Led.cpp nbproject/Makefile-${CND_CONF}.mk - @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/Led.o.d - @${RM} ${OBJECTDIR}/Led.o - @${FIXDEPS} "${OBJECTDIR}/Led.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}/Led.o.d" -o ${OBJECTDIR}/Led.o Led.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + @${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.cpp nbproject/Makefile-${CND_CONF}.mk +${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) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/mcc_generated_files/interrupt_manager.o.d" -o ${OBJECTDIR}/mcc_generated_files/interrupt_manager.o mcc_generated_files/interrupt_manager.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + @${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.cpp nbproject/Makefile-${CND_CONF}.mk +${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) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/mcc_generated_files/mcc.o.d" -o ${OBJECTDIR}/mcc_generated_files/mcc.o mcc_generated_files/mcc.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + @${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.cpp nbproject/Makefile-${CND_CONF}.mk +${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) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/mcc_generated_files/pin_manager.o.d" -o ${OBJECTDIR}/mcc_generated_files/pin_manager.o mcc_generated_files/pin_manager.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + @${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.cpp nbproject/Makefile-${CND_CONF}.mk +${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) -frtti -fexceptions -fno-check-new -fenforce-eh-specs -MMD -MF "${OBJECTDIR}/mcc_generated_files/uart1.o.d" -o ${OBJECTDIR}/mcc_generated_files/uart1.o mcc_generated_files/uart1.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + @${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 + +# ------------------------------------------------------------------------------------ +# Rules for buildStep: compileCPP +ifeq ($(TYPE_IMAGE), DEBUG_RUN) ${OBJECTDIR}/main.o: main.cpp nbproject/Makefile-${CND_CONF}.mk @${MKDIR} "${OBJECTDIR}" @${RM} ${OBJECTDIR}/main.o.d @${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) + @${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}/Led.o: Led.cpp nbproject/Makefile-${CND_CONF}.mk +else +${OBJECTDIR}/main.o: main.cpp nbproject/Makefile-${CND_CONF}.mk @${MKDIR} "${OBJECTDIR}" - @${RM} ${OBJECTDIR}/Led.o.d - @${RM} ${OBJECTDIR}/Led.o - @${FIXDEPS} "${OBJECTDIR}/Led.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}/Led.o.d" -o ${OBJECTDIR}/Led.o Led.cpp -DXPRJ_default=$(CND_CONF) $(COMPARISON_BUILD) + @${RM} ${OBJECTDIR}/main.o.d + @${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) endif diff --git a/nbproject/Makefile-genesis.properties b/nbproject/Makefile-genesis.properties index 4a2a718..15458e7 100644 --- a/nbproject/Makefile-genesis.properties +++ b/nbproject/Makefile-genesis.properties @@ -1,8 +1,8 @@ # -#Tue May 01 22:36:29 CEST 2018 +#Fri May 04 00:12:50 CEST 2018 default.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=fcf9db1a3d46b4ef4e0a46afcbf02251 default.languagetoolchain.dir=/opt/microchip/xc32/v2.05/bin -configurations-xml=018face04edab806752607e0c7d190dd +configurations-xml=7da60577239442fa2d5644589c71b844 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 dff0750..ced59db 100644 --- a/nbproject/configurations.xml +++ b/nbproject/configurations.xml @@ -7,12 +7,11 @@ <logicalFolder name="MCC Generated Files" displayName="MCC Generated Files" projectFiles="true"> - <itemPath>mcc_generated_files/interrupt_manager.hpp</itemPath> - <itemPath>mcc_generated_files/mcc.hpp</itemPath> - <itemPath>mcc_generated_files/pin_manager.hpp</itemPath> - <itemPath>mcc_generated_files/uart1.hpp</itemPath> + <itemPath>mcc_generated_files/interrupt_manager.h</itemPath> + <itemPath>mcc_generated_files/mcc.h</itemPath> + <itemPath>mcc_generated_files/pin_manager.h</itemPath> + <itemPath>mcc_generated_files/uart1.h</itemPath> </logicalFolder> - <itemPath>Led.hpp</itemPath> </logicalFolder> <logicalFolder name="LinkerScript" displayName="Linker Files" @@ -24,13 +23,12 @@ <logicalFolder name="MCC Generated Files" displayName="MCC Generated Files" projectFiles="true"> - <itemPath>mcc_generated_files/interrupt_manager.cpp</itemPath> - <itemPath>mcc_generated_files/mcc.cpp</itemPath> - <itemPath>mcc_generated_files/pin_manager.cpp</itemPath> - <itemPath>mcc_generated_files/uart1.cpp</itemPath> + <itemPath>mcc_generated_files/interrupt_manager.c</itemPath> + <itemPath>mcc_generated_files/mcc.c</itemPath> + <itemPath>mcc_generated_files/pin_manager.c</itemPath> + <itemPath>mcc_generated_files/uart1.c</itemPath> </logicalFolder> <itemPath>main.cpp</itemPath> - <itemPath>Led.cpp</itemPath> </logicalFolder> <logicalFolder name="ExternalFiles" displayName="Important Files" @@ -213,6 +211,7 @@ <property key="ToolFirmwareFilePath" value="Press to browse for a specific firmware version"/> <property key="ToolFirmwareOption.UseLatestFirmware" value="true"/> + <property key="firmware.download.all" value="false"/> <property key="memories.configurationmemory" value="true"/> <property key="memories.dataflash" value="true"/> <property key="memories.eeprom" value="true"/> diff --git a/nbproject/project.xml b/nbproject/project.xml index 9cfb6d3..2cba338 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -6,9 +6,9 @@ <name>LiquidSmoke</name> <creation-uuid>26976773-df1d-4341-b350-948334294bed</creation-uuid> <make-project-type>0</make-project-type> - <c-extensions/> + <c-extensions>c</c-extensions> <cpp-extensions>cpp</cpp-extensions> - <header-extensions>hpp</header-extensions> + <header-extensions>h</header-extensions> <asminc-extensions/> <sourceEncoding>ISO-8859-1</sourceEncoding> <make-dep-projects/> |