revert to use __USE_LPCOPEN

properly init fpu on LPC M4
This commit is contained in:
hathach
2020-09-03 12:58:09 +07:00
parent c7d2d0ae29
commit 1cee2da7b9
16 changed files with 62 additions and 17 deletions
+3 -2
View File
@@ -7,7 +7,7 @@ CFLAGS += \
-mfpu=fpv4-sp-d16 \
-nostdlib \
-DCORE_M4 \
-D__USE_CMSIS \
-D__USE_LPCOPEN \
-DCFG_TUSB_MCU=OPT_MCU_LPC43XX
# mcu driver cause following warnings
@@ -26,7 +26,8 @@ SRC_C += \
$(MCU_DIR)/src/sysinit_18xx_43xx.c \
$(MCU_DIR)/src/i2c_18xx_43xx.c \
$(MCU_DIR)/src/i2cm_18xx_43xx.c \
$(MCU_DIR)/src/uart_18xx_43xx.c
$(MCU_DIR)/src/uart_18xx_43xx.c \
$(MCU_DIR)/src/fpu_init.c
INC += \
$(TOP)/$(MCU_DIR)/inc \
+10
View File
@@ -85,6 +85,16 @@ static const PINMUX_GRP_T pinclockmuxing[] =
// Invoked by startup code
void SystemInit(void)
{
#ifdef __USE_LPCOPEN
extern void (* const g_pfnVectors[])(void);
unsigned int *pSCB_VTOR = (unsigned int *) 0xE000ED08;
*pSCB_VTOR = (unsigned int) &g_pfnVectors;
#if __FPU_USED == 1
fpuInit();
#endif
#endif // __USE_LPCOPEN
/* Setup system level pin muxing */
Chip_SCU_SetPinMuxing(pinmuxing, sizeof(pinmuxing) / sizeof(PINMUX_GRP_T));