Date   

Re: Sparkfun Pro nRF52840 Mini support?

Rodrigo Peixoto <rodrigopex@...>
 

Lawrence,
Do you have the memory footprint detailed when using their bootloader?
I would suggest you change the flash partition to fit the bootloader image size at the bootloader portion and the rest of the image after that. 

```c++
...
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &code_partition;
};

...

&flash0 {
/*
* For more information, see:
*/
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "sparkfun_bootloader";
reg = <0x000000000 0x000XXXX>; // size of that
};
code_partition: partition@XXXX {
label = "image-0";
reg = <0x0000XXXX 0x0000YYYYYY>; // fit the rest of the memory remember the storage partion
};
/*
* The flash starting at 0x000f8000 and ending at
* 0x000fffff is reserved for use by the application.
*/

/* Storage partition will be used by FCB/NFFS/NVS if enabled. */
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};
```

Something like that.

Answering your question: 

Of course my fallback plan is to use an external debugger (J-Link of some kind? Black Majic?). Is there a recommended external debugger I should use for nRF52840?

I am using the JLINK with a tag connect plug (TC2030) to flash via SWD pins. west flash always works for me.
I hope it helps. 

Best regards,
Rodrigo Peixoto
Co-founder and Technical advisor

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex




Em seg, 22 de abr de 2019 às 10:38, Lawrence King <lawrence.king@...> escreveu:

Hi Rodrigo

 

The parts you talked about are the easy parts and I have no problem with these changes. (LDO/DC-DC, crystals, gpio aliases, dts, etc.). I think I already have these set up.

 

The “challenge” with the Sparkfun board is the debugger, and the FLASH space. The Sparkfun board does NOT have an external chip of some kind to do debugging, instead they preload the nRF52840 with a bootloader which presents itself on the native USB interface as a serial port (CDC) and a mass storage device. This way the “usual” tools will work (pyocd) exactly as expected. However the bootloader is “somewhere” in the internal FLASH and it is necessary to change the memory definition in dts to not overwrite the bootloader (and brick the board), also the serial console needs to call the bootloader to output messages on the virtual serial port.

 

Has anyone looked into these portions of the problem for some other chipset? This is the portion of the problem I am not quite sure how to fix.

 

Of course my fallback plan is to use an external debugger (J-Link of some kind? Black Majic?). Is there a recommended external debugger I should use for nRF52840?

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: Rodrigo Peixoto <rodrigopex@...>
Sent: Thursday, April 18, 2019 12:49 PM
To: Lawrence King <lawrence.king@...>
Cc: Zephyr-users@...
Subject: Re: [Zephyr-users] Sparkfun Pro nRF52840 Mini support?

 

Hi Lawrence,

 

I am not aware if anyone is bringing up this board, but I can suggest you bring it up yourself. It is not a big deal. The process is copying, pasting, and changing some portion of the files. 

 

How experienced are you on Zephyr?

 

 

1 - Is the Bluetooth module using dc-dc or LDO? 

    YES: Do nothing just copy the board files and rename them;

     NO: You must to disable DCDC by setting the BOARD_ENABLE_DCDC to "default n" at the Kconfig file. 

2 - Is the low-frequency oscillator is present on the Bluetooth module?

    YES: Do nothing

    NO: You have to add the CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to the "board_name_defconfig" file. 

 

The last step is to change the DTS to adjust the pins used by your board. 

 

If you need further help let us know.

 

 

Best regards,

Rodrigo Peixoto

Co-founder and Technical advisor

 

+55 (82) 98144-8585

http://ayna.tech | Skype: rodrigopex

 

 

 

Em qui, 18 de abr de 2019 às 11:09, Lawrence King <lawrence.king@...> escreveu:

I just received some Sparkfun nRF52840 boards and I was hoping to bring up Zephyr on the boards.

 

There is a Sparkfun nRF52832 board listed in the supported boards, but this board needs an external debugger. Now that Sparkfun has two different nRF52 boards I think that the existing board in the tree nrf52_sparkfun needs to be renamed to nrf52832_sparkfun, and the new board should be added as nrf52840_sparkfun.

 

The nrf52840_sparkfun board has an onboard bootloader which presents as a tty and a usb drive when I plug it in so I expect that pyOCD should work for loading code and debugging, however I think that the ROM layout may need to be changed to not overwrite the bootlopader.

 

Is anyone working on bringing up this board?

 

https://www.sparkfun.com/products/15025

 

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 


Re: 96Boards GPIO standard names?

Mani Sadhasivam
 

Hi Lawrence,

FYI: I have just created a github issue [1] for tracking this. Please take a look
and share your thoughts.

Thanks,
Mani


On Tue, Mar 5, 2019 at 12:28 AM Mani Sadhasivam <manivannanece23@...> wrote:


---------- Forwarded message ---------
From: Mani Sadhasivam <manivannanece23@...>
Date: Tue, 5 Mar, 2019, 12:11 AM
Subject: Re: [Zephyr-users] 96Boards GPIO standard names?
To: Lawrence King <lawrence.king@...>


Hi Lawrence, 

On Mon, 4 Mar, 2019, 10:43 PM Lawrence King <lawrence.king@... wrote:

I have been writing code for a peripheral board that plugs into a Nitrogen or any other 96Boards compliant board (with 40-pin Low Speed connector) running Zephyr. I was trying to code use of the GPIOs in a way that would work for all compliant boards without adding custom definitions.

 

The 96Boards IOT specification nicely describes the I/O connector and the features on the connector. For example GPIO-A is on Pin 23 of the connector. Unfortunately each board uses different chipset GPIOs to drive the pin on the connector. If I had a symbolic name for the connector GPIO pin (for example GPIO_96B_A_CONTROLLER and GPIO_96B_A_PIN) that mapped to the chipset GPIIO pin,  then my code would work (after  recompile with the appropriate BOARD=96B_xxx) across all of the compliant boards with no change to the source code.

 

Right now with the Nitrogen board I have created a set of defines based on reading the schematic, but of course these will not work with the next chip I use I will have to wrap the defines with #if BOARD==96B_xxx .

 

It is possible that you already have these definitions, but I didn’t manage to find them.


I know that there is a similar implementation done for arduino connector and we need to come up with something similar for 96Boards connectors (refer nucleo_f401re board). This came up before as well as we have several mezzanines also supported in Zephyr.

I will create a github issue for tracking this and we'll continue logging the progress.

Thanks, 
Mani

 

I realize that Zephyr supports many boards with many form factors and this would only solve the issue for a few boards.

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 



--
மணிவண்ணன் சதாசிவம்


Re: Sparkfun Pro nRF52840 Mini support?

Lawrence King
 

Hi Rodrigo

 

The parts you talked about are the easy parts and I have no problem with these changes. (LDO/DC-DC, crystals, gpio aliases, dts, etc.). I think I already have these set up.

 

The “challenge” with the Sparkfun board is the debugger, and the FLASH space. The Sparkfun board does NOT have an external chip of some kind to do debugging, instead they preload the nRF52840 with a bootloader which presents itself on the native USB interface as a serial port (CDC) and a mass storage device. This way the “usual” tools will work (pyocd) exactly as expected. However the bootloader is “somewhere” in the internal FLASH and it is necessary to change the memory definition in dts to not overwrite the bootloader (and brick the board), also the serial console needs to call the bootloader to output messages on the virtual serial port.

 

Has anyone looked into these portions of the problem for some other chipset? This is the portion of the problem I am not quite sure how to fix.

 

Of course my fallback plan is to use an external debugger (J-Link of some kind? Black Majic?). Is there a recommended external debugger I should use for nRF52840?

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: Rodrigo Peixoto <rodrigopex@...>
Sent: Thursday, April 18, 2019 12:49 PM
To: Lawrence King <lawrence.king@...>
Cc: Zephyr-users@...
Subject: Re: [Zephyr-users] Sparkfun Pro nRF52840 Mini support?

 

Hi Lawrence,

 

I am not aware if anyone is bringing up this board, but I can suggest you bring it up yourself. It is not a big deal. The process is copying, pasting, and changing some portion of the files. 

 

How experienced are you on Zephyr?

 

 

1 - Is the Bluetooth module using dc-dc or LDO? 

    YES: Do nothing just copy the board files and rename them;

     NO: You must to disable DCDC by setting the BOARD_ENABLE_DCDC to "default n" at the Kconfig file. 

2 - Is the low-frequency oscillator is present on the Bluetooth module?

    YES: Do nothing

    NO: You have to add the CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to the "board_name_defconfig" file. 

 

The last step is to change the DTS to adjust the pins used by your board. 

 

If you need further help let us know.

 

 

Best regards,

Rodrigo Peixoto

Co-founder and Technical advisor

 

+55 (82) 98144-8585

http://ayna.tech | Skype: rodrigopex

 

 

 

Em qui, 18 de abr de 2019 às 11:09, Lawrence King <lawrence.king@...> escreveu:

I just received some Sparkfun nRF52840 boards and I was hoping to bring up Zephyr on the boards.

 

There is a Sparkfun nRF52832 board listed in the supported boards, but this board needs an external debugger. Now that Sparkfun has two different nRF52 boards I think that the existing board in the tree nrf52_sparkfun needs to be renamed to nrf52832_sparkfun, and the new board should be added as nrf52840_sparkfun.

 

The nrf52840_sparkfun board has an onboard bootloader which presents as a tty and a usb drive when I plug it in so I expect that pyOCD should work for loading code and debugging, however I think that the ROM layout may need to be changed to not overwrite the bootlopader.

 

Is anyone working on bringing up this board?

 

https://www.sparkfun.com/products/15025

 

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 


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.


Re: mcuboot for nrf52840_pca10059

Venkat Rao Vallapaneni <vallapaneni@...>
 

Hi Marti,


Yes, I could get my application running with nRF DFU and mcuboot.


Rgds,

Venkat.


On 17/04/19 9:08 PM, Bolivar, Marti wrote:
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.


Re: Sparkfun Pro nRF52840 Mini support?

Rodrigo Peixoto <rodrigopex@...>
 

Hi Lawrence,

I am not aware if anyone is bringing up this board, but I can suggest you bring it up yourself. It is not a big deal. The process is copying, pasting, and changing some portion of the files. 

How experienced are you on Zephyr?


1 - Is the Bluetooth module using dc-dc or LDO? 
    YES: Do nothing just copy the board files and rename them;
     NO: You must to disable DCDC by setting the BOARD_ENABLE_DCDC to "default n" at the Kconfig file. 
2 - Is the low-frequency oscillator is present on the Bluetooth module?
    YES: Do nothing
    NO: You have to add the CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to the "board_name_defconfig" file. 

The last step is to change the DTS to adjust the pins used by your board. 

If you need further help let us know.


Best regards,
Rodrigo Peixoto
Co-founder and Technical advisor

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex




Em qui, 18 de abr de 2019 às 11:09, Lawrence King <lawrence.king@...> escreveu:

I just received some Sparkfun nRF52840 boards and I was hoping to bring up Zephyr on the boards.

 

There is a Sparkfun nRF52832 board listed in the supported boards, but this board needs an external debugger. Now that Sparkfun has two different nRF52 boards I think that the existing board in the tree nrf52_sparkfun needs to be renamed to nrf52832_sparkfun, and the new board should be added as nrf52840_sparkfun.

 

The nrf52840_sparkfun board has an onboard bootloader which presents as a tty and a usb drive when I plug it in so I expect that pyOCD should work for loading code and debugging, however I think that the ROM layout may need to be changed to not overwrite the bootlopader.

 

Is anyone working on bringing up this board?

 

https://www.sparkfun.com/products/15025

 

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 


Sparkfun Pro nRF52840 Mini support?

Lawrence King
 

I just received some Sparkfun nRF52840 boards and I was hoping to bring up Zephyr on the boards.

 

There is a Sparkfun nRF52832 board listed in the supported boards, but this board needs an external debugger. Now that Sparkfun has two different nRF52 boards I think that the existing board in the tree nrf52_sparkfun needs to be renamed to nrf52832_sparkfun, and the new board should be added as nrf52840_sparkfun.

 

The nrf52840_sparkfun board has an onboard bootloader which presents as a tty and a usb drive when I plug it in so I expect that pyOCD should work for loading code and debugging, however I think that the ROM layout may need to be changed to not overwrite the bootlopader.

 

Is anyone working on bringing up this board?

 

https://www.sparkfun.com/products/15025

 

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 


Re: mcuboot for nrf52840_pca10059

Kinder, David B <david.b.kinder@...>
 

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.


Re: mcuboot for nrf52840_pca10059

Bolivar, Marti
 

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.


Client certificates

Nick Glencross
 

Hello,

I've been doing some Zephyr development, and it's looking really slick.

I started writing a lengthy email with some code fragment of my attempt to get Client certificates working, but I've just been getting various errors from deep in mbedtls, suggesting I'm not passing in the right certificates credentials etc.

Has anyone got client TLS certificates working, and can share a working example?

I'd be really grateful if someone could point me in the right direction,

Thank,

Nick Glencross



Re: mcuboot for nrf52840_pca10059

Venkat Rao Vallapaneni <vallapaneni@...>
 

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.


Re: Zephyr 1.14.0 Released (corrected)

Kumar Gala
 

All,

In my rush to get 1.14 released, I reported on the Major Enhancements from 1.13. Sorry for the confusion. Here is the corrected list of Major Enhancements in 1.14:

* The Zephyr project now supports over 160 different board configurations
spanning 8 architectures. All architectures are rigorously tested and
validated using one of the many simulation platforms supported by the
project: QEMU, Renode, ARC Simulator, and the native POSIX configuration.

* The timing subsystem has been reworked and reimplemented, greatly
simplifying the resulting drivers, removing thousands of lines
of code, and reducing a typical kernel build size by hundreds of bytes.
TICKLESS_KERNEL mode is now the default on all architectures.

* The Symmetric Multi-Processing (SMP) subsystem continues to evolve
with the addition of a new CPU affinity API that can "pin" threads to
specific cores or sets of cores. The core kernel no longer uses the
global irq_lock on SMP systems, and exclusively uses the spinlock API
(which on uniprocessor systems reduces to the same code).

* Zephyr now has support for the x86_64 architecture. It is currently
implemented only for QEMU targets, supports arbitrary numbers of CPUs,
and runs in SMP mode by default, our first platform to do so.

* We've overhauled the Network packet (net-pkt) API and moved the majority
of components and protocols to use the BSD socket API, including MQTT,
CoAP, LWM2M, and SNTP.

* We enhanced the native POSIX port by adding UART, USB, and display
drivers. Based on this port, we added a simulated NRF52832 SoC which enables
running full system, multi-node simulations, without the need of real
hardware.

* We added an experimental BLE split software Controller with Upper Link Layer
and Lower Link Layer for supporting multiple BLE radio hardware
architectures.

* The power management subsystem has been overhauled to support device idle
power management and move most of the power management logic from the
application back to the BSP.

* We introduced major updates and an overhaul to both the logging and
shell subsystems, supporting multiple back-ends, integration
of logging into the shell, and delayed log processing.

* Introduced the `west` tool for management of multiple repositories and
enhanced support for flashing and debugging.

* Added support for application user mode, application memory
partitions, and hardware stack protection in ARMv8m

* Applied MISRA-C code guideline on the kernel and core components of Zephyr.
MISRA-C is a well established code guideline focused on embedded systems and
aims to improve code safety, security and portability.

- kumar

On Apr 16, 2019, at 3:44 PM, Kumar Gala <kumar.gala@...> wrote:

Hi,

We are pleased to announce the release of Zephyr kernel version 1.14.0. The 1.14.0 will be the first Zephyr LTS release that we will support for at least 2 years.

Major enhancements with this release include:

* Extensible and Pluggable Tracing Support
* Compartmentalized application memory organization
* Logging System Overhaul
* Introduce system calls for BSD socket APIs
* Support for IEEE 802.1AS-2011 generalized Precision Time Protocol (gPTP)
* Link Layer Discovery Protocol (LLDP) TX support
* Support for TLS and DTLS using BSD socket API
* Support for Link Layer Multicast Name Resolution (LLMNR)
* Introduced reworked ADC API and updated Nordic, NXP, Atmel, and Synopsys DesignWare drivers
* Support OS driven Power Management framework
* Basic support for Arm TrustZone in Armv8-M

The detailed release notes can be found here:

https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v1.14.0

I would like to thank all the contributors to this release. In total 250 contributors participated in the development of 1.14. Its taken a lot of hard work from everyone in the Zephyr community!

Thank you again,

Kumar Gala


Zephyr 1.14.0 Released

Kumar Gala
 

Hi,

We are pleased to announce the release of Zephyr kernel version 1.14.0. The 1.14.0 will be the first Zephyr LTS release that we will support for at least 2 years.

Major enhancements with this release include:

* Extensible and Pluggable Tracing Support
* Compartmentalized application memory organization
* Logging System Overhaul
* Introduce system calls for BSD socket APIs
* Support for IEEE 802.1AS-2011 generalized Precision Time Protocol (gPTP)
* Link Layer Discovery Protocol (LLDP) TX support
* Support for TLS and DTLS using BSD socket API
* Support for Link Layer Multicast Name Resolution (LLMNR)
* Introduced reworked ADC API and updated Nordic, NXP, Atmel, and Synopsys DesignWare drivers
* Support OS driven Power Management framework
* Basic support for Arm TrustZone in Armv8-M

The detailed release notes can be found here:

https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v1.14.0

I would like to thank all the contributors to this release. In total 250 contributors participated in the development of 1.14. Its taken a lot of hard work from everyone in the Zephyr community!

Thank you again,

Kumar Gala


Re: SDHC disk doesn't unmount #driver #spi

Lucas Peixoto <lucaspeixotoac@...>
 

Thanks for the answer. You are right, the problem was solved implementing the fatfs_unmount function that you said. I made some tests and everything is ok. On the weekend I will create a PR.


Re: mcuboot for nrf52840_pca10059

Bolivar, Marti
 

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.


Re: 6lowpan border router

Andrei
 

Hi Tavish,

On Tue, Apr 16, 2019 at 04:06:12PM +0530, Tavish Naruka wrote:
Hi Andrei,

Thanks for the reply.

On Fri, Apr 12, 2019 at 1:15 PM Andrei Emeltchenko
<andrei.emeltchenko.news@...> wrote:

I have done wpan_serial app and it was working with RPL nodes (now RPL
support was removed from Zephyr as we have no maintainer for it).
I saw that RPL support has been removed, but from what I understand,
6lowpan IPv6 prefix propagation should still be working. Without that.
all I can do is get the nodes to ping each other's link-local address.
if they have pre-set IPV6 configuration (own IP, server IP etc.), then
they are still able to send and receive TCP/UDP packets. At this
point, I just want to be able to get an IPV6 prefix from my 'gateway',
which is either native-border-router from contiki-ng, or from 6lbr.
That way I can at least form a star network without any mesh routing.
Let me know if you have any ideas on what I might be missing.
wpan_serial just implements 802.15.4 "serial-radio", it does not know
anything beyond that. I think you need to check contiki border
router or 6lbr for that. wpan_serial might not support all
"serial-radio" commands, but they can be easily added.

Best regards
Andrei Emeltchenko


Re: 6lowpan border router

Tavish Naruka
 

Hi Andrei,

Thanks for the reply.

On Fri, Apr 12, 2019 at 1:15 PM Andrei Emeltchenko
<andrei.emeltchenko.news@...> wrote:

I have done wpan_serial app and it was working with RPL nodes (now RPL
support was removed from Zephyr as we have no maintainer for it).
I saw that RPL support has been removed, but from what I understand,
6lowpan IPv6 prefix propagation should still be working. Without that.
all I can do is get the nodes to ping each other's link-local address.
if they have pre-set IPV6 configuration (own IP, server IP etc.), then
they are still able to send and receive TCP/UDP packets. At this
point, I just want to be able to get an IPV6 prefix from my 'gateway',
which is either native-border-router from contiki-ng, or from 6lbr.
That way I can at least form a star network without any mesh routing.
Let me know if you have any ideas on what I might be missing.

--
Thanks and regards
Tavish Naruka


Re: [Networking][socket] When is network is ready to accept a socket connection

Jukka Rissanen
 

Hi Karthik,

You are now looking the subsys/net/lib/config/init.c which is only used
when the device starts. There is no ADD handler for manual addition of
IPv4 address because the manual address is added automatically by that
file anyway.

I created a new version of PR#9370 which is now a bit more simpler and
easier to understand. Please review and comment there if you have
concerns/questions.

Cheers,
Jukka

On Mon, 2019-04-15 at 19:25 +0000, Prabhu Vinod, Karthik wrote:
Hi Jukka,

Just a follow-up question:

So I was going through the code, I realized the
NET_EVENT_IPV4_ADDR_ADD event only works when the setup uses DHCP.
Looks it won't work if the IP address is statically allocated. Is my
understanding correct?

As a work around for this: In case of static allocation can I do
this?

1.) Reassign the same static ip-address to the interface using
net_if_ipv4_addr_add like net_if_ipv4_addr_add(iface, &addr,
NET_ADDR_MANUAL, 0);
2.)
a.) net_if_ipv4_addr_add returns NULL if the ip address cannot
be added if the network is not ready or some other error:
b.) net_if_ipv4_addr_add returns a pointer to the
network_interface if the ip address could be successfully added.
3.) That generates the event.

Does it make sense?

Many Regards,
Karthik Prabhu Vinod

Help save the planet by choosing not to use single use plastics. Pick
paper, bamboo or metal cutlery and carry your own bag to the grocery
store. Every little thing you do makes an impact.

On 4/10/19, 9:56 AM, "users@... on behalf of
Prabhu Vinod, Karthik" <users@... on behalf of
karthik.prabhu.vinod@...> wrote:

Sounds good. Thank you so much Jukka. I think I will end up using
NET_EVENT_IPV4_ADDR_ADD event for now. Any expected ETA for the patch
you mentioned? ...Approximately !

Many Regards,
Karthik Prabhu Vinod

Help save the planet by choosing not to use single use plastics.
Pick paper, bamboo or metal cutlery and carry your own bag to the
grocery store. Every little thing you do makes an impact.

On 4/10/19, 1:35 AM, "users@... on behalf of
Jukka Rissanen" <users@... on behalf of
jukka.rissanen@...> wrote:

Hi Karthik,

For IPv4 monitoring NET_EVENT_IPV4_ADDR_ADD is best option
atm.
For IPv6 the NET_EVENT_IPV6_DAD_SUCCEED and/or
NET_EVENT_IPV6_ROUTER_ADD should be used instead.

These events are not optimal and some more work is needed in
the future
to make this more generic. So something like this draft
https://github.com/zephyrproject-rtos/zephyr/pull/9370 that
is still
pending.


Cheers,
Jukka


On Tue, 2019-04-09 at 22:13 +0000, Prabhu Vinod, Karthik
wrote:
> Hi,
>
> I wanted to know if there are network events which I can
subscribe,
> to know when the network init is complete. If there is one,
I want to
> wait and use the callback to notify my app that then It can
perform
> socket_connection. Because a socket connection on a non-
ready network
> is blocking call.
>
> I looked through include/net/net_event.h and found that
there is
> NET_EVENT_IPV4_ADDR_ADD which comes closest to our use case
since
> assigning IPv4 address to an network interface should be
last thing
> to perform in a network_boot sequence. Is there something
else that I
> could do?
>
> Many Regards,
> Karthik Prabhu Vinod
>
> Help save the planet by choosing not to use single use
plastics. Pick
> paper, bamboo or metal cutlery and carry your own bag to
the grocery
> store. Every little thing you do makes an impact.
>














Re: mcuboot for nrf52840_pca10059

Bolivar, Marti
 

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.


Re: SDHC disk doesn't unmount #driver #spi

Leandro Pereira
 

Lucas,

On 4/15/19 5:32 AM, Lucas Peixoto wrote:
So really, we don't have the function pointer to unmount and no one code
related to unmount in fat_fs.c. This is really right? If someone is
using sdhc disk and could help me, I appreciate it.
You're right, the unmount operation isn't implemented in the FAT
fs_file_system_t struct. It should be possible to implement it easily,
though.

Something along the lines of:

static int fatfs_unmount(struct fs_mount_t *mountp)
{
RESULT res;

res = f_mount(NULL, &mountp->mnt_point[1], 1);

return translate_error(res);
}

Should work fine, from a cursory read of the FAT filesystem driver. A
PR adding this to Zephyr would be appreciated.

Cheers,
Leandro

1601 - 1620 of 3031