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

Add nrf support for scripts/build/build_examples.py #8642

Merged
merged 7 commits into from
Jul 28, 2021

Conversation

andy31415
Copy link
Contributor

Problem

Need to migrate builds to a unified build script:

  • allows faster command-line builds hiding away gn/idf.py/west/other small differences
  • final goal is to allow a single builder to compile any number of needed example applications - both for developer testing and for speeding up CI

Change overview

  • Adds nrf build support in build_examples.py with 3 apps covered
  • Adds license comment blurb to scripts/build python files

Testing

Unit test updated

Manually ran ./scripts/build/build_examples.py --platform nrf build for full test and ./scripts/build/build_examples.py --app shell build for partial test

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo
Copy link

todo bot commented Jul 27, 2021

can this 'correct version' be checked by the build script?

# TODO: can this 'correct version' be checked by the build script?
cmd = '''
[[ -n $ZEPHYR_BASE ]] && source "$ZEPHYR_BASE/zephyr-env.sh";
export GNUARMEMB_TOOLCHAIN_PATH="$PW_PIGWEED_CIPD_INSTALL_DIR";
west build --cmake-only -d {outdir} -b {board} {sourcedir}
'''.format(
outdir = shlex.quote(self.output_dir),
board = self.board.GnArgName(),
sourcedir=shlex.quote(os.path.join(self.root, 'examples', self.app.ExampleName(), 'nrfconnect'))
).strip()


This comment was generated by todo based on a TODO comment in 1253bee in #8642. cc @andy31415.

@github-actions
Copy link

Size increase report for "gn_qpg-example-build" from 6e96fca

File Section File VM
chip-qpg6100-lighting-example.out .text 320 320
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.text,320,320
.strtab,0,121
.symtab,0,112
.debug_frame,0,12
.debug_aranges,0,8
.shstrtab,0,-1
.debug_ranges,0,-280
[Unmapped],0,-320
.debug_line,0,-445
.debug_loc,0,-636
.debug_abbrev,0,-1661
.debug_str,0,-11732
.debug_info,0,-19130

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 6e96fca

File Section File VM
chip-lock.elf text 192 192
chip-lock.elf rodata 136 132
chip-shell.elf text 136 136
chip-shell.elf rodata 48 48
chip-shell.elf device_handles -8 -8
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_str,0,6219
text,192,192
rodata,132,136
.strtab,0,121
.symtab,0,112
.debug_aranges,0,8
.debug_frame,0,4
.shstrtab,0,3
.debug_ranges,0,-504
.debug_line,0,-615
.debug_loc,0,-1091
.debug_abbrev,0,-1654
.debug_info,0,-19031

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
text,136,136
.strtab,0,121
.symtab,0,96
rodata,48,48
.debug_frame,0,12
.debug_aranges,0,8
.shstrtab,0,-1
device_handles,-8,-8
.debug_ranges,0,-408
.debug_line,0,-641
.debug_loc,0,-910
.debug_abbrev,0,-1646
.debug_str,0,-11686
.debug_info,0,-19161


@github-actions
Copy link

Size increase report for "esp32-example-build" from 6e96fca

File Section File VM
chip-ipv6only-app.elf .flash.text 172 172
chip-temperature-measurement-app.elf .flash.text 112 112
chip-temperature-measurement-app.elf .flash.rodata 80 80
chip-lock-app.elf .flash.rodata 80 80
chip-lock-app.elf .flash.text 28 28
chip-shell.elf [4 Others] 76 16
chip-shell.elf .flash.rodata -80 -80
chip-all-clusters-app.elf .flash.rodata 8 8
chip-all-clusters-app.elf .flash.text -164 -164
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-ipv6only-app.elf and ./pull_artifact/chip-ipv6only-app.elf:

sections,vmsize,filesize
.flash.text,172,172
[Unmapped],0,-172

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize
.flash.text,112,112
.debug_line,0,87
.flash.rodata,80,80
.debug_info,0,23
.debug_str,0,1
.debug_abbrev,0,-5
.debug_ranges,0,-120
[Unmapped],0,-192
.debug_loc,0,-290

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-lock-app.elf and ./pull_artifact/chip-lock-app.elf:

sections,vmsize,filesize
.debug_str,0,3547
.strtab,0,121
.flash.rodata,80,80
.symtab,0,32
.flash.text,28,28
.debug_frame,0,20
.debug_aranges,0,8
.shstrtab,0,3
[Unmapped],0,-108
.debug_ranges,0,-336
.debug_abbrev,0,-1805
.debug_line,0,-2255
.debug_loc,0,-2814
.debug_info,0,-39857

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_str,0,595
.debug_ranges,0,216
.xt.prop._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc,0,76
[4 Others],16,76
[Unmapped],0,64
.debug_frame,0,48
.xt.lit._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7_S_moveEPcPKcj,0,40
.xt.lit._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEjjPKcj,0,-40
.xt.lit._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEjjPKcj,0,-48
.xt.prop._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6insertEjPKc,0,-76
.strtab,0,-79
.flash.rodata,-80,-80
.xt.lit._ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_checkEjPKc,0,-88
.xt.prop._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEjjPKcj,0,-88
.xt.prop._ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_checkEjPKc,0,-100
.symtab,0,-112
.xt.prop._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_,0,-188
.shstrtab,0,-449
.debug_line,0,-711
.debug_abbrev,0,-1405
.debug_info,0,-20543

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
[Unmapped],0,156
.debug_ranges,0,32
.debug_aranges,0,16
.flash.rodata,8,8
.shstrtab,0,3
.riscv.attributes,0,1
.symtab,0,-16
.debug_frame,0,-20
.strtab,0,-79
.flash.text,-164,-164
.debug_loc,0,-301
.debug_line,0,-389
.debug_abbrev,0,-1236
.debug_str,0,-4708
.debug_info,0,-20175


scripts/build/builders/nrf.py Outdated Show resolved Hide resolved
scripts/build/builders/nrf.py Show resolved Hide resolved
scripts/build/builders/nrf.py Outdated Show resolved Hide resolved
scripts/build/builders/nrf.py Outdated Show resolved Hide resolved
@andy31415 andy31415 merged commit 051d68f into project-chip:master Jul 28, 2021
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
* Add nrf  builds to the example_build.py

* Added a bunch of licenses

* Detect dry run and skip validation of environment variables

* Fix typo in runner naming for dry run detect

* Add validation for nrf version in the compile script

* Fix unit tests

* Remove the double-generate output in the dry run of commands
@andy31415 andy31415 deleted the nrf_example_build branch October 28, 2021 14:02
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.

6 participants