Skip to content

Commit 34890ad

Browse files
committed
Makefile: add bundle generation and compute size
1 parent f763201 commit 34890ad

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@ PROJECT_NAME := nina-fw
22

33
EXTRA_COMPONENT_DIRS := $(PWD)/arduino
44

5-
CPPFLAGS += -DARDUINO
5+
CMD_GEN_BUNDLE = $(shell python $(PWD)/tools/gen_crt_bundle.py -i $(PWD)/data/cacrt_all.pem)
6+
CMD_BUNDLE_SIZE = $(shell stat -L -c %s ./x509_crt_bundle)
7+
READ_BUNDLE_SIZE = $(eval BUNDLE_SIZE=$(CMD_BUNDLE_SIZE))
8+
9+
$(CMD_GEN_BUNDLE)
10+
$(READ_BUNDLE_SIZE)
11+
$(info SIZEIS $(BUNDLE_SIZE))
12+
13+
CPPFLAGS += -DARDUINO -DCRT_BUNDLE_SIZE=$(BUNDLE_SIZE)
614

715
ifeq ($(RELEASE),1)
816
CFLAGS += -DNDEBUG -DCONFIG_FREERTOS_ASSERT_DISABLE -Os -DLOG_LOCAL_LEVEL=0
@@ -29,5 +37,6 @@ firmware: all
2937

3038
clean:
3139
rm -rf NINA_W102*
40+
rm -rf x509_crt_bundle
3241

3342
.PHONY: firmware, clean

0 commit comments

Comments
 (0)