Skip to content

Commit 50b1741

Browse files
committed
use compact CRT to reduce code size of example applications
1 parent ff048f1 commit 50b1741

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

examples/example_cifar10_caffe/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ OUT_NAME ?= example_cifar10_caffe
2929
ifeq ($(TOOLCHAIN),mwdt)
3030
# MWDT specific options
3131
CFLAGS = -Hnocopyr -Hpurge -Hheap=8K -Hstack=1K -Hfxapi -e_start -Bgrouplib -Hldopt=-q -Hsdata0 -Xdsp_ctrl=postshift,guard,convergent -Hdense_prologue
32+
33+
# use compact CRT
34+
CFLAGS += -Hcl -Hcrt_argv -Hcrt_fast_memcpy -Hcrt_fast_memset -Hxcheck -Hcrt_initbss
35+
3236
else
3337
PREBUILT_LIB ?= $(EMBARC_MLI_DIR)/examples/prebuilt/libmli.a
3438

examples/example_har_smartphone/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ OUT_NAME ?= example_har_smartphone
2929
ifeq ($(TOOLCHAIN),mwdt)
3030
# MWDT specific options
3131
CFLAGS = -Hnocopyr -Hpurge -Hheap=8K -Hstack=1K -Hfxapi -e_start -Bgrouplib -Hldopt=-q -Hsdata0 -Xdsp_ctrl=postshift,guard,convergent -Hdense_prologue
32+
33+
# use compact CRT
34+
CFLAGS += -Hcl -Hcrt_argv -Hcrt_fast_memcpy -Hcrt_fast_memset -Hxcheck -Hcrt_initbss
35+
3236
else
3337
PREBUILT_LIB ?= $(EMBARC_MLI_DIR)/examples/prebuilt/libmli.a
3438

0 commit comments

Comments
 (0)