-
Notifications
You must be signed in to change notification settings - Fork 78
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
fix liblvgl with monolith #735
Open
Rocky14683
wants to merge
4
commits into
develop-pros-4
Choose a base branch
from
fix-mono-lvgl
base: develop-pros-4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,18 @@ LIBRARIES+=$(wildcard $(FWDIR)/*.a) | |
EXCLUDE_COLD_LIBRARIES+=$(FWDIR)/libc.a $(FWDIR)/libm.a | ||
COLD_LIBRARIES=$(filter-out $(EXCLUDE_COLD_LIBRARIES), $(LIBRARIES)) | ||
wlprefix=-Wl,$(subst $(SPACE),$(COMMA),$1) | ||
|
||
ifneq (,$(wildcard ./firmware/liblvgl.a)) | ||
LVGL_LIB_FLAGS=--whole-archive ./firmware/liblvgl.a --no-whole-archive | ||
FILTERED_LIBRARIES=$(filter-out ./firmware/liblvgl.a, $(LIBRARIES)) | ||
else | ||
LVGL_LIB_FLAGS= | ||
FILTERED_LIBRARIES=$(LIBRARIES) | ||
endif | ||
|
||
LNK_FLAGS=--gc-sections --start-group $(strip $(LIBRARIES)) -lgcc -lstdc++ --end-group -T$(FWDIR)/v5-common.ld --no-warn-rwx-segments | ||
LNK_FLAGS_MONOLITH=--gc-sections --start-group $(strip $(LVGL_LIB_FLAGS) $(FILTERED_LIBRARIES)) -lgcc -lstdc++ --end-group -T$(FWDIR)/v5-common.ld --no-warn-rwx-segments | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we figure out a better way to do this than duplication? Also should |
||
|
||
|
||
ASMFLAGS=$(MFLAGS) $(WARNFLAGS) | ||
CFLAGS=$(MFLAGS) $(CPPFLAGS) $(WARNFLAGS) $(GCCFLAGS) --std=$(C_STANDARD) | ||
|
@@ -213,7 +224,7 @@ $(LIBAR): $(call GETALLOBJ,$(EXCLUDE_SRC_FROM_LIB)) $(EXTRA_LIB_DEPS) | |
library: $(LIBAR) | ||
|
||
.PHONY: template | ||
template:: clean-template $(LIBAR) | ||
template: clean-template $(LIBAR) | ||
$Dpros c create-template . $(LIBNAME) $(VERSION) $(foreach file,$(TEMPLATE_FILES) $(LIBAR),--system "$(file)") --target v5 $(CREATE_TEMPLATE_FLAGS) | ||
endif | ||
|
||
|
@@ -230,7 +241,7 @@ $(MONOLITH_BIN): $(MONOLITH_ELF) $(BINDIR) | |
|
||
$(MONOLITH_ELF): $(ELF_DEPS) $(LIBRARIES) | ||
$(call _pros_ld_timestamp) | ||
$(call test_output_2,Linking project with $(ARCHIVE_TEXT_LIST) ,$(LD) $(LDFLAGS) $(ELF_DEPS) $(LDTIMEOBJ) $(call wlprefix,-T$(FWDIR)/v5.ld $(LNK_FLAGS)) -o $@,$(OK_STRING)) | ||
$(call test_output_2,Linking project with $(ARCHIVE_TEXT_LIST) ,$(LD) $(LDFLAGS) $(ELF_DEPS) $(LDTIMEOBJ) $(call wlprefix,-T$(FWDIR)/v5.ld $(LNK_FLAGS_MONOLITH)) -o $@,$(OK_STRING)) | ||
@echo Section sizes: | ||
-$(VV)$(SIZETOOL) $(SIZEFLAGS) $@ $(SIZES_SED) $(SIZES_NUMFMT) | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure this was a mistake? It has a semantically different meaning now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeh, its just a kernel thing. If it overload it will duplicate a libpros.a in the project root directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the
template
rule in common.mk is no longer used then, since it's being overridden in user projectMakefile
? Can it be removed, or is it used to build the kernel? If so, should it be in the kernel'sMakefile
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only being used by users. There's no template rule in the distributed makefile, only in common.mk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so the kernel build uses this
template
rule here, and user project builds use the one incommon.mk
? Then shouldn't the one incommon.mk
be moved totemplate-Makefile
? If it's not used by both, it shouldnt be incommon.mk
, right?