Skip to content

Commit cf41df6

Browse files
committed
add -nojacs build
1 parent c34f9c3 commit cf41df6

File tree

6 files changed

+32
-5
lines changed

6 files changed

+32
-5
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ jobs:
2929
target: esp32s2
3030
command: make dist clean
3131

32+
- run: echo 'TARGET=esp32s2-nojacs' > Makefile.user
33+
- run: make prep
34+
35+
- name: esp-idf build
36+
uses: espressif/esp-idf-ci-action@main
37+
with:
38+
esp_idf_version: v4.4.1
39+
target: esp32s2
40+
command: make dist clean
41+
3242
- run: echo 'TARGET=esp32c3' > Makefile.user
3343
- run: make prep
3444

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cmake_minimum_required(VERSION 3.5)
22

33
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
4+
include(build/options.cmake)
45

56
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=esp_panic_handler" APPEND)
67
idf_build_set_property(LINK_OPTIONS "-Wl,--wrap=uart_hal_write_txfifo" APPEND)

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ include Makefile.user
88

99
MON_PORT ?= $(SERIAL_PORT)
1010

11+
ifeq ($(TARGET),esp32s2-nojacs)
12+
TARGET := esp32s2
13+
TARGET_SUFF := -nojacs
14+
COMPILE_OPTIONS += -DNO_JACSCRIPT=1
15+
endif
16+
1117
ifeq ($(TARGET),esp32s2)
1218
GCC_PREF = xtensa-esp32s2-elf
1319
UF2 = 1
@@ -40,6 +46,7 @@ all: check-export prep
4046

4147
sdkconfig.defaults: Makefile.user
4248
cat config/sdkconfig.$(TARGET) config/sdkconfig.common > sdkconfig.defaults
49+
echo "idf_build_set_property(COMPILE_OPTIONS "$(COMPILE_OPTIONS)" APPEND)" > build/options.cmake
4350

4451
clean:
4552
rm -rf sdkconfig sdkconfig.defaults build
@@ -89,12 +96,12 @@ FW_VERSION = $(shell sh jacdac-c/scripts/git-version.sh)
8996
dist: all
9097
mkdir -p dist
9198
ifeq ($(UF2),1)
92-
cp build/espjd.uf2 dist/jacscript-$(TARGET).uf2
99+
cp build/espjd.uf2 dist/jacscript-$(TARGET)$(TARGET_SUFF).uf2
93100
else
94-
cp build/combined.bin dist/jacscript-$(TARGET)-0x0.bin
101+
cp build/combined.bin dist/jacscript-$(TARGET)$(TARGET_SUFF)-0x0.bin
95102
endif
96103
# also keep ELF file for addr2line
97-
cp build/espjd.elf dist/jacscript-$(TARGET).elf
104+
cp build/espjd.elf dist/jacscript-$(TARGET)$(TARGET_SUFF).elf
98105

99106
bump:
100107
sh ./scripts/bump.sh

jacdac-c

main/jd_user_config.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@
88
#define JD_LOG DMESG
99
#define JD_WR_OVERHEAD 28
1010

11+
#ifndef NO_JACSCRIPT
1112
#define JD_CLIENT 1
13+
#endif
14+
15+
#define JD_MS_TIMER 1
16+
#define JD_FREE_SUPPORTED 1
17+
#define JD_ADVANCED_STRING 1
18+
#define JD_LSTORE 1
1219

1320
#ifndef __XTENSA__
1421

main/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,14 @@ void app_init_services(void) {
180180
pwr_cfg.en_active_high = 1;
181181
power_init(&pwr_cfg);
182182
#endif
183+
#ifndef NO_JACSCRIPT
183184
jd_role_manager_init();
184185
init_jacscript_manager();
185-
#if 1
186+
#endif
186187
wifi_init();
187188
azureiothub_init();
188189
jacscloud_init(&azureiothub_cloud);
190+
#ifndef NO_JACSCRIPT
189191
tsagg_init(&azureiothub_cloud);
190192
#endif
191193
}

0 commit comments

Comments
 (0)