eb14284c92
1. Add disable PHY and RF when WiFi and BT are both disabled(including call sniffer disable API). 2. Do not init PHY and RF when cpu start. Init PHY and RF when call Wifi or BT start APIs(including sniffer enable API). 3. Add a temporary lib: librtc_clk.a and will delete it when CPU frequency switching function is done. 4. Add an function to get OS tick rate. 5. Do not put the whole pp.a in iram0, only put lmac.o, ieee80211_misc.o, ets_time.o and wdev.o in iram0.
45 lines
1.4 KiB
Makefile
45 lines
1.4 KiB
Makefile
#
|
|
# Component Makefile
|
|
#
|
|
|
|
COMPONENT_SRCDIRS := . hwcrypto
|
|
LIBS := core rtc rtc_clk
|
|
ifdef CONFIG_PHY_ENABLED # BT || WIFI
|
|
LIBS += phy coexist
|
|
endif
|
|
ifdef CONFIG_WIFI_ENABLED
|
|
LIBS += net80211 pp wpa smartconfig coexist wps wpa2
|
|
endif
|
|
|
|
LINKER_SCRIPTS += esp32.common.ld esp32.rom.ld esp32.peripherals.ld
|
|
|
|
ifeq ("$(CONFIG_NEWLIB_NANO_FORMAT)","y")
|
|
LINKER_SCRIPTS += esp32.rom.nanofmt.ld
|
|
endif
|
|
|
|
COMPONENT_ADD_LDFLAGS := -lesp32 \
|
|
$(COMPONENT_PATH)/libhal.a \
|
|
-L$(COMPONENT_PATH)/lib \
|
|
$(addprefix -l,$(LIBS)) \
|
|
-L $(COMPONENT_PATH)/ld \
|
|
-T esp32_out.ld \
|
|
$(addprefix -T ,$(LINKER_SCRIPTS))
|
|
|
|
ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS))
|
|
|
|
COMPONENT_SUBMODULES += lib
|
|
|
|
# final linking of project ELF depends on all binary libraries, and
|
|
# all linker scripts (except esp32_out.ld, as this is code generated here.)
|
|
COMPONENT_ADD_LINKER_DEPS := $(ALL_LIB_FILES) $(addprefix ld/,$(LINKER_SCRIPTS))
|
|
|
|
# Preprocess esp32.ld linker script into esp32_out.ld
|
|
#
|
|
# The library doesn't really depend on esp32_out.ld, but it
|
|
# saves us from having to add the target to a Makefile.projbuild
|
|
$(COMPONENT_LIBRARY): esp32_out.ld
|
|
|
|
esp32_out.ld: $(COMPONENT_PATH)/ld/esp32.ld ../include/sdkconfig.h
|
|
$(CC) -I ../include -C -P -x c -E $< -o $@
|
|
|
|
COMPONENT_EXTRA_CLEAN := esp32_out.ld
|