add generated.h with literal of js app
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
TARGET ?= jerry
|
TARGET ?= jerry
|
||||||
|
#CROSS_COMPILE ?= arm-none-eabi-
|
||||||
OBJ_DIR = obj
|
OBJ_DIR = obj
|
||||||
|
|
||||||
SOURCES = \
|
SOURCES = \
|
||||||
@@ -25,8 +25,6 @@ INCLUDES = -I src
|
|||||||
OBJS = $(sort \
|
OBJS = $(sort \
|
||||||
$(patsubst %.c,./$(OBJ_DIR)/%.o,$(notdir $(SOURCES))))
|
$(patsubst %.c,./$(OBJ_DIR)/%.o,$(notdir $(SOURCES))))
|
||||||
|
|
||||||
#CROSS_COMPILE ?= arm-none-eabi-
|
|
||||||
|
|
||||||
CC = $(CROSS_COMPILE)gcc
|
CC = $(CROSS_COMPILE)gcc
|
||||||
LD = $(CROSS_COMPILE)ld
|
LD = $(CROSS_COMPILE)ld
|
||||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||||
@@ -45,7 +43,7 @@ CFLAGS += -Wstrict-prototypes -Wmissing-prototypes
|
|||||||
#CFLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
#CFLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
||||||
#CFLAGS += -ffunction-sections -fdata-sections
|
#CFLAGS += -ffunction-sections -fdata-sections
|
||||||
|
|
||||||
DEBUG_OPTIONS = -fsanitize=address -g3 -O0 -DDEBUG
|
DEBUG_OPTIONS = -g3 -O0 -DDEBUG #-fsanitize=address
|
||||||
RELEASE_OPTIONS = -Os -Werror
|
RELEASE_OPTIONS = -Os -Werror
|
||||||
|
|
||||||
.PHONY: all debug release clean install test
|
.PHONY: all debug release clean install test
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static const char* generated_source = ""
|
||||||
|
"// AST\n"
|
||||||
|
"// ECMA has no way of including files. Do we need such feature?\n"
|
||||||
|
"// EG: Not in initial version\n"
|
||||||
|
"require (leds);\n"
|
||||||
|
"\n"
|
||||||
|
"function LEDsOn () {\n"
|
||||||
|
"LEDOn (LED3);\n"
|
||||||
|
"LEDOn (LED6);\n"
|
||||||
|
"LEDOn (LED7);\n"
|
||||||
|
"LEDOn (LED4);\n"
|
||||||
|
"LEDOn (LED10);\n"
|
||||||
|
"LEDOn (LED8);\n"
|
||||||
|
"LEDOn (LED9);\n"
|
||||||
|
"LEDOn (LED5);\n"
|
||||||
|
"}\n"
|
||||||
|
"\n"
|
||||||
|
"function LEDsOff () {\n"
|
||||||
|
"LEDOff (LED3);\n"
|
||||||
|
"LEDOff (LED6);\n"
|
||||||
|
"LEDOff (LED7);\n"
|
||||||
|
"LEDOff (LED4);\n"
|
||||||
|
"LEDOff (LED10);\n"
|
||||||
|
"LEDOff (LED8);\n"
|
||||||
|
"LEDOff (LED9);\n"
|
||||||
|
"LEDOff (LED5);\n"
|
||||||
|
"}\n"
|
||||||
|
"\n"
|
||||||
|
"/*\n"
|
||||||
|
"IMHO we don't need this function in our code,\n"
|
||||||
|
"we may perform lazy LEDs initialization.\n"
|
||||||
|
"*/\n"
|
||||||
|
"// initLEDs ();\n"
|
||||||
|
"\n"
|
||||||
|
"while (true) {\n"
|
||||||
|
"setTimeout (LEDsOn, 500);\n"
|
||||||
|
"setTimeout (LEDsOff, 500);\n"
|
||||||
|
"}\n"
|
||||||
|
;
|
||||||
Reference in New Issue
Block a user