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

[Silabs] Refactor/Cleanup Si917 examples build files #25682

Conversation

sharad-patil24
Copy link
Contributor

Silabs Sample apps GN build is convoluted and duplicates a lot of args and conditions in each example's BUILD.gn.
This PR aims to reduce this duplication, regroup board or sdk arguments, and common example platform sources building to a common location.

Platforms affected by the refactoring:
SiWx917 ( SOC )


adds fix to the Bluez disconnection as well in separate commit.

@github-actions
Copy link

PR #25682: Size comparison from fa2e709 to 3befe23

Increases (1 build for cc32xx)
platform target config section fa2e709 3befe23 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20245969 20245970 1 0.0
Full report (1 build for cc32xx)
platform target config section fa2e709 3befe23 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 645489 645489 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930293 930293 0 0.0
.debug_aranges 87384 87384 0 0.0
.debug_frame 300248 300248 0 0.0
.debug_info 20245969 20245970 1 0.0
.debug_line 2660979 2660979 0 0.0
.debug_loc 2804911 2804911 0 0.0
.debug_ranges 283168 283168 0 0.0
.debug_str 3026947 3026947 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 106009 106009 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 380271 380271 0 0.0
.symtab 257312 257312 0 0.0
.text 537360 537360 0 0.0

examples/platform/silabs/SiWx917/BUILD.gn Outdated Show resolved Hide resolved
src/platform/silabs/Logging.cpp Outdated Show resolved Hide resolved
third_party/silabs/SiWx917_sdk.gni Outdated Show resolved Hide resolved
third_party/silabs/SiWx917_sdk.gni Show resolved Hide resolved
third_party/silabs/SiWx917_sdk.gni Show resolved Hide resolved
Copy link
Member

@jmartinez-silabs jmartinez-silabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For SiWx917 Soc example all the

build_for_wifi_args.gni and build_for_wifi_gnfile.gni should be remove and their content should replace the default .gn and .args.gni of the example. Those files were created to support alternating between the required structure for Thread or Wifi.

With 917 SOC you don't have a thread option so no need to maintain both file structures.

You seem to have done the right thing for the lighting-app but not for the other apps.

third_party/silabs/SiWx917_sdk.gni Outdated Show resolved Hide resolved
third_party/silabs/SiWx917_sdk.gni Outdated Show resolved Hide resolved
third_party/silabs/SiWx917_sdk.gni Outdated Show resolved Hide resolved
third_party/silabs/SiWx917_sdk.gni Outdated Show resolved Hide resolved
third_party/silabs/SiWx917_sdk.gni Show resolved Hide resolved
src/platform/silabs/SiWx917/BUILD.gn Outdated Show resolved Hide resolved
src/platform/silabs/Logging.cpp Outdated Show resolved Hide resolved
scripts/examples/gn_efr32_example.sh Show resolved Hide resolved
examples/lock-app/silabs/SiWx917/BUILD.gn Outdated Show resolved Hide resolved
examples/light-switch-app/silabs/SiWx917/BUILD.gn Outdated Show resolved Hide resolved
@jmartinez-silabs jmartinez-silabs marked this pull request as draft March 14, 2023 14:23
examples/lighting-app/silabs/SiWx917/.gn Outdated Show resolved Hide resolved
examples/lighting-app/silabs/SiWx917/args.gni Outdated Show resolved Hide resolved
examples/platform/silabs/SiWx917/BUILD.gn Outdated Show resolved Hide resolved
examples/platform/silabs/SiWx917/BUILD.gn Outdated Show resolved Hide resolved
src/platform/silabs/BLEManagerImpl.h Outdated Show resolved Hide resolved
examples/lighting-app/silabs/SiWx917/BUILD.gn Outdated Show resolved Hide resolved
src/platform/silabs/SiWx917/BUILD.gn Outdated Show resolved Hide resolved
@chirag-silabs chirag-silabs force-pushed the refactor/Wifi_Si917_cleanup_build_files branch from 19094be to 7ce105d Compare March 19, 2023 10:36
@github-actions
Copy link

PR #25682: Size comparison from 3edd101 to 7ce105d

Decreases (1 build for cc32xx)
platform target config section 3edd101 7ce105d change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20265057 20265056 -1 -0.0
Full report (1 build for cc32xx)
platform target config section 3edd101 7ce105d change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 645945 645945 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930399 930399 0 0.0
.debug_aranges 87520 87520 0 0.0
.debug_frame 300716 300716 0 0.0
.debug_info 20265057 20265056 -1 -0.0
.debug_line 2663587 2663587 0 0.0
.debug_loc 2808805 2808805 0 0.0
.debug_ranges 283608 283608 0 0.0
.debug_str 3036926 3036926 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 106009 106009 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 381423 381423 0 0.0
.symtab 257664 257664 0 0.0
.text 537816 537816 0 0.0

@github-actions
Copy link

PR #25682: Size comparison from 3edd101 to 2fc873c

Full report (1 build for cc32xx)
platform target config section 3edd101 2fc873c change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 645945 645945 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930399 930399 0 0.0
.debug_aranges 87520 87520 0 0.0
.debug_frame 300716 300716 0 0.0
.debug_info 20265057 20265057 0 0.0
.debug_line 2663587 2663587 0 0.0
.debug_loc 2808805 2808805 0 0.0
.debug_ranges 283608 283608 0 0.0
.debug_str 3036926 3036926 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 106009 106009 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 381423 381423 0 0.0
.symtab 257664 257664 0 0.0
.text 537816 537816 0 0.0

@github-actions
Copy link

PR #25682: Size comparison from 3edd101 to 1d696f7

Decreases (1 build for cc32xx)
platform target config section 3edd101 1d696f7 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20265057 20265056 -1 -0.0
Full report (1 build for cc32xx)
platform target config section 3edd101 1d696f7 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 645945 645945 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930399 930399 0 0.0
.debug_aranges 87520 87520 0 0.0
.debug_frame 300716 300716 0 0.0
.debug_info 20265057 20265056 -1 -0.0
.debug_line 2663587 2663587 0 0.0
.debug_loc 2808805 2808805 0 0.0
.debug_ranges 283608 283608 0 0.0
.debug_str 3036926 3036926 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 106009 106009 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 381423 381423 0 0.0
.symtab 257664 257664 0 0.0
.text 537816 537816 0 0.0

@github-actions
Copy link

PR #25682: Size comparison from 3edd101 to acab3e3

Decreases (1 build for cc32xx)
platform target config section 3edd101 acab3e3 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20265057 20265056 -1 -0.0
Full report (1 build for cc32xx)
platform target config section 3edd101 acab3e3 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 645945 645945 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930399 930399 0 0.0
.debug_aranges 87520 87520 0 0.0
.debug_frame 300716 300716 0 0.0
.debug_info 20265057 20265056 -1 -0.0
.debug_line 2663587 2663587 0 0.0
.debug_loc 2808805 2808805 0 0.0
.debug_ranges 283608 283608 0 0.0
.debug_str 3036926 3036926 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 106009 106009 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 381423 381423 0 0.0
.symtab 257664 257664 0 0.0
.text 537816 537816 0 0.0

@github-actions
Copy link

PR #25682: Size comparison from 3edd101 to 245f192

Decreases (1 build for cc32xx)
platform target config section 3edd101 245f192 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20265057 20265055 -2 -0.0
Full report (1 build for cc32xx)
platform target config section 3edd101 245f192 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 645945 645945 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930399 930399 0 0.0
.debug_aranges 87520 87520 0 0.0
.debug_frame 300716 300716 0 0.0
.debug_info 20265057 20265055 -2 -0.0
.debug_line 2663587 2663587 0 0.0
.debug_loc 2808805 2808805 0 0.0
.debug_ranges 283608 283608 0 0.0
.debug_str 3036926 3036926 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 106009 106009 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 381423 381423 0 0.0
.symtab 257664 257664 0 0.0
.text 537816 537816 0 0.0

@github-actions
Copy link

PR #25682: Size comparison from 3edd101 to e88ea18

Decreases (1 build for cc32xx)
platform target config section 3edd101 e88ea18 change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 645945 645601 -344 -0.1
.debug_abbrev 930399 930289 -110 -0.0
.debug_aranges 87520 87400 -120 -0.1
.debug_frame 300716 300316 -400 -0.1
.debug_info 20265057 20248010 -17047 -0.1
.debug_line 2663587 2661469 -2118 -0.1
.debug_loc 2808805 2805592 -3213 -0.1
.debug_ranges 283608 283208 -400 -0.1
.debug_str 3036926 3027174 -9752 -0.3
.rodata 106009 105993 -16 -0.0
.strtab 381423 380421 -1002 -0.3
.symtab 257664 257408 -256 -0.1
.text 537816 537488 -328 -0.1
Full report (1 build for cc32xx)
platform target config section 3edd101 e88ea18 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 645945 645601 -344 -0.1
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930399 930289 -110 -0.0
.debug_aranges 87520 87400 -120 -0.1
.debug_frame 300716 300316 -400 -0.1
.debug_info 20265057 20248010 -17047 -0.1
.debug_line 2663587 2661469 -2118 -0.1
.debug_loc 2808805 2805592 -3213 -0.1
.debug_ranges 283608 283208 -400 -0.1
.debug_str 3036926 3027174 -9752 -0.3
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 106009 105993 -16 -0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 381423 380421 -1002 -0.3
.symtab 257664 257408 -256 -0.1
.text 537816 537488 -328 -0.1

@sharad-patil24 sharad-patil24 marked this pull request as ready for review March 20, 2023 12:16
@sharad-patil24 sharad-patil24 force-pushed the refactor/Wifi_Si917_cleanup_build_files branch from 623f709 to 08042f6 Compare March 22, 2023 19:36
@sharad-patil24 sharad-patil24 force-pushed the refactor/Wifi_Si917_cleanup_build_files branch from 08042f6 to f8f0b6f Compare March 22, 2023 19:38
@github-actions
Copy link

PR #25682: Size comparison from 2ea6746 to 4e198e0

Increases (1 build for cc32xx)
platform target config section 2ea6746 4e198e0 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20251230 20251231 1 0.0
Full report (1 build for cc32xx)
platform target config section 2ea6746 4e198e0 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 645825 645825 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930286 930286 0 0.0
.debug_aranges 87400 87400 0 0.0
.debug_frame 300336 300336 0 0.0
.debug_info 20251230 20251231 1 0.0
.debug_line 2661959 2661959 0 0.0
.debug_loc 2806733 2806733 0 0.0
.debug_ranges 283424 283424 0 0.0
.debug_str 3027534 3027534 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105993 105993 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 380469 380469 0 0.0
.symtab 257408 257408 0 0.0
.text 537712 537712 0 0.0

@github-actions
Copy link

PR #25682: Size comparison from 2ea6746 to 73981c0

Increases (1 build for cc32xx)
platform target config section 2ea6746 73981c03 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20251230 20251231 1 0.0
Full report (1 build for cc32xx)
platform target config section 2ea6746 73981c03 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 645825 645825 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930286 930286 0 0.0
.debug_aranges 87400 87400 0 0.0
.debug_frame 300336 300336 0 0.0
.debug_info 20251230 20251231 1 0.0
.debug_line 2661959 2661959 0 0.0
.debug_loc 2806733 2806733 0 0.0
.debug_ranges 283424 283424 0 0.0
.debug_str 3027534 3027534 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105993 105993 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 380469 380469 0 0.0
.symtab 257408 257408 0 0.0
.text 537712 537712 0 0.0

@github-actions
Copy link

PR #25682: Size comparison from 2ea6746 to f78bd04

Increases (1 build for cc32xx)
platform target config section 2ea6746 f78bd04 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20251230 20251232 2 0.0
Full report (1 build for cc32xx)
platform target config section 2ea6746 f78bd04 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 645825 645825 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930286 930286 0 0.0
.debug_aranges 87400 87400 0 0.0
.debug_frame 300336 300336 0 0.0
.debug_info 20251230 20251232 2 0.0
.debug_line 2661959 2661959 0 0.0
.debug_loc 2806733 2806733 0 0.0
.debug_ranges 283424 283424 0 0.0
.debug_str 3027534 3027534 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105993 105993 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 380469 380469 0 0.0
.symtab 257408 257408 0 0.0
.text 537712 537712 0 0.0

@jmartinez-silabs jmartinez-silabs merged commit e214d1e into project-chip:master Mar 22, 2023
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.

7 participants