Revive target: ESP8266

This patch updates ESP8266 build system and code base as well.
 - Removed unnecessary files.
 - Decreased code size.
 - Refactored jerry_{port, extapi, run}.c to make it more easy to handle.
 - Readme.md is updated as well which contains detailed step by step description about how to set up environment and use JerryScript.

Finally, it solves the related issue #1375.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2017-10-02 13:47:36 +02:00
committed by yichoi
parent bdcd2d8179
commit c3a9821171
18 changed files with 336 additions and 927 deletions
+36 -19
View File
@@ -40,8 +40,16 @@ SPECIAL_MKTARGETS=$(APP_MKTARGETS)
SUBDIRS= user
endif # } PDIR
# path to the JERRYSCRIPT directory
JERRYDIR ?= $(CURDIR)/../../..
LDDIR = $(SDK_PATH)/ld
#############################################################
# JerryScript requires a modified linker script with specified alignments
# so we use it instead of the original one from SDK.
JERRY_LD_FILE = $(CURDIR)/ld/eagle.app.v6.ld
CCFLAGS += -Os
#CCFLAGS += -O0
@@ -52,7 +60,7 @@ TARGET_LDFLAGS = \
--text-section-literals
ifeq ($(FLAVOR),debug)
TARGET_LDFLAGS += -O0
TARGET_LDFLAGS += -O0 -g
endif
ifeq ($(FLAVOR),release)
@@ -60,45 +68,53 @@ ifeq ($(FLAVOR),release)
endif
COMPONENTS_eagle.app.v6 = \
user/libuser.a \
user/libuser.a
LINKFLAGS_eagle.app.v6 = \
-L$(SDK_PATH)/lib \
-Wl,--gc-sections \
-Wl,-Map,output.map \
-nostdlib \
-T$(LD_FILE) \
-T$(JERRY_LD_FILE) \
-Wl,--no-check-sections \
-u call_user_start \
-Wl,-static \
-Wl,--start-group \
-lminic \
-lcirom \
-lcrypto \
-lespconn \
-lespnow \
-lfreertos \
-lgcc \
-lhal \
-ljson \
-llwip \
-ldriver \
-lmain \
-lmesh \
-lmirom \
-lnet80211 \
-lnopoll \
-lphy \
-lpp \
-lnet80211 \
-lpwm \
-lsmartconfig \
-lspiffs \
-lssl \
-lwpa \
-lmain \
-lfreertos \
-llwip \
-lwps \
-L./libs \
-ljerrycore \
-ljerryentry \
-ljerrylibm \
-ljerry-core \
-ljerry-libm \
$(DEP_LIBS_eagle.app.v6) \
./libs/lib_a-setjmp.o \
-Wl,--end-group
DEPENDS_eagle.app.v6 = \
$(LD_FILE) \
$(JERRY_LD_FILE) \
$(LDDIR)/eagle.rom.addr.v6.ld \
./source/jerry-targetjs.h \
./libs/libjerrylibm.a \
./libs/libjerrycore.a \
./libs/libjerryentry.a
./include/jerry-targetjs.h \
./libs/libjerry-core.a \
./libs/libjerry-libm.a
#############################################################
@@ -138,6 +154,7 @@ DDEFINES += \
# Required for each makefile to inherit from the parent
#
INCLUDES := -I $(JERRYDIR)/jerry-core/include
INCLUDES := $(INCLUDES) -I $(PDIR)include -I $(PDIR)source
sinclude $(SDK_PATH)/Makefile