Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes clean target for applications with large number of fils + P2 PSRAM size calculation issues #2661

Merged
merged 2 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ $(BUILD_PATH)/%.o : $(COMMON_BUILD)/arm/%.S

# Other Targets
clean: clean_deps
$(VERBOSE)$(RM) $(ALLOBJ) $(ALLDEPS) $(TARGET)
$(VERBOSE)$(foreach cleanfile,$(ALLOBJ) $(ALLDEPS) $(TARGET),$(shell $(RM) $(cleanfile)))
$(VERBOSE)$(RMDIR) $(BUILD_PATH)
$(call,echo,)

Expand Down
4 changes: 3 additions & 1 deletion modules/shared/rtl872x/build_linker_script.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ PSRAM_DATA_SECTION_LEN = $(shell $(OBJDUMP) -h --section=.data_alt $(INTERMEDIA
PSRAM_DATA_SECTION_LEN := 0x$(word 3,$(PSRAM_DATA_SECTION_LEN))
PSRAM_BSS_SECTION_LEN = $(shell $(OBJDUMP) -h --section=.bss_alt $(INTERMEDIATE_ELF) | grep -E '.bss_alt')
PSRAM_BSS_SECTION_LEN := 0x$(word 3,$(PSRAM_BSS_SECTION_LEN))
PSRAM_DYNALIB_SECTION_LEN = $(shell $(OBJDUMP) -h --section=.dynalib $(INTERMEDIATE_ELF) | grep -E '.dynalib')
PSRAM_DYNALIB_SECTION_LEN := 0x$(word 3,$(PSRAM_DYNALIB_SECTION_LEN))
USER_MODULE_END = 0x$(shell $(OBJDUMP) -t $(INTERMEDIATE_ELF) | grep link_module_info_crc_end | $(AWK) '{ print $$1 }')
USER_MODULE_START = 0x$(shell $(OBJDUMP) -t $(INTERMEDIATE_ELF) | grep link_module_start | $(AWK) '{ print $$1 }')
USER_MODULE_SUFFIX_START = 0x$(shell $(OBJDUMP) -t $(INTERMEDIATE_ELF) | grep link_module_info_static_start | $(AWK) '{ print $$1 }')
MODULE_INFO_SUFFIX_LEN := ( $(USER_MODULE_END) - $(USER_MODULE_SUFFIX_START) )

# Note: reserving 16 bytes for alignment just in case
USER_SRAM_LENGTH = ( $(DATA_SECTION_LEN) + $(BSS_SECTION_LEN) + 16 )
USER_PSRAM_LENGTH = ( $(PSRAM_TEXT_SECTION_LEN) + $(PSRAM_DATA_SECTION_LEN) + $(PSRAM_BSS_SECTION_LEN) + 16)
USER_PSRAM_LENGTH = ( $(PSRAM_TEXT_SECTION_LEN) + $(PSRAM_DATA_SECTION_LEN) + $(PSRAM_BSS_SECTION_LEN) + $(PSRAM_DYNALIB_SECTION_LEN) + 16)

USER_FLASH_LENGTH = $(shell let var=($(USER_MODULE_END) - $(USER_MODULE_START) + 16); echo $$var)
USER_FLASH_LENGTH := $(shell echo $$((($(USER_FLASH_LENGTH) + 4095) / 4096 * 4096)))
Expand Down