Re: mcuboot for nrf52840_pca10059


Venkat Rao Vallapaneni <vallapaneni@...>
 

Hi,

I am using master branch. I have doc/extensions/only/eager_only.py file.


Rgds,

Venkat.


On 17/04/19 9:21 PM, Kinder, David B wrote:

Can you verify the “doc/extensions/only” folder is there in your local copy (that’s where the extension we’re using can be found).  Are you using the master branch?

-- david

 

From: users@... [mailto:users@...] On Behalf Of Bolivar, Marti
Sent: Wednesday, April 17, 2019 8:39 AM
To: Venkat Rao Vallapaneni <vallapaneni@...>; users@...; Di Santo, Emanuele <Emanuele.DiSanto@...>
Subject: Re: [Zephyr-users] mcuboot for nrf52840_pca10059

 

Hi Venkat,

 

That's an extension that is provided with the Zephyr docs themselves. Not sure what went wrong there; the conf.py should bring it in. The PR just got approved, though, so I'm hopeful it gets merged before too long.

 

But does "I am able to load mcuboot and then blinky programs" mean you're up and running?

 

Thanks,

Marti


From: Venkat Rao Vallapaneni <vallapaneni@...>
Sent: Tuesday, April 16, 2019 11:15 PM
To: Bolivar, Marti; users@...; Di Santo, Emanuele
Subject: Re: [Zephyr-users] mcuboot for nrf52840_pca10059

 

Hi Marti,

Thanks for the update. I tried generating docs, but got this error: "Could not import extension only.eager_only (exception: No module named 'only.eager_only')". Not sure what I have missed.

 

But I am able to load mcuboot and then blinky programs.

 

Rgds,

Venkat.

 

On 16/04/19 10:24 PM, Bolivar, Marti wrote:

Hi Venkat,

 

I discussed with Emanuele a bit and made some changes to the documentation to try to make this more clear:

 

https://github.com/zephyrproject-rtos/zephyr/pull/15474

The basic steps are:

 

- flash mcuboot while running the nordic bootloader, using nrfutil

- plug the board in with SW1 held down to boot into mcuboot recovery mode

- flash another application (e.g. smp_svr) while running mcuboot, using mcumgr

 

Step-by-step instructions are in that docs PR, but you will need to build the documentation yourself until it is merged and part of the online zephyr documentation to see all the details. If you are curious to try that, see https://docs.zephyrproject.org/latest/README.html for instructions on building the documentation. Otherwise we should be able to get it merged soon, I hope.

 

Thanks,

Marti

 

 


From: users@... <users@...> on behalf of Bolivar, Marti via Lists.Zephyrproject.Org <marti.bolivar=nordicsemi.no@...>
Sent: Monday, April 15, 2019 5:49:15 PM
To: Venkat Rao Vallapaneni; users@...; Di Santo, Emanuele
Cc: users@...
Subject: Re: [Zephyr-users] mcuboot for nrf52840_pca10059

 

Hello Venkat,

 

Thanks very much for the detailed report. The CONFIG_BOOT_HAVE_LOGGING issue was fixed in MCUboot this week. I've also sent an mcuboot PR to get your idea for enabling size optimizations merged: https://github.com/JuulLabs-OSS/mcuboot/pull/468

 

Other than those issues, I did eventually get MCUboot flashed and emumerated as a USB device the same way you wrote below. However, this process failed several times on two different Windows and Linux computers for me before it finally worked after I plugged it in enough times and pressed hard enough. Can you try building mcuboot from PR 468, reflashing, and see if that works for you? FWIW, on Windows, I see "MCUBOOT" in my Device Manager.

 

I didn't have any more luck getting smp_svr to be chain-loaded by MCUboot than you did, though. Adding Emanuele for advice.

 

I tried this:

 

$ west build -b nrf52840_pca10059 zephyr/samples/subsys/mgmt/mcumgr/smp_svr/

$ west sign -t imgtool --hex --no-bin -- --key=mcuboot/root-rsa-2048.pem

$ nrfutil pkg generate --hw-version 52 --sd-req 0x00 --application zephyr.signed.hex --application-version 1 smp_svr.zip

$ nrfutil dfu usb-serial -pkg smp_svr.zip -p /dev/ttyACM0

 

But when I plug the board in again, I don't see any interesting BT devices, and this command hangs:

 

$ sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' echo hello

 

Plugging the board in with the button pressed does not bring up the expected MCUBOOT COM port, so I wonder if I've overwritten MCUBoot somehow.

 

Emanuele, what am I missing?

 

Thanks,

Marti

 

 


From: Venkat Rao Vallapaneni <vallapaneni@...>
Sent: Monday, April 15, 2019 2:21:13 AM
To: Bolivar, Marti; users@...
Subject: Re: [Zephyr-users] mcuboot for nrf52840_pca10059

 

Hi Marti,

I am following the steps mentioned in https://docs.zephyrproject.org/latest/boards/arm/nrf52840_pca10059/doc/index.html to get started using USB dongle.

I picked up blinky as sample with west 'build -b nrf52840_pca10059' and created package with 'nrfutil pkg generate --hw-version 52 --sd-req=0x00 --application build/zephyr/zephyr.hex --application-version 1 pkg.zip'.

I run 'nrfutil dfu usb-serial -pkg pkg.zip -p /dev/ttyACM0', then code is successfully loaded and I could see green LED blinking.

After this step, I tried steps mentioned under "Chainloading the MCUBoot bootloader". I populated mcuboot repository 'git clone https://github.com/JuulLabs-OSS/mcuboot'. I compiled boot/zephyr program with 'west build -b nrf52840_pca10059'. I have got cmake error. I have commented CONFIG_BOOT_HAVE_LOGGING=n in boards/nrf52840_pca10059.conf. With that, compilation is successful but compiled binary is larger than flash partition. Then I have added 'CONFIG_SIZE_OPTIMIZATIONS=y' in prj.conf and now compiled binary is with-in flash partitioned size.

Then I created package with 'nrfutil pkg generate --hw-version 52 --sd-req=0x00 --application build/zephyr/zephyr.hex --application-version 1 pkg.zip'. Now I have loaded mcuboot onto the device with 'nrfutil dfu usb-serial -pkg pkg.zip -p /dev/ttyACM0'.

At this point, I tried testing the device by holding BUTTON1 and inserting into USB. I expected to see USB device listed on my computer but I didn't see any device. Also, in "Chainloading the MCUBoot bootloader" section, it is mentioned to use mcumgr command to load application that is compiled with CONFIG_BOOTLOADER_MCUBOOT=y and CONFIG_TEXT_SECTION_OFFSET=0x200. But we should have mcumgr already running on the device, right? But we have loaded only mcuboot. So I am wondering how can we use mcuboot. If I loot at smp_svr sample, it is mentioned that we need to load both mcuboot and smp_svr before using mcumgr commands to load any other app.

If I want to have both nRF bootloader and then MCUboot, could you detail be steps to run blinky? If needed, I can load smp_svr also.

Rgds,
Venkat.

On 13/04/19 5:29 AM, Bolivar, Marti wrote:

Sorry, I’m having trouble understanding the problem. What are you trying to do? What did you try? What happened? What did you expect to happen?

 

Thanks!

Marti

 

From: Venkat Rao Vallapaneni <vallapaneni@...>
Sent: Thursday, April 11, 2019 5:24 AM
To: Bolivar, Marti <Marti.Bolivar@...>; users@...
Subject: Re: [Zephyr-users] mcuboot for nrf52840_pca10059

 

Hi,

I am not able to have mcuboot alongside nrf DFU for nrf52840_pca10059. Any help in solving this would be great.

Rgds,
Venkat.

On 10/04/19 8:52 AM, Venkat Rao Vallapaneni wrote:

Hi Marti,

I am able to chainload the MCUBoot bootloader as specified in https://docs.zephyrproject.org/latest/boards/arm/nrf52840_pca10059/doc/index.html#programming-and-debugging.

After programming mcuboot, I remove the dongle and put it back while holding button1 and removed the button after inserting into USB dongle. I am not seeing any serial port with lsusb command. Is there anything else I need to do?

Rgds,
Venkat.

On 09/04/19 10:02 PM, Bolivar, Marti wrote:

Hi,

 

The tinycbor code was moved to its own repository. You need to run ‘west update’ in your zephyr west installation to get the code.

 

For details on west, please see https://docs.zephyrproject.org/latest/guides/west/repo-tool.html

 

Thanks,

Marti

 

 

From: users@... <users@...> On Behalf Of via Lists.Zephyrproject.Org
Sent: Tuesday, April 9, 2019 10:25 AM
To: users@...
Cc: users@...
Subject: [Zephyr-users] mcuboot for nrf52840_pca10059

 

Hi,

I am trying to compile mcuboot (latest version from git) with zephyr v1.14.0-rc3. I am getting this error:

mcuboot/boot/boot_serial/src/boot_serial.c:36:10: fatal error: cbor.h: No such file or directory

Can someone help me resolving this?

Rgds,
Venkat.

Join users@lists.zephyrproject.org to automatically receive all group messages.