@@ -29,7 +29,7 @@ OUT := $(abspath $(O))
29
29
$(info Using outdir : $(OUT ) )
30
30
31
31
ifneq (,$(DEV ) )
32
- $(error DEV= is no longer supported, please use make ide or make ashell)
32
+ $(error DEV= is no longer supported, please use make ide or make ashell or make ide_term or make ide_serial )
33
33
endif
34
34
35
35
ifndef ZJS_BASE
@@ -85,12 +85,18 @@ ifeq ($(filter $(MAKECMDGOALS),linux), linux)
85
85
$(error 'linux' make target is deprecated, use "make BOARD=linux")
86
86
endif
87
87
88
- ifneq (,$(filter $(MAKECMDGOALS ) ,ide ashell) )
88
+ ifneq (,$(filter $(MAKECMDGOALS ) ,ide ashell ide_term ide_serial ) )
89
89
ifneq (,$(JS ) )
90
- $(error ide and ashell do not allow for setting JS)
90
+ $(error ide ide_term ide_serial and ashell do not allow for setting JS)
91
91
endif
92
92
endif
93
93
94
+ ifeq ($(filter $(MAKECMDGOALS ) ,ide_term) , ide_term)
95
+ ASHELL_TYPE =ide_term
96
+ endif
97
+ ifeq ($(filter $(MAKECMDGOALS ) ,ide_serial) , ide_serial)
98
+ ASHELL_TYPE =ide_serial
99
+ endif
94
100
ifeq ($(filter $(MAKECMDGOALS ) ,ide) , ide)
95
101
ASHELL_TYPE =ide
96
102
endif
@@ -111,9 +117,9 @@ JERRY_OUTPUT = $(OUT)/$(BOARD)/jerry/build
111
117
# Generate and run snapshot as byte code instead of running JS directly
112
118
ifneq (,$(filter $(MAKECMDGOALS ) ,ide ashell linux dynamic) )
113
119
SNAPSHOT =off
114
- # if the user passes in SNAPSHOT=on for ide, ashell, or linux give an error
120
+ # if the user passes in SNAPSHOT=on for ide, ide_term, ide_serial, ashell, or linux give an error
115
121
ifeq ($(SNAPSHOT ) , on)
116
- $(error ide, ashell, and linux do not support SNAPSHOT=$(SNAPSHOT))
122
+ $(error ide, ide_term, ide_serial, ashell, and linux do not support SNAPSHOT=$(SNAPSHOT))
117
123
endif
118
124
else
119
125
# snapshot is enabled by default
@@ -131,7 +137,7 @@ FORCED := $(FORCE),zjs_common.json
131
137
endif
132
138
133
139
# Settings for ashell builds
134
- ifneq (,$(filter $(MAKECMDGOALS ) ,ide ashell) )
140
+ ifneq (,$(filter $(MAKECMDGOALS ) ,ide ide_term ide_serial ashell) )
135
141
ASHELL =zjs_ashell_$(ASHELL_TYPE ) .json
136
142
FORCED := $(ASHELL ) ,$(FORCED )
137
143
ASHELL_ARC =zjs_ashell_arc.json
@@ -221,6 +227,12 @@ endif
221
227
.PHONY : ide
222
228
ide : zephyr
223
229
230
+ .PHONY : ide_term
231
+ ide_term : zephyr
232
+
233
+ .PHONY : ide_serial
234
+ ide_serial : zephyr
235
+
224
236
.PHONY : ashell
225
237
ashell : zephyr
226
238
@@ -331,10 +343,10 @@ ${JERRY_BASE}/CMakeLists.txt:
331
343
-.PHONY : setup
332
344
setup : ${JERRY_BASE}/CMakeLists.txt
333
345
ifeq ($(ASHELL ) , ashell)
334
- ifeq ($(filter ide,$(MAKECMDGOALS ) ) ,ide)
335
- @echo CONFIG_USB_CDC_ACM=n >> prj.conf
336
- else
346
+ ifeq ($(filter ide,$(MAKECMDGOALS ) ) ,cli)
337
347
@echo CONFIG_USB_CDC_ACM=y >> prj.conf
348
+ else
349
+ @echo CONFIG_USB_CDC_ACM=n >> prj.conf
338
350
endif
339
351
endif
340
352
ifeq ($(BOARD ) , arduino_101)
@@ -483,7 +495,9 @@ help:
483
495
@echo " Build targets:"
484
496
@echo " all: Build for either Zephyr or Linux depending on BOARD"
485
497
@echo " zephyr: Build Zephyr for the given BOARD (A101 is default)"
486
- @echo " ide Build Zephyr in development mode for the IDE"
498
+ @echo " ide Build Zephyr in development mode for the IDE using the IDE protocol"
499
+ @echo " ide_serial Build Zephyr in development mode for the IDE using UART transport"
500
+ @echo " ide_term Build Zephyr in development mode for the IDE using command line terminal"
487
501
@echo " ashell Build Zephyr in development mode for command line"
488
502
@echo " debug: Run Zephyr debug target"
489
503
@echo " flash: Run Zephyr flash target"
0 commit comments