mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-07-08 02:14:52 +08:00
feat(esp8266): Add macro "__ESP_FILE__" and its configuration
This commit is contained in:
components/esp8266
@ -66,3 +66,18 @@ endif
|
||||
|
||||
# global CFLAGS for ESP8266
|
||||
CFLAGS += -DICACHE_FLASH
|
||||
|
||||
ifdef CONFIG_ESP_FILENAME_MACRO_NO_PATH
|
||||
CFLAGS += -D__ESP_FILE__='"$$(subst $$(dir $$<),,$$<)"'
|
||||
CXXFLAGS += -D__ESP_FILE__='"$$(subst $$(dir $$<),,$$<)"'
|
||||
endif
|
||||
|
||||
ifdef CONFIG_ESP_FILENAME_MACRO_RAW
|
||||
CFLAGS += -D__ESP_FILE__=__FILE__
|
||||
CXXFLAGS += -D__ESP_FILE__=__FILE__
|
||||
endif
|
||||
|
||||
ifdef CONFIG_ESP_FILENAME_MACRO_NULL
|
||||
CFLAGS += -D__ESP_FILE__='"null"'
|
||||
CXXFLAGS += -D__ESP_FILE__='"null"'
|
||||
endif
|
||||
|
Reference in New Issue
Block a user