@@ -71,6 +71,7 @@ APP_INC += -I../lib/oofatfs
7171APP_INC += -I../lib
7272APP_INC += -I../drivers/sx127x
7373APP_INC += -I../ports/stm32
74+ APP_INC += -I$(ESP_IDF_COMP_PATH ) /openthread/src
7475
7576APP_MAIN_SRC_C = \
7677 main.c \
@@ -127,7 +128,6 @@ APP_MODS_SRC_C = $(addprefix mods/,\
127128 modusocket.c \
128129 modnetwork.c \
129130 modwlan.c \
130- moduselect.c \
131131 modutime.c \
132132 modpycom.c \
133133 moduqueue.c \
@@ -191,6 +191,11 @@ APP_LORA_SRC_C = $(addprefix lora/,\
191191 sx1276-board.c \
192192 sx1272-board.c \
193193 board.c \
194+ otplat_alarm.c \
195+ otplat_radio.c \
196+ ot-settings.c \
197+ ot-log.c \
198+ ot-task.c \
194199 )
195200
196201APP_LIB_LORA_SRC_C = $(addprefix lib/lora/,\
@@ -435,7 +440,7 @@ SIGN_BINARY = $(ESPSECUREPY) sign_data --keyfile $(SECURE_KEY)
435440
436441# actual command for signing a binary
437442# it should be used as:
438- # $(ENCRYPT_BINARY) $(ENCRYPT_0x10000) -o image_encrypt.bin image.bin
443+ # $(ENCRYPT_BINARY) $(ENCRYPT_0x10000) -o image_encrypt.bin image.bin
439444ENCRYPT_BINARY = $(ESPSECUREPY ) encrypt_flash_data --keyfile $(ENCRYPT_KEY )
440445ENCRYPT_0x10000 = --address 0x10000
441446ENCRYPT_0x1A0000 = --address 0x1A0000
@@ -466,20 +471,20 @@ CFLAGS += -DCONFIG_SECURE_BOOT_ENABLED=1
466471# find the configured private key file
467472ORIG_SECURE_KEY := $(call resolvepath,$(call dequote,$(SECURE_KEY ) ) ,$(PROJECT_PATH ) )
468473
469- $(ORIG_SECURE_KEY ) :
474+ $(ORIG_SECURE_KEY ) :
470475 $(ECHO ) " Secure boot signing key '$@ ' missing. It can be generated using: "
471476 $(ECHO ) " $( ESPSECUREPY) generate_signing_key $( SECURE_KEY) "
472477 exit 1
473478
474- # public key name; the name is important
479+ # public key name; the name is important
475480# because it will go into the elf with symbols having name derived out of this one
476481SECURE_BOOT_VERIFICATION_KEY = signature_verification_key.bin
477482
478483# verification key derived from signing key.
479484$(SECURE_BOOT_VERIFICATION_KEY ) : $(ORIG_SECURE_KEY )
480485 $(ESPSECUREPY ) extract_public_key --keyfile $< $@
481486
482- # key used for bootloader digest
487+ # key used for bootloader digest
483488SECURE_BOOTLOADER_KEY = secure-bootloader-key.bin
484489
485490$(SECURE_BOOTLOADER_KEY ) : $(ORIG_SECURE_KEY )
@@ -490,15 +495,15 @@ BOOTLOADER_REFLASH_DIGEST = $(BUILD)/bootloader/bootloader-reflash-digest.bin
490495BOOTLOADER_REFLASH_DIGEST_ENC = $(BOOTLOADER_REFLASH_DIGEST ) _enc
491496
492497ORIG_ENCRYPT_KEY := $(call resolvepath,$(call dequote,$(ENCRYPT_KEY ) ) ,$(PROJECT_PATH ) )
493- $(ORIG_ENCRYPT_KEY ) :
498+ $(ORIG_ENCRYPT_KEY ) :
494499 $(ECHO ) " WARNING: Encryption key '$@ ' missing. It can be created using: "
495500 $(ECHO ) " $( ESPSECUREPY) generate_flash_encryption_key $( ENCRYPT_KEY) "
496501 exit 1
497-
502+
498503else #ifeq ($(SECURE), on)
499- SECURE_BOOT_VERIFICATION_KEY =
500- SECURE_BOOTLOADER_KEY =
501- ORIG_ENCRYPT_KEY =
504+ SECURE_BOOT_VERIFICATION_KEY =
505+ SECURE_BOOTLOADER_KEY =
506+ ORIG_ENCRYPT_KEY =
502507endif # ifeq ($(SECURE), on)
503508
504509
@@ -525,7 +530,7 @@ ifeq ($(SECURE), on)
525530 $(OBJCOPY) $(OBJCOPY_EMBED_ARGS) $(SECURE_BOOT_VERIFICATION_KEY) $(SECURE_BOOT_VERIFICATION_KEY).bin.o ;\
526531 $(AR) cru libbootloader_support.a *.o ;\
527532 $(CP) libbootloader_support.a ../
528- $(Q) $(RM) -rf ./bootloader/lib/bootloader_support_temp
533+ $(Q) $(RM) -rf ./bootloader/lib/bootloader_support_temp
529534endif # ifeq ($(SECURE), on)
530535 $(ECHO) "LINK $(CC) *** $(BOOT_LDFLAGS) *** $(BOOT_LIBS) -o $@"
531536 $(Q) $(CC) $(BOOT_LDFLAGS) $(BOOT_LIBS) -o $@
@@ -591,7 +596,7 @@ ifeq ($(SECURE), on)
591596endif # ifeq ($(SECURE), on)
592597 $(ECHO) "LINK $@"
593598 $(Q) $(CC) $(APP_LDFLAGS) $(APP_LIBS) -o $@
594- $(Q) $( SIZE) $@
599+ $(SIZE) $@
595600
596601$(APP_BIN ) : $(BUILD ) /application.elf $(PART_BIN ) $(ORIG_ENCRYPT_KEY )
597602 $(ECHO ) " IMAGE $@ "
@@ -626,7 +631,7 @@ ifeq ($(SECURE), on)
626631 $(ECHO) $(SEPARATOR)
627632 $(ECHO) $(SEPARATOR)
628633endif # feq ($(SECURE), on)
629-
634+
630635$(BUILD ) /esp32_out.ld : $(ESP_IDF_COMP_PATH ) /esp32/ld/esp32.ld sdkconfig.h
631636 $(ECHO ) " CPP $@ "
632637 $(Q ) $(CC ) -I. -C -P -x c -E $< -o $@
0 commit comments