Conversation
also delete make template overload(Thats just a small bug)
djava
left a comment
There was a problem hiding this comment.
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?
| 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.
are you sure this was a mistake? It has a semantically different meaning now.
There was a problem hiding this comment.
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.
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.
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.
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?
| 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.
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: