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
@@ -24,7 +24,8 @@ SRC_C += \
$(MCU_DIR)/src/clock_18xx_43xx.c \
$(MCU_DIR)/src/gpio_18xx_43xx.c \
$(MCU_DIR)/src/sysinit_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 \
+9 -3
View File
@@ -71,11 +71,17 @@ static const PINMUX_GRP_T pinmuxing[] =
};
// Invoked by startup code
extern void (* const g_pfnVectors[])(void);
void SystemInit(void)
{
// Remap isr vector
*((uint32_t *) 0xE000ED08) = (uint32_t) &g_pfnVectors;
#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
// Set up pinmux
Chip_SCU_SetPinMuxing(pinmuxing, sizeof(pinmuxing) / sizeof(PINMUX_GRP_T));