Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit cbb213d

Browse files
brianjjonesgrgustaf
authored andcommitted
[ashell] Adding ide_ack function and removing serial IDE
We will now use webusb exclusively, UART is no longer used. Signed-off-by: Brian Jones <[email protected]>
1 parent 7eab5c4 commit cbb213d

19 files changed

+465
-769
lines changed

Makefile

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ OUT := $(abspath $(O))
2929
$(info Using outdir: $(OUT))
3030

3131
ifneq (,$(DEV))
32-
$(error DEV= is no longer supported, please use make ide or make ashell or make ide_term or make ide_serial)
32+
$(error DEV= is no longer supported, please use make ide or make ashell)
3333
endif
3434

3535
ifndef ZJS_BASE
@@ -85,18 +85,12 @@ ifeq ($(filter $(MAKECMDGOALS),linux), linux)
8585
$(error 'linux' make target is deprecated, use "make BOARD=linux")
8686
endif
8787

88-
ifneq (,$(filter $(MAKECMDGOALS),ide ashell ide_term ide_serial))
88+
ifneq (,$(filter $(MAKECMDGOALS),ide ashell))
8989
ifneq (,$(JS))
90-
$(error ide ide_term ide_serial and ashell do not allow for setting JS)
90+
$(error ide and ashell do not allow for setting JS)
9191
endif
9292
endif
9393

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
10094
ifeq ($(filter $(MAKECMDGOALS),ide), ide)
10195
ASHELL_TYPE=ide
10296
endif
@@ -117,9 +111,9 @@ JERRY_OUTPUT = $(OUT)/$(BOARD)/jerry/build
117111
# Generate and run snapshot as byte code instead of running JS directly
118112
ifneq (,$(filter $(MAKECMDGOALS),ide ashell linux dynamic))
119113
SNAPSHOT=off
120-
# if the user passes in SNAPSHOT=on for ide, ide_term, ide_serial, ashell, or linux give an error
114+
# if the user passes in SNAPSHOT=on for ide, ashell, or linux give an error
121115
ifeq ($(SNAPSHOT), on)
122-
$(error ide, ide_term, ide_serial, ashell, and linux do not support SNAPSHOT=$(SNAPSHOT))
116+
$(error ide, ashell, and linux do not support SNAPSHOT=$(SNAPSHOT))
123117
endif
124118
else
125119
# snapshot is enabled by default
@@ -137,7 +131,7 @@ FORCED := $(FORCE),zjs_common.json
137131
endif
138132

139133
# Settings for ashell builds
140-
ifneq (,$(filter $(MAKECMDGOALS),ide ide_term ide_serial ashell))
134+
ifneq (,$(filter $(MAKECMDGOALS),ide ashell))
141135
ASHELL=zjs_ashell_$(ASHELL_TYPE).json
142136
FORCED := $(ASHELL),$(FORCED)
143137
ASHELL_ARC=zjs_ashell_arc.json
@@ -227,12 +221,6 @@ endif
227221
.PHONY: ide
228222
ide: zephyr
229223

230-
.PHONY: ide_term
231-
ide_term: zephyr
232-
233-
.PHONY: ide_serial
234-
ide_serial: zephyr
235-
236224
.PHONY: ashell
237225
ashell: zephyr
238226

@@ -342,13 +330,6 @@ ${JERRY_BASE}/CMakeLists.txt:
342330
# set up prj.conf file
343331
-.PHONY: setup
344332
setup: ${JERRY_BASE}/CMakeLists.txt
345-
ifeq ($(ASHELL), ashell)
346-
ifeq ($(filter ide,$(MAKECMDGOALS)),cli)
347-
@echo CONFIG_USB_CDC_ACM=y >> prj.conf
348-
else
349-
@echo CONFIG_USB_CDC_ACM=n >> prj.conf
350-
endif
351-
endif
352333
ifeq ($(BOARD), arduino_101)
353334
ifeq ($(OS), Darwin)
354335
@# work around for OSX where the xtool toolchain do not
@@ -495,9 +476,7 @@ help:
495476
@echo "Build targets:"
496477
@echo " all: Build for either Zephyr or Linux depending on BOARD"
497478
@echo " zephyr: Build Zephyr for the given BOARD (A101 is default)"
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"
479+
@echo " ide Build Zephyr in development mode for the IDE"
501480
@echo " ashell Build Zephyr in development mode for command line"
502481
@echo " debug: Run Zephyr debug target"
503482
@echo " flash: Run Zephyr flash target"

src/ashell/ashell.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2017, Intel Corporation.
1+
// Copyright (c) 2017-2018, Intel Corporation.
22

33
/**
44
* @file
@@ -9,22 +9,22 @@
99

1010
void zjs_ashell_init()
1111
{
12-
#ifdef ASHELL_IDE_UART
12+
#ifdef ASHELL_UART
1313
extern void uart_init();
1414
uart_init();
1515
#else
1616
extern void ide_init();
1717
ide_init();
18-
#endif
18+
#endif // ASHELL_UART
1919
}
2020

2121
void zjs_ashell_process()
2222
{
23-
#ifdef ASHELL_IDE_UART
23+
#ifdef ASHELL_UART
2424
extern void uart_process();
2525
uart_process();
2626
#else
2727
extern void ide_process();
2828
ide_process();
29-
#endif
29+
#endif // ASHELL_UART
3030
}

src/ashell/ashell.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
#ifndef __ashell_h__
44
#define __ashell_h__
55

6-
// Switches between console and IDE protocol mode.
7-
#define ASHELL_IDE_PROTOCOL 1
8-
9-
#define ASHELL_IDE_DBG 0
10-
116
// called from Zephyr.js main.c
127
void zjs_ashell_init();
138
void zjs_ashell_process();

0 commit comments

Comments
 (0)