8000 py/dynruntime.mk: Enable single-precision float by default on armv6/7m. · Carglglz/micropython@17951ce · GitHub
[go: up one dir, main page]

Skip to content

Commit 17951ce

Browse files
committed
py/dynruntime.mk: Enable single-precision float by default on armv6/7m.
Soft float now works on these ARM targets thanks to the parent commit. Signed-off-by: Damien George <damien@micropython.org>
1 parent 718ff4f commit 17951ce

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

examples/natmod/random/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ ifeq ($(ARCH),xtensa)
1414
MPY_EXTERN_SYM_FILE=$(MPY_DIR)/ports/esp8266/boards/eagle.rom.addr.v6.ld
1515
endif
1616

17+
ifeq ($(ARCH),$(filter $(ARCH),armv6m armv7m))
18+
# Link with libm.a for soft-float helper functions
19+
LINK_RUNTIME = 1
20+
endif
21+
1722
include $(MPY_DIR)/py/dynruntime.mk

py/dynruntime.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ else ifeq ($(ARCH),armv6m)
6363
# thumb
6464
CROSS = arm-none-eabi-
6565
CFLAGS_ARCH += -mthumb -mcpu=cortex-m0
66-
MICROPY_FLOAT_IMPL ?= none
66+
MICROPY_FLOAT_IMPL ?= float
6767

6868
else ifeq ($(ARCH),armv7m)
6969

7070
# thumb
7171
CROSS = arm-none-eabi-
7272
CFLAGS_ARCH += -mthumb -mcpu=cortex-m3
73-
MICROPY_FLOAT_IMPL ?= none
73+
MICROPY_FLOAT_IMPL ?= float
7474

7575
else ifeq ($(ARCH),armv7emsp)
7676

tools/ci.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -561,13 +561,11 @@ function ci_native_mpy_modules_build {
561561
make -C examples/natmod/$natmod ARCH=$arch
562562
done
563563

564-
# features2 requires soft-float on armv7m, rv32imc, and xtensa. On armv6m
565-
# the compiler generates absolute relocations in the object file
566-
# referencing soft-float functions, which is not supported at the moment.
564+
# features2 requires soft-float on rv32imc and xtensa.
567565
make -C examples/natmod/features2 ARCH=$arch clean
568-
if [ $arch = "rv32imc" ] || [ $arch = "armv7m" ] || [ $arch = "xtensa" ]; then
566+
if [ $arch = "rv32imc" ] || [ $arch = "xtensa" ]; then
569567
make -C examples/natmod/features2 ARCH=$arch MICROPY_FLOAT_IMPL=float
570-
elif [ $arch != "armv6m" ]; then
568+
else
571569
make -C examples/natmod/features2 ARCH=$arch
572570
fi
573571

0 commit comments

Comments
 (0)
0