Skip to content

nrf52840_pca10059 executables do not work without mcuboot #14945

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

Closed
markrages opened this issue Mar 27, 2019 · 5 comments
Closed

nrf52840_pca10059 executables do not work without mcuboot #14945

markrages opened this issue Mar 27, 2019 · 5 comments
Assignees
Labels
area: MCUBoot bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: low Low impact/importance bug

Comments

@markrages
Copy link

markrages commented Mar 27, 2019

Description

The LED blink example build for nrf52840_pca10059 does not work when loaded with nRF Connect.

To Reproduce
Steps to reproduce the behavior:

  1. west build -d build/nRF52/blinky -s zephyrproject/zephyr/samples/basic/blinky -b nrf52840_pca10059 -- -DCONFIG_FLASH_BASE_ADDRESS=0x1000 (the define is necessitated by config BOARD_HAS_NRF5_BOOTLOADER not honored for nrf52840_pca10059 #14943)
  2. Load executable with nrfutil:
nrfutil pkg generate --application $BUILDDIR/zephyr/zephyr.hex --hw-version 52 --sd-req 0 --application-version=0  t.zip

nrfutil dfu usb-serial --package=t.zip --serial-number=EC4938BFC6DB --connect-delay=0
  1. The LED is not blinking on the target board.

Expected behavior
The LED blinks.

Actual behavior
The LED doesn't blink.

Impact
Prevents simple use of nRF-Connect app, or distribution of images.

Workaround
The LED can blinks if I use this workaround, suggested by @mike-scott on IRC.

  1. west build -d build/nRF52/mcuboot -s mcuboot/boot/zephyr -b nrf52840_pca10059 -- -DCONFIG_FLASH_LOAD_OFFSET=0x1000 -DCONFIG_FLASH_LOAD_SIZE=0xf000
  2. west build -d build/nRF52/blinky -s zephyrproject/zephyr/samples/basic/blinky -b nrf52840_pca10059 -- -DCONFIG_FLASH_LOAD_OFFSET=0x10000 -DCONFIG_FLASH_LOAD_SIZE=0x5E000
  3. west sign -d build/nRF52/blinky -t imgtool -- --key mcuboot/root-rsa-2048.pem
  4. load build/nRF52/mcuboot/zephyr/zephyr.hex and zephyr.signed.hex simultaneously with nRF Connect app.

Environment

  • OS: Ubuntu 18.04
  • Toolchain: zephyr-sdk-0.10.0
  • Commit: c3cf543
@lemrey
Copy link
Collaborator

lemrey commented Mar 28, 2019

This issue does not seem valid, since the "nRF Connect App" is not documented as a supported DFU method for this board. The supported DFU method is via nrfutil, and the steps to reproduce are not what is indicated in the documentation, either.

@markrages
Copy link
Author

@lemrey edited to show nrfutil use. The file is linked incorrectly, so the programmer script makes no difference.

@lemrey
Copy link
Collaborator

lemrey commented Mar 28, 2019

This is issue is still confusing, since you apply a workaround and argue that the result is not what expected; you are not supposed to manually override the FLASH_LOAD_OFFSET.

I think all the issues you have opened are rooted in one, real issue: #14943,
for which I have opened a PR: #14978.

Please check if that fixes it.

@markrages
Copy link
Author

@lemrey I agree, my three issues all stem from #14943 (and #14875.)

I will close them all when #14978 is merged.

@carlescufi
Copy link
Member

Closing, #14978 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: MCUBoot bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants