arm float: Update compiler options
Apply the correct compiler options when building for a Cortex-M4 processor that has floating point enabled. Using 'softfp' allows floating point to be used with existing libraries supplied by the Zephyr SDK. The 'hard' option would require new libraries to be shipped with the SDK. Change-Id: I141c20f54c2241134510888688637930c7b560a2 Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
parent
571ccee400
commit
1f47a0dbce
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,11 @@ cflags-cortex-m3 = $(call cc-option,-mabi=aapcs -mthumb -mcpu=cortex-m3) \
|
||||||
$(call cc-option,-mthumb -march=armv7-m)
|
$(call cc-option,-mthumb -march=armv7-m)
|
||||||
cflags-cortex-m4 = $(call cc-option,-mabi=aapcs -mthumb -mcpu=cortex-m4) \
|
cflags-cortex-m4 = $(call cc-option,-mabi=aapcs -mthumb -mcpu=cortex-m4) \
|
||||||
$(call cc-option,-mthumb -march=armv7e-m)
|
$(call cc-option,-mthumb -march=armv7e-m)
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_FLOAT), y)
|
||||||
|
cflags-cortex-m4 += $(call cc-option,-mfloat-abi=softfp -mfpu=fpv4-sp-d16)
|
||||||
|
endif
|
||||||
|
|
||||||
cflags-cortex-m7 = $(call cc-option,-mabi=aapcs -mthumb -mcpu=cortex-m7) \
|
cflags-cortex-m7 = $(call cc-option,-mabi=aapcs -mthumb -mcpu=cortex-m7) \
|
||||||
$(call cc-option,-mthumb -march=armv7e-m)
|
$(call cc-option,-mthumb -march=armv7e-m)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue