usf hardware fpu with target stm32f30x

This commit is contained in:
treymarc 2014-05-24 20:40:12 +00:00
parent 10279c0178
commit ac520b0676
2 changed files with 7 additions and 1 deletions

View File

@ -60,7 +60,7 @@ INCLUDE_DIRS := $(INCLUDE_DIRS) \
LD_SCRIPT = $(ROOT)/stm32_flash_f303.ld
ARCH_FLAGS = -mthumb -mcpu=cortex-m4
ARCH_FLAGS = -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
DEVICE_FLAGS = -DSTM32F303xC
TARGET_FLAGS = -D$(TARGET)
ifeq ($(TARGET),CHEBUZZF3)

View File

@ -59,6 +59,12 @@ uint32_t millis(void)
void systemInit(bool overclock)
{
#ifdef STM32F303xC
// start fpu
SCB->CPACR = (0x3 << (10*2)) | (0x3 << (11*2));
#endif
struct {
GPIO_TypeDef *gpio;
gpio_config_t cfg;