Merge pull request #14 from treymarc/fpu

use hardware fpu with target stm32f30x
This commit is contained in:
Dominic Clifton 2014-05-25 00:14:28 +01:00
commit e087b37273
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;