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

[Gen 2] Binary size optimizations #1720

Merged
merged 4 commits into from Mar 13, 2019

Conversation

@avtolstoy
Copy link
Member

commented Mar 12, 2019

Problem

After Gen 2 / Gen 3 merge some feature got implicitly enabled on Gen 2 devices which grew some of the system parts quite significantly.

Solution

This PR disables implicitly enabled features, as well as fixes various issues in relation to binary size.

Results

Photon

photon/bootloader 1.0.1 develop PR Diff
.text 14832 14832 14868 +0,24%
.bss 11064 11064 11064 0,00%
.data 432 432 432 0,00%
photon/system-part1 1.0.1 develop PR Diff
.text 239284 234612 234692 -1,92%
.bss 340 336 336 -1,18%
.data 208 208 208 0,00%
photon/system-part2 1.0.1 develop PR Diff
.text 249808 258640 253712 +1,56%
.bss 40008 40016 40024 +0,04%
.data 2432 2432 2432 0,00%

P1

p1/bootloader 1.0.1 develop PR Diff
.text 15500 15532 15532 +0,21%
.bss 10684 10684 10684 0,00%
.data 432 432 432 0,00%
p1/system-part1 1.0.1 develop PR Diff
.text 239268 234612 234676 -1,92%
.bss 340 336 336 -1,18%
.data 208 208 208 0,00%
p1/system-part2 1.0.1 develop PR Diff
.text 249824 258656 253744 +1,57%
.bss 39624 39640 39640 +0,04%
.data 2604 2604 2604 0,00%

Electron

electron/bootloader 1.0.1 develop PR Diff
.text 15956 15608 15608 -2,18%
.bss 10684 10684 10684 0,00%
.data 380 380 380 0,00%
electron/system-part1 1.0.1 develop PR Diff
.text 77812 77796 77796 -0,02%
.bss 2588 2588 2588 0,00%
.data 556 556 556 0,00%
electron/system-part2 1.0.1 develop PR Diff
.text 120072 125752 125784 +4,76%
.bss 564 564 564 0,00%
.data 216 212 212 -1,85%
electron/system-part3 1.0.1 develop PR Diff
.text 118620 128012 122188 +3,01%
.bss 4276 4296 4296 +0,47%
.data 2700 2700 2700 0,00%

Xenon

xenon/bootloader mesh-develop develop PR Diff
.text 33320 33320 33320 0,00%
.bss 6772 6772 6772 0,00%
.data 268 268 288 +7,46%
xenon/system-part1 mesh-develop develop PR Diff
.text 611568 612432 612432 +0,14%
.bss 65644 65640 65644 0,00%
.data 1972 1972 1972 0,00%

Argon

argon/bootloader mesh-develop develop PR Diff
.text 33320 33320 33320 0,00%
.bss 6772 6772 6772 0,00%
.data 268 268 288 +7,46%
argon/system-part1 mesh-develop develop PR Diff
.text 648392 649272 649272 +0,14%
.bss 65788 65800 65800 +0,02%
.data 2052 2052 2052 0,00%

Boron

boron/bootloader mesh-develop develop PR Diff
.text 33320 33320 33320 0,00%
.bss 6772 6772 6772 0,00%
.data 268 268 288 +7,46%
boron/system-part1 mesh-develop develop PR Diff
.text 659424 660232 660232 +0,12%
.bss 67176 67188 67188 +0,02%
.data 2116 2116 2116 0,00%

Core

core/bootloader 1.0.1 develop PR Diff
.text 11332 11396 11396 +0,56%
.bss 6360 6360 6360 0,00%
.data 444 444 444 0,00%
core/tinker 1.0.1 develop PR Diff
.text 104276 98732 106196 +1,84%
.bss 9956 9968 10020 +0,64%
.data 1012 1012 1136 +12,25%

Example App

N/A

References

N/A


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • (N/A) Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

  • [Enhancement] [Gen 2] Binary size optimizations #1720
avtolstoy added 4 commits Mar 12, 2019
[hal] stm32: implements __assert_func()
Default __assert_func() caused fprintf() to get linked in.

Also disables WICED-provided newlib stubs.

@avtolstoy avtolstoy added this to the 1.1.0-rc.1 milestone Mar 12, 2019

@avtolstoy avtolstoy requested review from sergeuz and technobly Mar 12, 2019

@avtolstoy avtolstoy merged commit 4ce4370 into develop Mar 13, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@avtolstoy avtolstoy deleted the feature/gen2-size-reductions branch Mar 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.