-
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
base: develop-pros-4
Are you sure you want to change the base?
Conversation
also delete make template overload(Thats just a small bug)
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.
I'm confused about what is happening here, can you explain what these changes actually are?
And should this really go here instead of in liblvgl?
@@ -75,7 +75,7 @@ CREATE_TEMPLATE_ARGS+=--user "src/main.{cpp,c,cc}" --user "include/main.{hpp,h,h | |||
CREATE_TEMPLATE_ARGS+=--target v5 | |||
CREATE_TEMPLATE_ARGS+=--output bin/monolith.bin --cold_output bin/cold.package.bin --hot_output bin/hot.package.bin --cold_addr 58720256 --hot_addr 125829120 | |||
|
|||
template:: patch_sdk_headers clean-template library |
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 project Makefile
? Can it be removed, or is it used to build the kernel? If so, should it be in the kernel's Makefile
?
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 in common.mk
? Then shouldn't the one in common.mk
be moved to template-Makefile
? If it's not used by both, it shouldnt be in common.mk
, right?
common.mk
Outdated
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 comment
The 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 LNK_FLAGS
be LNK_FLAGS_HOTCOLD
or something?
Yes it should be in kernel because it's just linking issue. |
I make it |
Could I have an explanation of what the linking issue is and how this solves it? And also probably set it as the top-level PR description, |
The linking process didn't work initially because the linker was discarding unused symbols from liblvgl.a. Adding |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Ok, can you add that explanation as a comment in the makefile? |
So, if I'm reading this correctly, the entirety of liblvgl is put in the monolith? The binary size is going to balloon. Additionally, what if one generic template overrides a weakly declared symbol in another template? Is that going to work? The changes in this PR is specific to liblvgl |
|
PR #728 also fixes the problem, without modifications to |
Summary:
fix liblvgl with monolith
also delete make template overload(That's just a small bug)
Motivation:
#728
Test Plan: