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] Make flashing_script hex selection reliable #23003

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Oct 3, 2022

When building via

west build -b nrf52840dk_nrf52840 -t flashing_script

the wrong hex file is flashed, and doesn't boot. We need to flash zephyr/merged.hex, not zephyr/zephyr.hex.

The copy step attempts to do this, but does so incorrectly based upon a file existence test for which it has no declared dependency. This does not work reliably.

It's a bit tricky to figure out which file we need to use, but for nRF Connect there is a global variable ${merged_hex_to_flash} that suffices.

When building via

  west build -b nrf52840dk_nrf52840 -t flashing_script

the wrong hex file is flashed, and doesn't boot. We need to flash
zephyr/merged.hex, not zephyr/zephyr.hex.

The copy step attempts to do this, but does so incorrectly based upon a
file existence test for which it has no declared dependency. This does
not work reliably.

It's a bit tricky to figure out which file we need to use, but for nRF
Connect there is a global variable ${merged_hex_to_flash} that suffices.
@github-actions
Copy link

github-actions bot commented Oct 3, 2022

PR #23003: Size comparison from dab3e8f to 4b56d9e

Increases (1 build for bl702)
platform target config section dab3e8f 4b56d9e change % change
bl702 lighting-app bl702 (read/write) 1188027 1188043 16 0.0
.debug_info 37902575 37902576 1 0.0
.text 956624 956626 2 0.0
Full report (2 builds for bl702)
platform target config section dab3e8f 4b56d9e change % change
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3262 3262 0 0.0
(read/write) 1188027 1188043 16 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67094 67094 0 0.0
.bss_psram 29696 29696 0 0.0
.comment 48 48 0 0.0
.data 4272 4272 0 0.0
.debug_abbrev 1506897 1506897 0 0.0
.debug_aranges 133088 133088 0 0.0
.debug_frame 486444 486444 0 0.0
.debug_info 37902575 37902576 1 0.0
.debug_line 5255713 5255713 0 0.0
.debug_loc 3366207 3366207 0 0.0
.debug_ranges 359136 359136 0 0.0
.debug_str 3456572 3456572 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116536 116536 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 564835 564835 0 0.0
.symtab 171584 171584 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 956624 956626 2 0.0
bl702+rpc 0 0 0 0.0
(read only) 3262 3262 0 0.0
(read/write) 1283963 1283963 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75142 75142 0 0.0
.bss_psram 29936 29936 0 0.0
.comment 48 48 0 0.0
.data 4800 4800 0 0.0
.debug_abbrev 1644442 1644442 0 0.0
.debug_aranges 140592 140592 0 0.0
.debug_frame 511820 511820 0 0.0
.debug_info 41809185 41809185 0 0.0
.debug_line 5630248 5630248 0 0.0
.debug_loc 3558839 3558839 0 0.0
.debug_ranges 381592 381592 0 0.0
.debug_str 3852472 3852472 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 129928 129928 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 624008 624008 0 0.0
.symtab 189392 189392 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 1030326 1030326 0 0.0

@andy31415 andy31415 merged commit 95270a1 into project-chip:master Oct 4, 2022
@mspang mspang deleted the for-chip/nrfconnect-flash branch October 4, 2022 19:29
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.

3 participants