<commit_before>include ../py/mkenv.mk

# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h
QSTR_GEN_EXTRA_CFLAGS += $(INC_BT)

MICROPY_PY_USSL = 0
MICROPY_SSL_AXTLS = 0
MICROPY_FATFS = 1
MICROPY_PY_BTREE = 0

#FROZEN_DIR = scripts
FROZEN_MPY_DIR = modules

# include py core make definitions
include ../py/py.mk

PORT ?= /dev/ttyUSB0
BAUD ?= 460800
FLASH_MODE ?= dio
FLASH_FREQ ?= 40m
FLASH_SIZE ?= 4MB
CROSS_COMPILE ?= xtensa-esp32-elf-

# paths to ESP IDF and its components
ifeq ($(ESPIDF),)
$(error Please configure the ESPIDF variable)
endif
ESPCOMP = $(ESPIDF)/components
ESPTOOL ?= $(ESPCOMP)/esptool_py/esptool/esptool.py

# verify the ESP IDF version
ESPIDF_SUPHASH := f73c6f875cc564fa6c9962be71eac4dbdc56aa63
ESPIDF_CURHASH := $(shell git -C $(ESPIDF) show -s --pretty=format:'%H')
ifneq ($(ESPIDF_CURHASH),$(ESPIDF_SUPHASH))
$(info ** WARNING **)
$(info The git hash of ESP IDF does not match the supported version)
$(info The build may complete and the firmware may work but it is not guaranteed)
$(info ESP IDF path:       $(ESPIDF))
$(info Current git hash:   $(ESPIDF_CURHASH))
$(info Supported git hash: $(ESPIDF_SUPHASH))
endif

# pretty format of ESP IDF version, used internally by the IDF
IDF_VER := $(shell git -C $(ESPIDF) describe)


# Include dirs for both BT and MAIN
INC_COMMON =  -I.
INC_COMMON += -I..
INC_COMMON += -I$(ESPCOMP)/log/include
INC_COMMON += -I$(ESPCOMP)/esp32/include
INC_COMMON += -I$(ESPCOMP)/soc/esp32/include
INC_COMMON += -I$(ESPCOMP)/freertos/include
INC_COMMON += -I$(ESPCOMP)/tcpip_adapter/include
INC_COMMON += -I$(ESPCOMP)/lwip/include/lwip
INC_COMMON += -I$(ESPCOMP)/lwip/include/lwip/port
INC_COMMON += -I$(ESPCOMP)/driver/include/driver
INC_COMMON += -I$(ESPCOMP)/driver/include
INC_COMMON += -I$(ESPCOMP)/nvs_flash/include
INC_COMMON += -I$(ESPCOMP)/spi_flash/include
INC_COMMON += -I$(BUILD)

# Include dirs for main code base, excluding BT
INC_MAIN += -I../lib/mp-readline
INC_MAIN += -I../lib/netutils
INC_MAIN += -I../lib/timeutils
INC_MAIN += -I$(ESPCOMP)/bootloader_support/include
INC_MAIN += -I$(ESPCOMP)/nghttp/port/include
INC_MAIN += -I$(ESPCOMP)/nghttp/include
INC_MAIN += -I$(ESPCOMP)/ethernet/include
INC_MAIN += -I$(ESPCOMP)/expat/include/expat
INC_MAIN += -I$(ESPCOMP)/expat/port/include
INC_MAIN += -I$(ESPCOMP)/json/include
INC_MAIN += -I$(ESPCOMP)/json/port/include
INC_MAIN += -I$(ESPCOMP)/newlib/include
INC_MAIN += -I$(ESPCOMP)/lwip/include/lwip/port
INC_MAIN += -I$(ESPCOMP)/lwip/include/lwip/posix<commit_msg>esp32/Makefile: spi_flash/include --> INC_MAIN<commit_after>include ../py/mkenv.mk

# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h
QSTR_GEN_EXTRA_CFLAGS += $(INC_BT)

MICROPY_PY_USSL = 0
MICROPY_SSL_AXTLS = 0
MICROPY_FATFS = 1
MICROPY_PY_BTREE = 0

#FROZEN_DIR = scripts
FROZEN_MPY_DIR = modules

# include py core make definitions
include ../py/py.mk

PORT ?= /dev/ttyUSB0
BAUD ?= 460800
FLASH_MODE ?= dio
FLASH_FREQ ?= 40m
FLASH_SIZE ?= 4MB
CROSS_COMPILE ?= xtensa-esp32-elf-

# paths to ESP IDF and its components
ifeq ($(ESPIDF),)
$(error Please configure the ESPIDF variable)
endif
ESPCOMP = $(ESPIDF)/components
ESPTOOL ?= $(ESPCOMP)/esptool_py/esptool/esptool.py

# verify the ESP IDF version
ESPIDF_SUPHASH := f73c6f875cc564fa6c9962be71eac4dbdc56aa63
ESPIDF_CURHASH := $(shell git -C $(ESPIDF) show -s --pretty=format:'%H')
ifneq ($(ESPIDF_CURHASH),$(ESPIDF_SUPHASH))
$(info ** WARNING **)
$(info The git hash of ESP IDF does not match the supported version)
$(info The build may complete and the firmware may work but it is not guaranteed)
$(info ESP IDF path:       $(ESPIDF))
$(info Current git hash:   $(ESPIDF_CURHASH))
$(info Supported git hash: $(ESPIDF_SUPHASH))
endif

# pretty format of ESP IDF version, used internally by the IDF
IDF_VER := $(shell git -C $(ESPIDF) describe)


# Include dirs for both BT and MAIN
INC_COMMON =  -I.
INC_COMMON += -I..
INC_COMMON += -I$(BUILD)
INC_COMMON += -I$(ESPCOMP)/log/include
INC_COMMON += -I$(ESPCOMP)/esp32/include
INC_COMMON += -I$(ESPCOMP)/soc/esp32/include
INC_COMMON += -I$(ESPCOMP)/freertos/include
INC_COMMON += -I$(ESPCOMP)/tcpip_adapter/include
INC_COMMON += -I$(ESPCOMP)/lwip/include/lwip
INC_COMMON += -I$(ESPCOMP)/lwip/include/lwip/port
INC_COMMON += -I$(ESPCOMP)/driver/include/driver
INC_COMMON += -I$(ESPCOMP)/driver/include
INC_COMMON += -I$(ESPCOMP)/nvs_flash/include

# Include dirs for main code base, excluding BT
INC_MAIN += -I../lib/mp-readline
INC_MAIN += -I../lib/netutils
INC_MAIN += -I../lib/timeutils
INC_MAIN += -I$(ESPCOMP)/spi_flash/include
INC_MAIN += -I$(ESPCOMP)/bootloader_support/include
INC_MAIN += -I$(ESPCOMP)/nghttp/port/include
INC_MAIN += -I$(ESPCOMP)/nghttp/include
INC_MAIN += -I$(ESPCOMP)/ethernet/include
INC_MAIN += -I$(ESPCOMP)/expat/include/expat
INC_MAIN += -I$(ESPCOMP)/expat/port/include
INC_MAIN += -I$(ESPCOMP)/json/include
INC_MAIN += -I$(ESPCOMP)/json/port/include
INC_MAIN += -I$(ESPCOMP)/newlib/include
INC_MAIN += -I$(ESPCOMP)/lwip/include/lwip/port
INC_MAIN += -I$(ESPCOMP)/lwip/include/lwip/posix
{'fraction_non_alphanumeric': 0.1492007104795737, 'fraction_numerical': 0.016577856719952634, 'mean_word_length': 5.004739336492891, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3252833', 'n_tokens_mistral': 2176, 'n_tokens_neox': 2070, 'n_words': 431}