Skip to content

Commit d8151ff

Browse files
committed
examples/natmod: Use LINK_RUNTIME=1 when building for armv6m.
To get division helper functions, eg `__aeabi_uidiv`, `__aeabi_idiv` and `__aeabi_uidivmod`. Signed-off-by: Damien George <damien@micropython.org>
1 parent 53be567 commit d8151ff

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

examples/natmod/btree/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ endif
3939
# Use our own errno implementation if Picolibc is used
4040
CFLAGS += -D__PICOLIBC_ERRNO_FUNCTION=__errno
4141

42+
ifeq ($(ARCH),armv6m)
43+
# Link with libgcc.a for division helper functions
44+
LINK_RUNTIME = 1
45+
endif
46+
4247
include $(MPY_DIR)/py/dynruntime.mk
4348

4449
# btree needs gnu99 defined

examples/natmod/deflate/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ SRC = deflate.c
1010
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
1111
ARCH ?= x64
1212

13+
ifeq ($(ARCH),armv6m)
14+
# Link with libgcc.a for division helper functions
15+
LINK_RUNTIME = 1
16+
endif
17+
1318
ifeq ($(ARCH),xtensa)
1419
# Link with libm.a and libgcc.a from the toolchain
1520
LINK_RUNTIME = 1

examples/natmod/framebuf/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ SRC = framebuf.c
1010
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
1111
ARCH ?= x64
1212

13+
ifeq ($(ARCH),armv6m)
14+
# Link with libgcc.a for division helper functions
15+
LINK_RUNTIME = 1
16+
endif
17+
1318
ifeq ($(ARCH),xtensa)
1419
MPY_EXTERN_SYM_FILE=$(MPY_DIR)/ports/esp8266/boards/eagle.rom.addr.v6.ld
1520
endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy