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

[nrfconnect] Fix pigweed/protobuf compiler flags #14876

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

Damian-Nordic
Copy link
Contributor

Problem

Enhance the way Zephyr flags are passed to Pigweed and Protobuf components. It happened in the past that some
MCU-related flags were not passed correctly to libprotobuf causing runtime crashes or build failures (e.g. with FPU enabled).

Change overview

Make zephyr_interface a depdency of all Pigweed-related targets.

Testing

Tested nRF Connect pigweed-app and lighting-app using the rpc console.

Enhance the way Zephyr flags are passed to Pigweed and
Protobuf components. It happened in the past that some
MCU-related flags were not passed correctly causing
crashes or build failures (e.g. with FPU enabled).
@Damian-Nordic
Copy link
Contributor Author

@rgoliver FYI

@github-actions
Copy link

github-actions bot commented Feb 8, 2022

PR #14876: Size comparison from 2f785f4 to b99d013

Increases above 0.2%:

platform target config section 2f785f4 b99d013 change % change
nrfconnect lighting-app nrf52840dk_nrf52840+rpc bss 117136 118468 1332 1.1
pigweed-app nrf52840dk_nrf52840 bss 52588 53632 1044 2.0
Increases (2 builds for nrfconnect)
platform target config section 2f785f4 b99d013 change % change
nrfconnect lighting-app nrf52840dk_nrf52840+rpc bss 117136 118468 1332 1.1
pigweed-app nrf52840dk_nrf52840 bss 52588 53632 1044 2.0
Decreases (2 builds for nrfconnect)
platform target config section 2f785f4 b99d013 change % change
nrfconnect lighting-app nrf52840dk_nrf52840+rpc (read/write) 976311 973679 -2632 -0.3
rodata 109588 109516 -72 -0.1
text 671124 666096 -5028 -0.7
pigweed-app nrf52840dk_nrf52840 (read/write) 541747 527595 -14152 -2.6
rodata 50048 49976 -72 -0.1
text 376920 361016 -15904 -4.2
Full report (43 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 2f785f4 b99d013 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 594490 594490 0 0.0
.app_xip_area 500344 500344 0 0.0
.bss 76868 76868 0 0.0
.data 624 624 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 552390 552390 0 0.0
.app_xip_area 459804 459804 0 0.0
.bss 75340 75340 0 0.0
.data 588 588 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 576398 576398 0 0.0
.app_xip_area 474492 474492 0 0.0
.bss 84332 84332 0 0.0
.data 532 532 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 865876 865876 0 0.0
(read/write) 126620 126620 0 0.0
.bss 124696 124696 0 0.0
.data 1924 1924 0 0.0
.text 865868 865868 0 0.0
BRD4161A+rpc (read only) 853332 853332 0 0.0
(read/write) 143280 143280 0 0.0
.bss 141256 141256 0 0.0
.data 2024 2024 0 0.0
.text 853324 853324 0 0.0
window-app BRD4161A (read only) 838080 838080 0 0.0
(read/write) 125264 125264 0 0.0
.bss 123384 123384 0 0.0
.data 1880 1880 0 0.0
.text 838072 838072 0 0.0
esp32 all-clusters-app c3devkit (read only) 937984 937984 0 0.0
(read/write) 1401162 1401162 0 0.0
.dram0.bss 69448 69448 0 0.0
.dram0.data 14276 14276 0 0.0
.flash.rodata 198528 198528 0 0.0
.flash.text 937984 937984 0 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 986303 986303 0 0.0
(read/write) 466200 466200 0 0.0
.dram0.bss 74592 74592 0 0.0
.dram0.data 34040 34040 0 0.0
.flash.rodata 225440 225440 0 0.0
.flash.text 980919 980919 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 678572 678572 0 0.0
.bss 76568 76568 0 0.0
.data 1884 1884 0 0.0
.text 594320 594320 0 0.0
lock k32w061+release (read/write) 680488 680488 0 0.0
.bss 76896 76896 0 0.0
.data 1924 1924 0 0.0
.text 595868 595868 0 0.0
linux all-clusters-app debug (read only) 2327673 2327673 0 0.0
(read/write) 140096 140096 0 0.0
.bss 54688 54688 0 0.0
.data 1200 1200 0 0.0
.data.rel.ro 78536 78536 0 0.0
.dynamic 592 592 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 205061 205061 0 0.0
.text 1960290 1960290 0 0.0
bridge-app debug+rpc (read only) 1704373 1704373 0 0.0
(read/write) 84328 84328 0 0.0
.bss 39088 39088 0 0.0
.data 1970 1970 0 0.0
.data.rel.ro 38120 38120 0 0.0
.dynamic 592 592 0 0.0
.got 3976 3976 0 0.0
.init 27 27 0 0.0
.init_array 560 560 0 0.0
.rodata 140204 140204 0 0.0
.text 1447621 1447621 0 0.0
chip-tool debug (read only) 7481925 7481925 0 0.0
(read/write) 198072 198072 0 0.0
.bss 32360 32360 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 158536 158536 0 0.0
.dynamic 608 608 0 0.0
.got 4784 4784 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 416437 416437 0 0.0
.text 6663061 6663061 0 0.0
chip-tool-ipv6only arm64 (read only) 7402804 7402804 0 0.0
(read/write) 302401 302401 0 0.0
.bss 50641 50641 0 0.0
.data 1176 1176 0 0.0
.data.rel.ro 200208 200208 0 0.0
.dynamic 560 560 0 0.0
.got 46584 46584 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 399148 399148 0 0.0
.text 6363828 6363828 0 0.0
door-lock-app debug (read only) 1908777 1908777 0 0.0
(read/write) 110584 110584 0 0.0
.bss 42096 42096 0 0.0
.data 946 946 0 0.0
.data.rel.ro 62128 62128 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 172818 172818 0 0.0
.text 1587442 1587442 0 0.0
lighting-app debug+rpc (read only) 2003609 2003609 0 0.0
(read/write) 115632 115632 0 0.0
.bss 43104 43104 0 0.0
.data 1368 1368 0 0.0
.data.rel.ro 65672 65672 0 0.0
.dynamic 608 608 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 712 712 0 0.0
.rodata 162897 162897 0 0.0
.text 1686066 1686066 0 0.0
ota-provider-app debug (read only) 1712241 1712241 0 0.0
(read/write) 81368 81368 0 0.0
.bss 41120 41120 0 0.0
.data 1160 1160 0 0.0
.data.rel.ro 33560 33560 0 0.0
.dynamic 608 608 0 0.0
.got 4240 4240 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 151238 151238 0 0.0
.text 1442322 1442322 0 0.0
ota-requestor-app debug (read only) 1701673 1701673 0 0.0
(read/write) 83320 83320 0 0.0
.bss 42272 42272 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 34616 34616 0 0.0
.dynamic 592 592 0 0.0
.got 4040 4040 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 144887 144887 0 0.0
.text 1439890 1439890 0 0.0
shell debug (read only) 2301113 2301113 0 0.0
(read/write) 141648 141648 0 0.0
.bss 62080 62080 0 0.0
.data 800 800 0 0.0
.data.rel.ro 73072 73072 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 205810 205810 0 0.0
.text 1938786 1938786 0 0.0
thermostat-no-ble arm64 (read only) 2129932 2129932 0 0.0
(read/write) 140673 140673 0 0.0
.bss 57665 57665 0 0.0
.data 984 984 0 0.0
.data.rel.ro 74904 74904 0 0.0
.dynamic 560 560 0 0.0
.got 4152 4152 0 0.0
.init 24 24 0 0.0
.init_array 328 328 0 0.0
.rodata 131964 131964 0 0.0
.text 1779904 1779904 0 0.0
tv-app debug (read only) 2525897 2525897 0 0.0
(read/write) 139832 139832 0 0.0
.bss 57280 57280 0 0.0
.data 3168 3168 0 0.0
.data.rel.ro 73368 73368 0 0.0
.dynamic 592 592 0 0.0
.got 4528 4528 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 195564 195564 0 0.0
.text 2156626 2156626 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2389752 2389752 0 0.0
.bss 188356 188356 0 0.0
.data 5296 5296 0 0.0
.text 1352352 1352352 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2348920 2348920 0 0.0
.bss 180936 180936 0 0.0
.data 5600 5600 0 0.0
.text 1311520 1311520 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2312840 2312840 0 0.0
.bss 180824 180824 0 0.0
.data 5584 5584 0 0.0
.text 1275440 1275440 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139648 1139648 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103032 103032 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2302812 2302812 0 0.0
.bss 178100 178100 0 0.0
.data 5400 5400 0 0.0
.text 1265384 1265384 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 1004835 1004835 0 0.0
bss 121280 121280 0 0.0
rodata 118128 118128 0 0.0
text 686484 686484 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 976311 973679 -2632 -0.3
bss 117136 118468 1332 1.1
rodata 109588 109516 -72 -0.1
text 671124 666096 -5028 -0.7
nrf52840dongle_nrf52840 (read/write) 1021639 1021639 0 0.0
bss 122644 122644 0 0.0
rodata 117016 117016 0 0.0
text 692052 692052 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 911494 911494 0 0.0
bss 117840 117840 0 0.0
rodata 111384 111384 0 0.0
text 601508 601508 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 937091 937091 0 0.0
bss 119616 119616 0 0.0
rodata 106528 106528 0 0.0
text 632404 632404 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 844586 844586 0 0.0
bss 116212 116212 0 0.0
rodata 99700 99700 0 0.0
text 548204 548204 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541747 527595 -14152 -2.6
bss 52588 53632 1044 2.0
rodata 50048 49976 -72 -0.1
text 376920 361016 -15904 -4.2
pump-app nrf52840dk_nrf52840 (read/write) 939323 939323 0 0.0
bss 119368 119368 0 0.0
rodata 106712 106712 0 0.0
text 634648 634648 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 934663 934663 0 0.0
bss 119372 119372 0 0.0
rodata 106004 106004 0 0.0
text 630680 630680 0 0.0
shell nrf52840dk_nrf52840 (read/write) 803151 803151 0 0.0
bss 111232 111232 0 0.0
rodata 78532 78532 0 0.0
text 535824 535824 0 0.0
p6 all-clusters-app default (read/write) 2463848 2463848 0 0.0
.bss 117976 117976 0 0.0
.data 2584 2584 0 0.0
.text 1422112 1422112 0 0.0
light-app default (read/write) 2367296 2367296 0 0.0
.bss 107600 107600 0 0.0
.data 2432 2432 0 0.0
.text 1325560 1325560 0 0.0
lock-app default (read/write) 2332480 2332480 0 0.0
.bss 107304 107304 0 0.0
.data 2392 2392 0 0.0
.text 1290744 1290744 0 0.0
qpg lighting-app qpg6105+debug (read only) 585808 585808 0 0.0
(read/write) 146936 146936 0 0.0
.bss 88856 88856 0 0.0
.data 1084 1084 0 0.0
.text 580488 580488 0 0.0
lock-app qpg6105+debug (read only) 531884 531884 0 0.0
(read/write) 146940 146940 0 0.0
.bss 88304 88304 0 0.0
.data 1024 1024 0 0.0
.text 526564 526564 0 0.0
persistent-storage-app qpg6105+debug (read only) 99520 99520 0 0.0
(read/write) 146940 146940 0 0.0
.bss 24004 24004 0 0.0
.data 176 176 0 0.0
.text 94200 94200 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 865822 865822 0 0.0
bss 88592 88592 0 0.0
noinit 37160 37160 0 0.0
text 607684 607684 0 0.0

@Damian-Nordic Damian-Nordic merged commit 5947abd into project-chip:master Feb 8, 2022
@Damian-Nordic Damian-Nordic deleted the pigweed-flags branch February 8, 2022 15:24
rgoliver pushed a commit to rgoliver/connectedhomeip that referenced this pull request Mar 14, 2022
Enhance the way Zephyr flags are passed to Pigweed and
Protobuf components. It happened in the past that some
MCU-related flags were not passed correctly causing
crashes or build failures (e.g. with FPU enabled).
andy31415 pushed a commit that referenced this pull request Mar 17, 2022
…branch (#16183)

* [nrfconnect] Fix pigweed/protobuf compiler flags (#14876)

Enhance the way Zephyr flags are passed to Pigweed and
Protobuf components. It happened in the past that some
MCU-related flags were not passed correctly causing
crashes or build failures (e.g. with FPU enabled).

* [nrfconnect] Fix flashing script (#15628)

--reset flash should be used to reset the board after
flashing a firmware.

Co-authored-by: Damian Królik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants