mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
9822055851
Added support using BLK1 and BLK2 in custom table. Added change size key in BLK1 and BLK2 if coding scheme was changed.
60 lines
2.5 KiB
Makefile
60 lines
2.5 KiB
Makefile
#
|
|
# eFuse Manager ganeretes header file.
|
|
#
|
|
# .PHONY: efuse_table efuse_test_table show_efuse_table
|
|
|
|
GEN_TOOL := $(COMPONENT_PATH)/efuse_table_gen.py
|
|
GEN_EFUSE_TABLE := $(PYTHON) $(GEN_TOOL)
|
|
|
|
GEN_EFUSE_TABLE_ARG := --coding_scheme $(CONFIG_EFUSE_CODE_SCHEME)
|
|
|
|
ifdef CONFIG_EFUSE_CUSTOM_TABLE_USE_BLK1
|
|
GEN_EFUSE_TABLE_ARG += --custom_table_use_BLK1
|
|
endif
|
|
|
|
ifdef CONFIG_EFUSE_CUSTOM_TABLE_USE_BLK2
|
|
GEN_EFUSE_TABLE_ARG += --custom_table_use_BLK2
|
|
endif
|
|
|
|
ifdef CONFIG_EFUSE_COMMON_TABLE_FIX_SIZE_BLK1_BLK2_DEP_ON_CODE_SCHEME
|
|
GEN_EFUSE_TABLE_ARG += --common_table_fix_size_secure_key_and_encrypt_key
|
|
endif
|
|
|
|
###################
|
|
# Make common files esp_efuse_table.c and include/esp_efuse_table.h files.
|
|
SOC_NAME := $(IDF_TARGET)
|
|
EFUSE_COMMON_TABLE_CSV_PATH := $(COMPONENT_PATH)/$(SOC_NAME)/esp_efuse_table.csv
|
|
EFUSE_COMMON_TABLE_OUT_PATH := $(COMPONENT_PATH)/$(SOC_NAME)/esp_efuse_table.c
|
|
|
|
###################
|
|
# Make custom files project/main/esp_efuse_custom_table.c and project/main/include/esp_efuse_custom_table.h files.
|
|
ifdef CONFIG_EFUSE_CUSTOM_TABLE
|
|
# Path to CSV file is relative to project path for custom CSV files.
|
|
EFUSE_CUSTOM_TABLE_CSV_PATH := $(call dequote,$(abspath $(call dequote, $(PROJECT_PATH))/$(call dequote,$(CONFIG_EFUSE_CUSTOM_TABLE_FILENAME))))
|
|
EFUSE_CUSTOM_TABLE_OUT_PATH_CSV := $(call dequote,$(abspath $(call dequote, $(PROJECT_PATH))/$(call dequote,$(CONFIG_EFUSE_CUSTOM_TABLE_FILENAME))))
|
|
EFUSE_CUSTOM_TABLE_OUT_PATH := $(EFUSE_CUSTOM_TABLE_OUT_PATH_CSV:.csv=.c)
|
|
else
|
|
EFUSE_CUSTOM_TABLE_CSV_PATH :=
|
|
EFUSE_CUSTOM_TABLE_OUT_PATH :=
|
|
endif # ifdef CONFIG_EFUSE_CUSTOM_TABLE
|
|
|
|
efuse_table: $(EFUSE_COMMON_TABLE_OUT_PATH) $(EFUSE_CUSTOM_TABLE_OUT_PATH)
|
|
|
|
$(EFUSE_COMMON_TABLE_OUT_PATH): $(EFUSE_COMMON_TABLE_CSV_PATH) $(SDKCONFIG_MAKEFILE)
|
|
@echo "COMMON_TABLE_CSV: $(EFUSE_COMMON_TABLE_CSV_PATH)"
|
|
$(GEN_EFUSE_TABLE) $(EFUSE_COMMON_TABLE_CSV_PATH) $(GEN_EFUSE_TABLE_ARG)
|
|
|
|
$(EFUSE_CUSTOM_TABLE_OUT_PATH): $(EFUSE_CUSTOM_TABLE_CSV_PATH) $(SDKCONFIG_MAKEFILE)
|
|
@echo "CUSTOM_TABLE_CSV: $(EFUSE_CUSTOM_TABLE_CSV_PATH)"
|
|
$(GEN_EFUSE_TABLE) $(EFUSE_COMMON_TABLE_CSV_PATH) $(EFUSE_CUSTOM_TABLE_CSV_PATH) $(GEN_EFUSE_TABLE_ARG)
|
|
|
|
# print to console efuse table
|
|
show_efuse_table:
|
|
$(GEN_EFUSE_TABLE) $(EFUSE_COMMON_TABLE_CSV_PATH) $(EFUSE_CUSTOM_TABLE_CSV_PATH) $(GEN_EFUSE_TABLE_ARG) --info
|
|
|
|
###################
|
|
# Generates files for unit test. This command is run manually.
|
|
EFUSE_TEST_TABLE_CSV_PATH := $(COMPONENT_PATH)/test/esp_efuse_test_table.csv
|
|
efuse_test_table:
|
|
$(GEN_EFUSE_TABLE) $(EFUSE_TEST_TABLE_CSV_PATH) $(GEN_EFUSE_TABLE_ARG)
|