Jelajahi Sumber

revert to use float-abi

define __USE_CMSIS instead of __USE_LPCOPEN will have startup enable FPU
on startup properly. Although it is only relevant to lpx43/40 series,
change all to __USE_CMSIS for consistency
hathach 5 tahun lalu
induk
melakukan
c492aef4c7

+ 2 - 2
hw/bsp/ea4088qs/board.mk

@@ -5,9 +5,9 @@ CFLAGS += \
   -mcpu=cortex-m4 \
   -nostdlib \
   -DCORE_M4 \
-  -DCFG_TUSB_MCU=OPT_MCU_LPC40XX \
+  -D__USE_CMSIS \
   -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \
-  -D__USE_LPCOPEN
+  -DCFG_TUSB_MCU=OPT_MCU_LPC40XX
 
 # mcu driver cause following warnings
 CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter

+ 3 - 1
hw/bsp/ea4357/board.mk

@@ -3,9 +3,11 @@ CFLAGS += \
   -mthumb \
   -mabi=aapcs \
   -mcpu=cortex-m4 \
+  -mfloat-abi=hard \
+  -mfpu=fpv4-sp-d16 \
   -nostdlib \
-  -D__USE_LPCOPEN \
   -DCORE_M4 \
+  -D__USE_CMSIS \
   -DCFG_TUSB_MCU=OPT_MCU_LPC43XX
 
 # mcu driver cause following warnings

+ 1 - 1
hw/bsp/lpcxpresso11u37/board.mk

@@ -5,7 +5,7 @@ CFLAGS += \
   -mcpu=cortex-m0 \
   -nostdlib \
   -DCORE_M0 \
-  -D__USE_LPCOPEN \
+  -D__USE_CMSIS \
   -DCFG_EXAMPLE_MSC_READONLY \
   -DCFG_TUSB_MCU=OPT_MCU_LPC11UXX \
   -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \

+ 1 - 1
hw/bsp/lpcxpresso11u68/board.mk

@@ -6,7 +6,7 @@ CFLAGS += \
   -nostdlib \
   -DCORE_M0PLUS \
   -D__VTOR_PRESENT=0 \
-  -D__USE_LPCOPEN \
+  -D__USE_CMSIS \
   -DCFG_TUSB_MCU=OPT_MCU_LPC11UXX \
   -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM3")))' \
   -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' 

+ 1 - 1
hw/bsp/lpcxpresso1347/board.mk

@@ -5,7 +5,7 @@ CFLAGS += \
   -mcpu=cortex-m3 \
   -nostdlib \
   -DCORE_M3 \
-  -D__USE_LPCOPEN \
+  -D__USE_CMSIS \
   -DCFG_EXAMPLE_MSC_READONLY \
   -DCFG_TUSB_MCU=OPT_MCU_LPC13XX \
   -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \

+ 1 - 1
hw/bsp/lpcxpresso1549/board.mk

@@ -5,7 +5,7 @@ CFLAGS += \
   -mcpu=cortex-m3 \
   -nostdlib \
   -DCORE_M3 \
-  -D__USE_LPCOPEN \
+  -D__USE_CMSIS \
   -DCFG_EXAMPLE_MSC_READONLY \
   -DCFG_TUSB_MCU=OPT_MCU_LPC15XX \
   -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' 

+ 1 - 1
hw/bsp/lpcxpresso1769/board.mk

@@ -5,7 +5,7 @@ CFLAGS += \
   -mcpu=cortex-m3 \
   -nostdlib \
   -DCORE_M3 \
-  -D__USE_LPCOPEN \
+  -D__USE_CMSIS \
   -DCFG_TUSB_MCU=OPT_MCU_LPC175X_6X \
   -DRTC_EV_SUPPORT=0
 

+ 1 - 1
hw/bsp/mbed1768/board.mk

@@ -5,7 +5,7 @@ CFLAGS += \
   -mcpu=cortex-m3 \
   -nostdlib \
   -DCORE_M3 \
-  -D__USE_LPCOPEN \
+  -D__USE_CMSIS \
   -DCFG_TUSB_MCU=OPT_MCU_LPC175X_6X \
   -DRTC_EV_SUPPORT=0
 

+ 1 - 1
hw/bsp/mcb1800/board.mk

@@ -5,7 +5,7 @@ CFLAGS += \
   -mcpu=cortex-m3 \
   -nostdlib \
   -DCORE_M3 \
-  -D__USE_LPCOPEN \
+  -D__USE_CMSIS \
   -DCFG_TUSB_MCU=OPT_MCU_LPC18XX
 
 # mcu driver cause following warnings

+ 4 - 2
hw/bsp/ngx4330/board.mk

@@ -3,10 +3,12 @@ CFLAGS += \
   -mthumb \
   -mabi=aapcs \
   -mcpu=cortex-m4 \
+  -mfloat-abi=hard \
+  -mfpu=fpv4-sp-d16 \  
   -nostdlib \
   -DCORE_M4 \
-  -DCFG_TUSB_MCU=OPT_MCU_LPC43XX \
-  -D__USE_LPCOPEN
+  -D__USE_CMSIS \
+  -DCFG_TUSB_MCU=OPT_MCU_LPC43XX
 
 # mcu driver cause following warnings
 CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter

+ 1 - 1
src/host/usbh.c

@@ -596,7 +596,7 @@ bool enum_task(hcd_event_t* event)
   //------------- parse configuration & install drivers -------------//
   uint8_t const* p_desc = _usbh_ctrl_buf + sizeof(tusb_desc_configuration_t);
 
-  TU_LOG2_MEM(_usbh_ctrl_buf, ((tusb_desc_configuration_t*)_usbh_ctrl_buf)->wTotalLength, 0);
+  // TU_LOG2_MEM(_usbh_ctrl_buf, ((tusb_desc_configuration_t*)_usbh_ctrl_buf)->wTotalLength, 0);
 
   // parse each interfaces
   while( p_desc < _usbh_ctrl_buf + ((tusb_desc_configuration_t*)_usbh_ctrl_buf)->wTotalLength )