1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/zptr/Makefile.include
Kaspar Schleiser 5dc32b14cc sys: zptr: initial commit
Provides functionality to compress pointers from 32bit to 16bit if
possible.
2020-02-11 13:59:59 +01:00

15 lines
522 B
Makefile

# zptr can use pointer compression of four byte aligned pointers, by right-
# shifting them by two and stuffing in an uint16_t.
# That only works on 32bit platforms, if total RAM size is <=2**18 and the
# start address is known.
ifneq (,$(filter arch_32bit,$(FEATURES_USED)))
ifneq (,$(RAM_START_ADDR))
ifneq (,$(RAM_LEN))
# this handles 0xXXX and xxxK
ifeq (1,$(shell echo $$(($(subst K,*1024,$(RAM_LEN)) <= 262144))))
CFLAGS += -DZPTR_BASE=$(RAM_START_ADDR)
endif
endif
endif
endif