diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-02-22 18:14:18 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-02-22 18:14:18 +0000 |
commit | 3831c45419903e2e4263cac59d3cfcea2998b456 (patch) | |
tree | 73105f0c26928d4c6992417ea780daa36c439549 /nuttx/configs/stm32f4discovery | |
parent | 5178f655dc0eae14efa489f0064406568136d603 (diff) |
Incoporate new ARMv7-M exception handling logic contributed by Mike Smith
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4413 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/configs/stm32f4discovery')
-rwxr-xr-x | nuttx/configs/stm32f4discovery/README.txt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/nuttx/configs/stm32f4discovery/README.txt b/nuttx/configs/stm32f4discovery/README.txt index 7492d03b02..31b950bd6e 100755 --- a/nuttx/configs/stm32f4discovery/README.txt +++ b/nuttx/configs/stm32f4discovery/README.txt @@ -15,6 +15,7 @@ Contents - PWM - UARTs - Timer Inputs/Outputs + - FPU - STM32F4Discovery-specific Configuration Options - Configurations @@ -308,6 +309,57 @@ If enabled (by setting CONFIG_QENCODER=y), then quadrature encoder will user TIM2 (see nsh/defconfig) and input pins PA15, and PA1 for CH1 and CH2, respectively (see include board.h). +FPU +=== + +FPU Configuration Options +------------------------- + +There are two version of the FPU support built into the STM32 port. + +1. Lazy Floating Point Register Save. + + This is an untested implementation that saves and restores FPU registers + only on context switches. This means: (1) floating point registers are + not stored on each context switch and, hence, possibly better interrupt + performance. But, (2) since floating point registers are not saved, + you cannot use floating point operations within interrupt handlers. + + This logic can be enabled by simply adding the following to your .config + file: + + CONFIG_ARCH_FPU=y + +2. Non-Lazy Floating Point Register Save + + Mike Smith has contributed an extensive re-write of the ARMv7-M exception + handling logic. This includes verified support for the FPU. These changes + have not yet been incorporated into the mainline and are still considered + experimental. These FPU logic can be enabled with: + + CONFIG_ARCH_FPU=y + CONFIG_ARMV7M_CMNVECTOR=y + + You will probably also changes to the ld.script in if this option is selected. + This should work: + + -ENTRY(_stext) + +ENTRY(__start) /* Treat __start as the anchor for dead code stripping */ + +EXTERN(_vectors) /* Force the vectors to be included in the output */ + +CFLAGS +------ + +To used the FPU, you will also have to modify the CFLAGS to enable compiler +support for the ARMv7-M FPU. As of this writing, there are not many GCC +toolchains that will support the ARMv7-M FPU. + +As a minimum, you will need to CFLAG options to (1) enable hardware floating +point code generation, and to (2) select the FPU implementation. You might +try something like the following in the Make.defs file: + +ARCHCPUFLAGS = -mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard + STM32F4Discovery-specific Configuration Options =============================================== |