Update RIOT target to 2021.10 (#4826)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
This commit is contained in:
@@ -13,36 +13,67 @@
|
||||
# limitations under the License.
|
||||
|
||||
# application name
|
||||
APPLICATION = riot_jerry
|
||||
APPLICATION = riot_jerryscript
|
||||
|
||||
# default BOARD enviroment
|
||||
BOARD ?= stm32f4discovery
|
||||
|
||||
# LLVM/Clang-based toolchain
|
||||
TOOLCHAIN ?= llvm
|
||||
# path to jerryscript/targets/riot-stm32f4
|
||||
TARGET_DIR = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
# path to the JERRYSCRIPT directory
|
||||
JERRYDIR ?= $(TARGET_DIR)/../..
|
||||
|
||||
# path to the RIOT base directory
|
||||
RIOTBASE ?= $(CURDIR)/../RIOT
|
||||
# path to the JERRYSCRIPT directory
|
||||
JERRYDIR ?= $(CURDIR)
|
||||
RIOTBASE ?= $(JERRYDIR)/../RIOT
|
||||
|
||||
# path to the application directory
|
||||
APPDIR ?= $(JERRYDIR)/targets/riot-stm32f4/source
|
||||
|
||||
# path to the binary directory
|
||||
BINDIR ?= $(JERRYDIR)/targets/riot-stm32f4/bin/
|
||||
BUILDDIR ?= $(JERRYDIR)/build/riot-stm32f4
|
||||
|
||||
# path to the binary directory
|
||||
BINDIR ?= $(BUILDDIR)/bin
|
||||
|
||||
# Change this to 0 show compiler invocation lines by default:
|
||||
QUIET ?= 1
|
||||
|
||||
INCLUDES += -I$(JERRYDIR)/jerry-core/include -I$(JERRYDIR)/jerry-ext/include
|
||||
INCLUDES += -I$(JERRYDIR)/jerry-core/include
|
||||
INCLUDES += -I$(JERRYDIR)/jerry-ext/include
|
||||
|
||||
ARCHIVES += $(JERRYDIR)/build/lib/libjerry-core.a
|
||||
ARCHIVES += $(JERRYDIR)/build/lib/libjerry-ext.a
|
||||
ARCHIVES += $(JERRYDIR)/build/lib/libjerry-port-default.a
|
||||
|
||||
# Add the shell and some shell commands
|
||||
USEMODULE += shell
|
||||
USEMODULE += shell_commands
|
||||
USEMODULE += posix_sleep
|
||||
|
||||
# Add the jerry libs
|
||||
USEMODULE += libjerry-core libjerry-port-default libjerry-ext
|
||||
.PHONY: libjerry
|
||||
libjerry:
|
||||
$(JERRYDIR)/tools/build.py \
|
||||
--clean \
|
||||
--lto=OFF \
|
||||
--jerry-cmdline=OFF \
|
||||
--jerry-math=ON \
|
||||
--amalgam=ON \
|
||||
--mem-heap=70 \
|
||||
--profile=es.next \
|
||||
--compile-flag=-fshort-enums \
|
||||
--toolchain=$(abspath $(JERRYDIR)/cmake/toolchain_mcu_stm32f4.cmake)
|
||||
|
||||
.PHONY: clear-cflags
|
||||
clear-cflags:
|
||||
$(eval BACKUP := $(CFLAGS))
|
||||
$(eval CFLAGS := )
|
||||
|
||||
.PHONY: restore-cflags
|
||||
restore-cflags:
|
||||
$(eval CFLAGS := $(BACKUP))
|
||||
|
||||
# CFLAGS is filled by Makefile.include that is only for RIOT.
|
||||
# Clear CFLAGS temporarily while compiling JerryScript.
|
||||
all: clear-cflags libjerry restore-cflags
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
Reference in New Issue
Block a user