Makefile.projbuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #
  2. # eFuse Manager ganeretes header file.
  3. #
  4. .PHONY: efuse_custom_table efuse_common_table efuse_test_table show_efuse_table
  5. GEN_EFUSE_TABLE := $(PYTHON) $(COMPONENT_PATH)/efuse_table_gen.py
  6. GEN_EFUSE_TABLE_ARG := --max_blk_len $(CONFIG_EFUSE_MAX_BLK_LEN)
  7. ###################
  8. # Make common files esp_efuse_table.c and include/esp_efuse_table.h files.
  9. SOC_NAME := $(IDF_TARGET)
  10. EFUSE_COMMON_TABLE_CSV_PATH := $(COMPONENT_PATH)/$(SOC_NAME)/esp_efuse_table.csv
  11. efuse_common_table:
  12. @echo "COMMON_TABLE_CSV: $(EFUSE_COMMON_TABLE_CSV_PATH)"
  13. $(GEN_EFUSE_TABLE) $(EFUSE_COMMON_TABLE_CSV_PATH) $(GEN_EFUSE_TABLE_ARG)
  14. ###################
  15. # Make custom files project/main/esp_efuse_custom_table.c and project/main/include/esp_efuse_custom_table.h files.
  16. ifdef CONFIG_EFUSE_CUSTOM_TABLE
  17. # Path to CSV file is relative to project path for custom CSV files.
  18. EFUSE_CUSTOM_TABLE_CSV_PATH := $(call dequote,$(abspath $(call dequote, $(PROJECT_PATH))/$(call dequote,$(CONFIG_EFUSE_CUSTOM_TABLE_FILENAME))))
  19. efuse_custom_table:
  20. @echo "COMMON_TABLE_CSV: $(EFUSE_COMMON_TABLE_CSV_PATH)"
  21. @echo "CUSTOM_TABLE_CSV: $(EFUSE_CUSTOM_TABLE_CSV_PATH)"
  22. $(GEN_EFUSE_TABLE) $(EFUSE_COMMON_TABLE_CSV_PATH) $(EFUSE_CUSTOM_TABLE_CSV_PATH) $(GEN_EFUSE_TABLE_ARG)
  23. else
  24. efuse_custom_table:
  25. EFUSE_CUSTOM_TABLE_CSV_PATH :=
  26. EFUSE_CUSTOM_TABLE_OUT_PATH :=
  27. endif # ifdef CONFIG_EFUSE_CUSTOM_TABLE
  28. ###################
  29. # print to console efuse table
  30. show_efuse_table:
  31. $(GEN_EFUSE_TABLE) $(EFUSE_COMMON_TABLE_CSV_PATH) $(EFUSE_CUSTOM_TABLE_CSV_PATH) $(GEN_EFUSE_TABLE_ARG) --info
  32. ###################
  33. # Generates files for unit test. This command is run manually.
  34. EFUSE_TEST_TABLE_CSV_PATH := $(COMPONENT_PATH)/test/esp_efuse_test_table.csv
  35. efuse_test_table:
  36. $(GEN_EFUSE_TABLE) $(EFUSE_TEST_TABLE_CSV_PATH) $(GEN_EFUSE_TABLE_ARG)