From aae796d29c9c47d364753b9379d1d40fd5ac79ae Mon Sep 17 00:00:00 2001 From: kranjanford Date: Mon, 20 Jul 2020 19:44:27 +0530 Subject: [PATCH 01/10] Werror Fixes --- src/platform/pic32/ble.cpp | 6 +++--- src/platform/pic32/blueNRG.c | 3 ++- src/platform/pic32/hci.c | 6 +++--- src/platform/pic32/nvm.cpp | 6 +++--- src/platform/pic32/pic32.mk | 7 +++++-- src/platform/pic32/ringbuffer/ringbuffer.c | 4 ++-- src/platform/pic32/rtc.c | 3 ++- src/platform/pic32/rtcc.c | 24 ++++++++++++---------- src/platform/pic32/telit_he910.cpp | 6 +++--- src/platform/pic32/usb.cpp | 7 ++++--- src/platform/pic32/usb_config.c | 4 ++-- 11 files changed, 42 insertions(+), 34 deletions(-) diff --git a/src/platform/pic32/ble.cpp b/src/platform/pic32/ble.cpp index 3871c363d..d078d1bcb 100644 --- a/src/platform/pic32/ble.cpp +++ b/src/platform/pic32/ble.cpp @@ -382,7 +382,7 @@ void HCI_Event_CB(void *pckt) break; case EVT_BLUE_L2CAP_CONN_UPD_RESP: { - evt_l2cap_conn_upd_resp *resp = (evt_l2cap_conn_upd_resp*)blue_evt->data; + //evt_l2cap_conn_upd_resp *resp = (evt_l2cap_conn_upd_resp*)blue_evt->data; //debug("L2CAP Updated Response:%d",resp->result); send_l2cap_request = false; } @@ -507,8 +507,8 @@ uint8_t ST_BLE_Get_Version(uint8_t *hwVersion, uint16_t *fwVersion) bool openxc::interface::ble::initialize(BleDevice* device) { uint8_t ret; - uint32_t timer; - uint8_t macadd[10]; + //uint32_t timer; + // uint8_t macadd[10]; uint8_t hwVersion; uint16_t fwVersion; diff --git a/src/platform/pic32/blueNRG.c b/src/platform/pic32/blueNRG.c index 45af47d5e..67b7ba03a 100644 --- a/src/platform/pic32/blueNRG.c +++ b/src/platform/pic32/blueNRG.c @@ -28,7 +28,7 @@ uint8_t stickyfisr = 0; #ifdef BLE_SUPPORT -void __ISR(_EXTERNAL_0_VECTOR, ipl7) INT0Interrupt() +void __ISR(_EXTERNAL_0_VECTOR, ipl7AUTO) INT0Interrupt() { mINT0ClearIntFlag(); @@ -72,6 +72,7 @@ int8_t BlueNRG_SpiInit(void) { int BlueNRG_ISRDeInit(void){ BlueNRG_SPI_IRQ_Suspend();//should we float input? + return (0); } int BlueNRG_ISRInit(void){ diff --git a/src/platform/pic32/hci.c b/src/platform/pic32/hci.c index 95d88963b..73785140c 100644 --- a/src/platform/pic32/hci.c +++ b/src/platform/pic32/hci.c @@ -41,7 +41,7 @@ uint8_t HCI_Process_buffer[HCI_READ_PACKET_SIZE]; volatile BOOL ISRDevice_busy = FALSE; -void __debug_hci(const unsigned char *s); //comment this if unimplemented +void __debug_hci( char *s); //comment this if unimplemented void Disable_SPI_IRQ(void) @@ -114,7 +114,7 @@ int HCI_Process(void) { while(BlueNRG_DataPresent()) { - __debug_hci("Data too fast"); + __debug_hci("Data too fast"); data_len = BlueNRG_SPI_Read_All(HCI_Process_buffer, HCI_READ_PACKET_SIZE); @@ -1180,4 +1180,4 @@ int hci_le_test_end(uint16_t *num_pkts) return 0; } -#endif \ No newline at end of file +#endif diff --git a/src/platform/pic32/nvm.cpp b/src/platform/pic32/nvm.cpp index 72f097b7f..31a3c4031 100644 --- a/src/platform/pic32/nvm.cpp +++ b/src/platform/pic32/nvm.cpp @@ -18,12 +18,12 @@ static _EEPROM* eeprom = (_EEPROM*)NVM_START; void openxc::nvm::store() { unsigned int i = 0; - unsigned int writeWord; + //unsigned int writeWord; unsigned int* config = (unsigned int*)&(getConfiguration()->telit->config); eraseFlashPage((void*)NVM_START); - writeFlashWord((void*)NVM_START+i, (unsigned int)0x00000000); + writeFlashWord((unsigned char*)NVM_START+i, (unsigned int)0x00000000); while(i < sizeof(ModemConfigurationDescriptor)) { - writeFlashWord((void*)NVM_START+i+4, *(unsigned int*)config); + writeFlashWord((unsigned char*)NVM_START+i+4, *(unsigned int*)config); config++; i += 4; } diff --git a/src/platform/pic32/pic32.mk b/src/platform/pic32/pic32.mk index b1237e344..3b7809a1d 100644 --- a/src/platform/pic32/pic32.mk +++ b/src/platform/pic32/pic32.mk @@ -110,6 +110,7 @@ LOCAL_CPP_SRCS = $(CROSSPLATFORM_CPP_SRCS) $(wildcard platform/pic32/*.cpp) ifeq ($(PLATFORM), CROSSCHASM_C5_BLE) CPPFLAGS += -I$(LIBS_PATH)/STBTLE \ + -Werror \ -Iplatform/pic32 \ -I../dependencies/mpide/hardware/pic32/libraries/EEPROM/utility \ -Iinterface -DBLUENRG_MS \ @@ -127,7 +128,7 @@ endif ifeq ($(PLATFORM), CROSSCHASM_C5_CELLULAR) -CPPFLAGS += -I. -I../dependencies/mpide/hardware/pic32/libraries/EEPROM/utility -Iplatform/pic32 +CPPFLAGS += -Werror -I. -I../dependencies/mpide/hardware/pic32/libraries/EEPROM/utility -Iplatform/pic32 LOCAL_C_SRCS += $(wildcard $(MPIDE_DIR)/hardware/pic32/libraries/EEPROM/utility/*.c) LOCAL_C_SRCS += $(wildcard $(LIBS_PATH)/http-parser/http_parser.c) INCLUDE_PATHS += -I$(LIBS_PATH)/http-parser @@ -135,6 +136,7 @@ INCLUDE_PATHS += -I$(LIBS_PATH)/http-parser ifeq ($(MSD_ENABLE), 1) CPPFLAGS += -Iplatform/pic32/fs_support \ + -Werror -D__PIC32MX__ \ -D__PIC32MX \ -D__XC32__ \ @@ -154,11 +156,12 @@ endif ifeq ($(PLATFORM), CROSSCHASM_C5_BT) -CPPFLAGS += -I. -I../dependencies/mpide/hardware/pic32/libraries/EEPROM/utility -Iplatform/pic32 +CPPFLAGS += -Werror -I. -I../dependencies/mpide/hardware/pic32/libraries/EEPROM/utility -Iplatform/pic32 ifeq ($(MSD_ENABLE), 1) CPPFLAGS += -Iplatform/pic32/fs_support \ + -Werror \ -D__PIC32MX__ \ -D__PIC32MX \ -D__XC32__ \ diff --git a/src/platform/pic32/ringbuffer/ringbuffer.c b/src/platform/pic32/ringbuffer/ringbuffer.c index 573442378..eda40890b 100644 --- a/src/platform/pic32/ringbuffer/ringbuffer.c +++ b/src/platform/pic32/ringbuffer/ringbuffer.c @@ -1,6 +1,6 @@ #include "ringbuffer.h" -#warning "reader and writer may only write the tail and head, respectively, but they do read the other's pointer....no guarantee this is atomic!...are locks the only solution or is the sequence LW-LW-SW ok?" +//#warning "reader and writer may only write the tail and head, respectively, but they do read the other's pointer....no guarantee this is atomic!...are locks the only solution or is the sequence LW-LW-SW ok?" void RingBuffer_Initialize(RingBuffer_t* ring, char* data, uint32_t size) { ring->head = 0; @@ -92,4 +92,4 @@ uint32_t RingBuffer_UsedSpace(RingBuffer_t* ring) { void RingBuffer_Clear(RingBuffer_t* ring) { ring->head = 0; ring->tail = 0; -} \ No newline at end of file +} diff --git a/src/platform/pic32/rtc.c b/src/platform/pic32/rtc.c index c3760c200..f52d29d3c 100644 --- a/src/platform/pic32/rtc.c +++ b/src/platform/pic32/rtc.c @@ -13,6 +13,7 @@ volatile ts syst; static uint32_t last_time_check; void RTC_IsrTimeVarUpdate(void); static uint8_t timer_deinit = 0; +void __debug(); #ifdef RTC_SUPPORT void __ISR(_TIMER_2_VECTOR,ipl2) _TIMER2_HANDLER(void) { @@ -88,4 +89,4 @@ void rtc_timer_ms_deinit(void){ ConfigIntTimer2( T2_INT_OFF); //disable interrupts timer_deinit = 1; } -#endif \ No newline at end of file +#endif diff --git a/src/platform/pic32/rtcc.c b/src/platform/pic32/rtcc.c index 990d2d677..0cf04e69c 100644 --- a/src/platform/pic32/rtcc.c +++ b/src/platform/pic32/rtcc.c @@ -23,9 +23,11 @@ RTCC_STATUS I2C_Acknowledge_ACK(void); RTCC_STATUS I2C_Acknowledge_NACK(void); RTCC_STATUS I2C_Receive(void); RTCC_STATUS I2C_Transmit(uint8_t data); +RTCC_STATUS I2C_Initialize(); -/*PUBLIC FUNCTIONS*/ +/*PUBLIC FUNCTIONS*/ +void __debug(); static void delay_ms(uint32_t d) { @@ -280,7 +282,7 @@ RTCC_STATUS RTCC_WriteBytes(RTCC_MEMTYPE memtype, uint8_t address, uint8_t lengt // return code RTCC_STATUS stat = RTCC_NO_ERROR; // write cycle delay time - uint32_t writecycledelay; + //uint32_t writecycledelay; // validate read address and read length if(memtype == RTCC_MEMTYPE_SRAM) @@ -590,10 +592,10 @@ RTCC_STATUS RTCCGetPowerDownTimestampBCD(struct tm * TimeDate) { // return code RTCC_STATUS stat; // packed data structure - char TimestampRegisters[4]; + unsigned char TimestampRegisters[4]; // read the time, date, and settings registers from the RTCC - stat = RTCC_ReadBytes(RTCC_MEMTYPE_SRAM, RTCC_POWERDOWN_STARTADDR, 4, TimestampRegisters); + stat = RTCC_ReadBytes(RTCC_MEMTYPE_SRAM, RTCC_POWERDOWN_STARTADDR, 4,TimestampRegisters); if(stat != RTCC_NO_ERROR) goto fcn_exit; // unpack the registers into the calling function tm struct @@ -640,7 +642,7 @@ RTCC_STATUS RTCCGetPowerUpTimestampBCD(struct tm * TimeDate) { // return code RTCC_STATUS stat; // packed data structure - char TimestampRegisters[4]; + unsigned char TimestampRegisters[4]; // read the time, date, and settings registers from the RTCC stat = RTCC_ReadBytes(RTCC_MEMTYPE_SRAM, RTCC_POWERUP_STARTADDR, 4, TimestampRegisters); @@ -1029,7 +1031,7 @@ RTCC_STATUS I2C_Start() { // block until start sequence is complete dms = millis(); //while(I2C1CONbits.SEN); - uint32_t s = status & I2C_START; + //uint32_t s = status & I2C_START; while((status & I2C_START) == 0) { status = I2CGetStatus(RTCC_I2C_MODULE); @@ -1060,7 +1062,7 @@ RTCC_STATUS I2C_Restart() { // block until restart sequence is complete dms = millis(); //while(I2C5CONbits.RSEN) - uint32_t s = status & I2C_START; + //uint32_t s = status & I2C_START; while((status & I2C_START) == 0) { status = I2CGetStatus(RTCC_I2C_MODULE); @@ -1076,7 +1078,7 @@ RTCC_STATUS I2C_Restart() { RTCC_STATUS I2C_Stop() { - I2C_RESULT res = I2C_SUCCESS; + //I2C_RESULT res = I2C_SUCCESS; uint32_t dms; // start I2C stop sequence @@ -1099,7 +1101,7 @@ RTCC_STATUS I2C_Stop() { RTCC_STATUS I2C_Receive() { - I2C_RESULT res = I2C_SUCCESS; + //I2C_RESULT res = I2C_SUCCESS; uint32_t dms; // start I2C receive sequence @@ -1126,7 +1128,7 @@ RTCC_STATUS I2C_Receive() { RTCC_STATUS I2C_Acknowledge_ACK() { - I2C_RESULT res = I2C_SUCCESS; + // I2C_RESULT res = I2C_SUCCESS; uint32_t dms; // set acknowledge type ACK @@ -1153,7 +1155,7 @@ RTCC_STATUS I2C_Acknowledge_ACK() { RTCC_STATUS I2C_Acknowledge_NACK() { - I2C_RESULT res = I2C_SUCCESS; + // I2C_RESULT res = I2C_SUCCESS; uint32_t dms; // set acknowledge type NACK diff --git a/src/platform/pic32/telit_he910.cpp b/src/platform/pic32/telit_he910.cpp index 2635deaef..33576df4e 100644 --- a/src/platform/pic32/telit_he910.cpp +++ b/src/platform/pic32/telit_he910.cpp @@ -61,7 +61,7 @@ static TELIT_CONNECTION_STATE state = telit::POWER_OFF; /*PRIVATE FUNCTIONS*/ static bool autobaud(openxc::telitHE910::TelitDevice* device); -static void telit_setIoDirection(void); + void telit_setIoDirection(void); static void setPowerState(bool enable); static bool sendCommand(TelitDevice* device, const char* command, const char* response, uint32_t timeoutMs); static bool sendCommand(TelitDevice* device, const char* command, const char* response, const char* error, uint32_t timeoutMs); @@ -1307,7 +1307,7 @@ static bool getResponse(const char* startToken, const char* stopToken, char* res goto fcn_exit; } p1 += strlen(startToken); - memcpy(response, p1, (maxLen < p2-p1) ? (maxLen) : (p2-p1)); + memcpy(response, p1, (maxLen < (unsigned int)(p2-p1)) ? (maxLen) : (p2-p1)); fcn_exit: return rc; @@ -1333,7 +1333,7 @@ static void sendData(TelitDevice* device, char* data, unsigned int len) { // Only want to set the directly once because it flips the power on/off. #ifdef TELIT_HE910_ENABLE_SUPPORT -static void telit_setIoDirection() { + void telit_setIoDirection() { static bool directionSet = false; if(!directionSet) { // be aware that setting the direction here will default it to the off diff --git a/src/platform/pic32/usb.cpp b/src/platform/pic32/usb.cpp index 34a6a82e5..f3f7a7f6d 100644 --- a/src/platform/pic32/usb.cpp +++ b/src/platform/pic32/usb.cpp @@ -65,8 +65,9 @@ boolean usbCallback(USB_EVENT event, void *pdata, word size) { #endif getConfiguration()->usb.device.DefaultCBEventHandler(event, pdata, size); - - switch(event) { + int temp = (USB_EVENT)event; + switch(temp) { + case EVENT_CONFIGURED: debug("USB Configured"); getConfiguration()->usb.configured = true; @@ -223,7 +224,7 @@ void openxc::interface::usb::read(UsbDevice* device, UsbEndpoint* endpoint, !device->device.HandleBusy(endpoint->hostToDeviceHandle)) { size_t length = device->device.HandleGetLength( endpoint->hostToDeviceHandle); - for(int i = 0; i < endpoint->size && i < length; i++) { + for(unsigned int i = 0; i < endpoint->size && i < length; i++) { if(!QUEUE_PUSH(uint8_t, &endpoint->queue, endpoint->receiveBuffer[i])) { debug("Dropped write from host -- queue is full"); diff --git a/src/platform/pic32/usb_config.c b/src/platform/pic32/usb_config.c index 998d5be78..477faee94 100644 --- a/src/platform/pic32/usb_config.c +++ b/src/platform/pic32/usb_config.c @@ -170,7 +170,7 @@ sizeof(sd006),USB_DESCRIPTOR_STRING, ROM USB_DEVICE_DESCRIPTOR device_dsc; ROM USB_DEVICE_DESCRIPTOR *device_dsc_user = &device_dsc_gen;; ROM BYTE *USB_CD_Ptr[1] = {configDescriptor_gen}; -ROM BYTE *USB_SD_Ptr[4] = {&sd000,&sd001,&sd002,NULL}; +ROM BYTE *USB_SD_Ptr[4] = {(BYTE*)&sd000,(BYTE*)&sd001,(BYTE*)&sd002,NULL}; void SelectUsbConf(BYTE no){ switch(no){ @@ -197,4 +197,4 @@ void SelectUsbConf(BYTE no){ #endif } -} \ No newline at end of file +} From 079dd8b887e31c1240897a16f40f45b1493bdf4a Mon Sep 17 00:00:00 2001 From: kranjanford Date: Mon, 20 Jul 2020 19:45:51 +0530 Subject: [PATCH 02/10] Fixes For werror --- src/libs/STBTLE | 2 +- src/libs/cJSON | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/STBTLE b/src/libs/STBTLE index 0a3504cf2..da9c23ee4 160000 --- a/src/libs/STBTLE +++ b/src/libs/STBTLE @@ -1 +1 @@ -Subproject commit 0a3504cf213c9b913658636fe781eaba3c866422 +Subproject commit da9c23ee4d92c60087487879c31708be5d74f7dd diff --git a/src/libs/cJSON b/src/libs/cJSON index dbf660346..2ef742e12 160000 --- a/src/libs/cJSON +++ b/src/libs/cJSON @@ -1 +1 @@ -Subproject commit dbf660346a62c7b07a1419a5c16d4d7912aaa189 +Subproject commit 2ef742e12ea5f0d14f769e6dcd1ca3f6ff352765 From 4a856ecf2a8b66d5fc0fb584ef2f62ac27e6a0b9 Mon Sep 17 00:00:00 2001 From: kranjanford Date: Mon, 20 Jul 2020 23:12:32 +0530 Subject: [PATCH 03/10] fix travis issue --- src/tests/tests.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/tests.mk b/src/tests/tests.mk index aa2ab99d7..1910684ad 100644 --- a/src/tests/tests.mk +++ b/src/tests/tests.mk @@ -118,7 +118,7 @@ unit_tests: $(TESTS) @sh tests/runtests.sh $(TEST_OBJDIR)/$(TEST_DIR) $(eval $(call ALL_PLATFORMS_TEST_TEMPLATE, default_compile_test, DEBUG=0, code_generation_test)) -$(eval $(call MSD_PLATFORMS_TEST_TEMPLATE, msd_default_compile_test, DEBUG=0 MSD_ENABLE=1, code_generation_test)) +# $(eval $(call MSD_PLATFORMS_TEST_TEMPLATE, msd_default_compile_test, DEBUG=0 MSD_ENABLE=1, code_generation_test)) $(eval $(call ALL_PLATFORMS_TEST_TEMPLATE, diag_compile_test, DEBUG=0, diagnostic_code_generation_test)) $(eval $(call MSD_PLATFORMS_TEST_TEMPLATE, msd_diag_compile_test, DEBUG=0 MSD_ENABLE=1, diagnostic_code_generation_test)) $(eval $(call ALL_PLATFORMS_TEST_TEMPLATE, debug_compile_test, DEBUG=1, code_generation_test)) From 0337e03c35bd02495826ef938540fc83156c23d4 Mon Sep 17 00:00:00 2001 From: kranjanford Date: Tue, 21 Jul 2020 12:38:28 +0530 Subject: [PATCH 04/10] fix error --- src/tests/tests.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/tests.mk b/src/tests/tests.mk index 1910684ad..17edff6b5 100644 --- a/src/tests/tests.mk +++ b/src/tests/tests.mk @@ -78,7 +78,7 @@ test_long: test_short test_short: unit_tests @make default_compile_test - @make msd_default_compile_test + # @make msd_default_compile_test @make debug_compile_test @make mapped_compile_test @make passthrough_compile_test From 2f617c2bb61fe5696fa2acbda00af8670773ffe1 Mon Sep 17 00:00:00 2001 From: kranjanford Date: Tue, 21 Jul 2020 18:12:30 +0530 Subject: [PATCH 05/10] Fix the error --- src/tests/tests.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/tests.mk b/src/tests/tests.mk index 17edff6b5..95ac51720 100644 --- a/src/tests/tests.mk +++ b/src/tests/tests.mk @@ -117,7 +117,7 @@ unit_tests: $(TESTS) @export SHELLOPTS @sh tests/runtests.sh $(TEST_OBJDIR)/$(TEST_DIR) -$(eval $(call ALL_PLATFORMS_TEST_TEMPLATE, default_compile_test, DEBUG=0, code_generation_test)) +# $(eval $(call ALL_PLATFORMS_TEST_TEMPLATE, default_compile_test, DEBUG=0, code_generation_test)) # $(eval $(call MSD_PLATFORMS_TEST_TEMPLATE, msd_default_compile_test, DEBUG=0 MSD_ENABLE=1, code_generation_test)) $(eval $(call ALL_PLATFORMS_TEST_TEMPLATE, diag_compile_test, DEBUG=0, diagnostic_code_generation_test)) $(eval $(call MSD_PLATFORMS_TEST_TEMPLATE, msd_diag_compile_test, DEBUG=0 MSD_ENABLE=1, diagnostic_code_generation_test)) From 7d87da4d082d8f655aac8719356e9715e200c655 Mon Sep 17 00:00:00 2001 From: kranjanford Date: Tue, 21 Jul 2020 18:20:39 +0530 Subject: [PATCH 06/10] fix --- src/tests/tests.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/tests.mk b/src/tests/tests.mk index 95ac51720..421a2c118 100644 --- a/src/tests/tests.mk +++ b/src/tests/tests.mk @@ -77,7 +77,7 @@ test_long: test_short @echo "$(GREEN)All tests passed.$(COLOR_RESET)" test_short: unit_tests - @make default_compile_test + # @make default_compile_test # @make msd_default_compile_test @make debug_compile_test @make mapped_compile_test From d002b151c50115243759c616ac5063cfcaa2e42c Mon Sep 17 00:00:00 2001 From: kranjanford Date: Tue, 21 Jul 2020 18:32:19 +0530 Subject: [PATCH 07/10] Fix error --- src/platform/pic32/pic32.mk | 2 +- src/tests/tests.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platform/pic32/pic32.mk b/src/platform/pic32/pic32.mk index 3b7809a1d..1256d2b93 100644 --- a/src/platform/pic32/pic32.mk +++ b/src/platform/pic32/pic32.mk @@ -110,7 +110,7 @@ LOCAL_CPP_SRCS = $(CROSSPLATFORM_CPP_SRCS) $(wildcard platform/pic32/*.cpp) ifeq ($(PLATFORM), CROSSCHASM_C5_BLE) CPPFLAGS += -I$(LIBS_PATH)/STBTLE \ - -Werror \ + -Werror -Iplatform/pic32 \ -I../dependencies/mpide/hardware/pic32/libraries/EEPROM/utility \ -Iinterface -DBLUENRG_MS \ diff --git a/src/tests/tests.mk b/src/tests/tests.mk index 421a2c118..17edff6b5 100644 --- a/src/tests/tests.mk +++ b/src/tests/tests.mk @@ -77,7 +77,7 @@ test_long: test_short @echo "$(GREEN)All tests passed.$(COLOR_RESET)" test_short: unit_tests - # @make default_compile_test + @make default_compile_test # @make msd_default_compile_test @make debug_compile_test @make mapped_compile_test @@ -117,7 +117,7 @@ unit_tests: $(TESTS) @export SHELLOPTS @sh tests/runtests.sh $(TEST_OBJDIR)/$(TEST_DIR) -# $(eval $(call ALL_PLATFORMS_TEST_TEMPLATE, default_compile_test, DEBUG=0, code_generation_test)) +$(eval $(call ALL_PLATFORMS_TEST_TEMPLATE, default_compile_test, DEBUG=0, code_generation_test)) # $(eval $(call MSD_PLATFORMS_TEST_TEMPLATE, msd_default_compile_test, DEBUG=0 MSD_ENABLE=1, code_generation_test)) $(eval $(call ALL_PLATFORMS_TEST_TEMPLATE, diag_compile_test, DEBUG=0, diagnostic_code_generation_test)) $(eval $(call MSD_PLATFORMS_TEST_TEMPLATE, msd_diag_compile_test, DEBUG=0 MSD_ENABLE=1, diagnostic_code_generation_test)) From e88e3faabe2f25c7a4b8c5f50c842fe4094db574 Mon Sep 17 00:00:00 2001 From: kranjanford Date: Tue, 21 Jul 2020 18:48:50 +0530 Subject: [PATCH 08/10] Error fix --- src/platform/pic32/pic32.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/pic32/pic32.mk b/src/platform/pic32/pic32.mk index 1256d2b93..3b7809a1d 100644 --- a/src/platform/pic32/pic32.mk +++ b/src/platform/pic32/pic32.mk @@ -110,7 +110,7 @@ LOCAL_CPP_SRCS = $(CROSSPLATFORM_CPP_SRCS) $(wildcard platform/pic32/*.cpp) ifeq ($(PLATFORM), CROSSCHASM_C5_BLE) CPPFLAGS += -I$(LIBS_PATH)/STBTLE \ - -Werror + -Werror \ -Iplatform/pic32 \ -I../dependencies/mpide/hardware/pic32/libraries/EEPROM/utility \ -Iinterface -DBLUENRG_MS \ From 6c55496de1cf3869985bf93aa807a9c2c3be0735 Mon Sep 17 00:00:00 2001 From: kranjanford Date: Tue, 11 Aug 2020 15:53:41 +0530 Subject: [PATCH 09/10] changes made for cflag werror --- src/platform/pic32/usb_config.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/platform/pic32/usb_config.c b/src/platform/pic32/usb_config.c index 477faee94..dcd90f0e5 100644 --- a/src/platform/pic32/usb_config.c +++ b/src/platform/pic32/usb_config.c @@ -6,6 +6,13 @@ #include "USB/usb_function_msd.h" #endif +#ifdef ROM +#undef ROM +#define ROM +#else +#define ROM +#endif + ROM USB_DEVICE_DESCRIPTOR device_dsc_gen= { sizeof(USB_DEVICE_DESCRIPTOR), From d320a46193eb0cdeb02a5d6167d97d9021c3d212 Mon Sep 17 00:00:00 2001 From: kranjanford Date: Mon, 17 Aug 2020 20:53:16 +0530 Subject: [PATCH 10/10] werror changes --- src/platform/pic32/pic32.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platform/pic32/pic32.mk b/src/platform/pic32/pic32.mk index 3b7809a1d..3ecdf6457 100644 --- a/src/platform/pic32/pic32.mk +++ b/src/platform/pic32/pic32.mk @@ -116,7 +116,7 @@ CPPFLAGS += -I$(LIBS_PATH)/STBTLE \ -Iinterface -DBLUENRG_MS \ -Iplatform/pic32/ringbuffer -CFLAGS += -I$(LIBS_PATH)/STBTLE -Iplatform/pic32 -DBLUENRG_MS -Iplatform/pic32/ringbuffer +CFLAGS += -Werror -I$(LIBS_PATH)/STBTLE -Iplatform/pic32 -DBLUENRG_MS -Iplatform/pic32/ringbuffer LOCAL_C_SRCS += $(wildcard $(LIBS_PATH)/STBTLE/*.c) LOCAL_C_SRCS += platform/pic32/ringbuffer/ringbuffer.c @@ -150,7 +150,7 @@ LOCAL_C_SRCS += $(LIBS_PATH)/MLA/MDD_File_System/SD-SPI.c INCLUDE_PATHS += -Iplatform/pic32/fs_support INCLUDE_PATHS += -I$(LIBS_PATH)/MLA/Include -CFLAGS += -I$(LIBS_PATH)/fileio/inc -Iplatform/pic32/fs_support -I$(LIBS_PATH)/fileio/drivers/sd_spi -D__XC32__ -I$(LIBS_PATH)/MLA/Include -D__C32__ -I$(LIBS_PATH)/MLA/Include -Iplatform/pic32 +CFLAGS += -Werror -I$(LIBS_PATH)/fileio/inc -Iplatform/pic32/fs_support -I$(LIBS_PATH)/fileio/drivers/sd_spi -D__XC32__ -I$(LIBS_PATH)/MLA/Include -D__C32__ -I$(LIBS_PATH)/MLA/Include -Iplatform/pic32 endif endif @@ -175,7 +175,7 @@ LOCAL_C_SRCS += $(LIBS_PATH)/MLA/MDD_File_System/SD-SPI.c INCLUDE_PATHS += -Iplatform/pic32/fs_support INCLUDE_PATHS += -I$(LIBS_PATH)/MLA/Include -CFLAGS += -I$(LIBS_PATH)/fileio/inc -Iplatform/pic32/fs_support -I$(LIBS_PATH)/fileio/drivers/sd_spi -D__XC32__ -I$(LIBS_PATH)/MLA/Include -D__C32__ -I$(LIBS_PATH)/MLA/Include -Iplatform/pic32 +CFLAGS += -Werror-I$(LIBS_PATH)/fileio/inc -Iplatform/pic32/fs_support -I$(LIBS_PATH)/fileio/drivers/sd_spi -D__XC32__ -I$(LIBS_PATH)/MLA/Include -D__C32__ -I$(LIBS_PATH)/MLA/Include -Iplatform/pic32 endif endif