Date   

Concurrent TLS and Non-TLS TCP Communication

Erin Beckwith
 

Hello,

For a research project I have a need to be able to support both TLS and non-TLS communication in the same application. 
Is there any way to do this within Zephyr?  It seems like once I apply the TLS overlay config, I might not be able to do any non-TLS communication.  When I try to open the simple TCP socket it seems to still go down the code path of calling through the mbed libs.

Thanks,
Erin


Re: Sparkfun Pro nRF52840 Mini support?

Lawrence King
 

Hi Rodrigo:

 

You asked: “Are you sure that it is not possible to program a new zephyr firmware with the current bootloader?”,  the answer is No, I am not sure, but all of the documentation I have read so far, and all of the things I have tried haven’t worked. I was hoping someone on the forum would help me get it running without a J-Link.

 

As I mentioned earlier, my backup plan is to use a J-Link device, It should show up in a day or two, and I am reasonably confident that will work.

 

I am impressed with the huge number of boards that Zephyr does support, kudos to the Zephyr Project for getting so much running. Hopefully the project team will have a chance to get the various debuggers cleanly integrated and make every board really easy for newbies….

 

Lawrence King

Principal Developer

+1(416)627-7302

 

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

 

Hi Lawrence,

 

I can imagine how frustrated you are. Sorry for hearing that.

 

Sometimes we cannot catch what the developers are doing because the size and complexity of the project. I am very convinced they are trying to do their best to fit every expectation, but sadly sometimes it cannot be possible.

 

Are you sure that it is not possible to program a new zephyr firmware with the current bootloader? I am using the nordic DFU which is not the zephyr's official one to program a nrf52 dongle.

 

You are based on US right? You would buy a generic JLINK if you are not willing to buy a expensive one. I am using a Chinese version of that and it works great. I have bought that for $16.  

 

I hope you can enjoy the system and we can contribute together. 

 

"If you want to go fast, go alone. If you want to go far, go together" someone. (I forgot 😬)

 

 

Best regards,

Rodrigo Peixoto 

 

On Wed, 24 Apr 2019 at 11:02 Lawrence King <lawrence.king@...> wrote:

Hi Rodrigo:

 

I went through the schematics for the SparkFun nrf52840 mini, the Adafruit nrf52840 Feather, and the Nordic pca10059 reference board. All three boards are nearly identical, (other than physical form factors, and the choices of which GPIOs go to the switches, led(s) and I/Os). All three boards use the same boot loader and are fully capable of downloading and running code without the use of an external programming dongle.

 

Unfortunately the Zephyr developers have elected to not use the onboard debug facilities of these boards, and have instead decided that users need to buy and use an external programming device for these boards. This is not the first time I have seen this, I had exactly the same issue with the i.MXMRT1064 board, it too has an onboard debugger, but the only way to use the board is with an external probe.

 

Here is what the Zephyr documentation for the Adafruit feather says https://docs.zephyrproject.org/latest/boards/arm/nrf52_adafruit_feather/doc/nrf52_adafruit_feather.html

 

Flashing

Flashing Zephyr onto the nrf52_adafruit_feather board requires an external J-Link programmer. The programmer is attached to the X1 SWD header.

Other boards such as the MakerDairy nrf52840-mdk do use the onboard debug facilities, and these boards are trivial to bring up with Zephyr, just plug the board into the USB port and type “ninja flash”. If only all of the boards with onboard debug facilities were this easy.

 

Dear Zephyr Developers:

              Please use these boards in exactly the same way a “customer” would use them. Use the onboard debug facilities! It is quick and easy for you to bring the board up with your external debugger, but this should only be used for initial bringup. After that you really should move the debugger dongle off your bench and use the onboard debug facilities.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Rodrigo Peixoto
Sent: Monday, April 22, 2019 11:28 AM
To: Lawrence King <lawrence.king@...>
Cc: Zephyr-users@...
Subject: Re: [Zephyr-users] Sparkfun Pro nRF52840 Mini support?

 

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.

 

 

 

--

Rodrigo Peixoto

Co-founder and Technical advisor

 

+55 (82) 98144-8585

http://ayna.tech | Skype: rodrigopex

 


Re: Sparkfun Pro nRF52840 Mini support?

Rodrigo Peixoto <rodrigopex@...>
 

Hi Lawrence,

I can imagine how frustrated you are. Sorry for hearing that.

Sometimes we cannot catch what the developers are doing because the size and complexity of the project. I am very convinced they are trying to do their best to fit every expectation, but sadly sometimes it cannot be possible.

Are you sure that it is not possible to program a new zephyr firmware with the current bootloader? I am using the nordic DFU which is not the zephyr's official one to program a nrf52 dongle.

You are based on US right? You would buy a generic JLINK if you are not willing to buy a expensive one. I am using a Chinese version of that and it works great. I have bought that for $16.  

I hope you can enjoy the system and we can contribute together. 

"If you want to go fast, go alone. If you want to go far, go together" someone. (I forgot 😬)


Best regards,
Rodrigo Peixoto 

On Wed, 24 Apr 2019 at 11:02 Lawrence King <lawrence.king@...> wrote:

Hi Rodrigo:

 

I went through the schematics for the SparkFun nrf52840 mini, the Adafruit nrf52840 Feather, and the Nordic pca10059 reference board. All three boards are nearly identical, (other than physical form factors, and the choices of which GPIOs go to the switches, led(s) and I/Os). All three boards use the same boot loader and are fully capable of downloading and running code without the use of an external programming dongle.

 

Unfortunately the Zephyr developers have elected to not use the onboard debug facilities of these boards, and have instead decided that users need to buy and use an external programming device for these boards. This is not the first time I have seen this, I had exactly the same issue with the i.MXMRT1064 board, it too has an onboard debugger, but the only way to use the board is with an external probe.

 

Here is what the Zephyr documentation for the Adafruit feather says https://docs.zephyrproject.org/latest/boards/arm/nrf52_adafruit_feather/doc/nrf52_adafruit_feather.html

 

Flashing

Flashing Zephyr onto the nrf52_adafruit_feather board requires an external J-Link programmer. The programmer is attached to the X1 SWD header.

Other boards such as the MakerDairy nrf52840-mdk do use the onboard debug facilities, and these boards are trivial to bring up with Zephyr, just plug the board into the USB port and type “ninja flash”. If only all of the boards with onboard debug facilities were this easy.

 

Dear Zephyr Developers:

              Please use these boards in exactly the same way a “customer” would use them. Use the onboard debug facilities! It is quick and easy for you to bring the board up with your external debugger, but this should only be used for initial bringup. After that you really should move the debugger dongle off your bench and use the onboard debug facilities.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Rodrigo Peixoto
Sent: Monday, April 22, 2019 11:28 AM
To: Lawrence King <lawrence.king@...>
Cc: Zephyr-users@...
Subject: Re: [Zephyr-users] Sparkfun Pro nRF52840 Mini support?

 

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.

 

 

 

--
Rodrigo Peixoto
Co-founder and Technical advisor

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



Re: Sparkfun Pro nRF52840 Mini support?

Lawrence King
 

Hi Rodrigo:

 

I went through the schematics for the SparkFun nrf52840 mini, the Adafruit nrf52840 Feather, and the Nordic pca10059 reference board. All three boards are nearly identical, (other than physical form factors, and the choices of which GPIOs go to the switches, led(s) and I/Os). All three boards use the same boot loader and are fully capable of downloading and running code without the use of an external programming dongle.

 

Unfortunately the Zephyr developers have elected to not use the onboard debug facilities of these boards, and have instead decided that users need to buy and use an external programming device for these boards. This is not the first time I have seen this, I had exactly the same issue with the i.MXMRT1064 board, it too has an onboard debugger, but the only way to use the board is with an external probe.

 

Here is what the Zephyr documentation for the Adafruit feather says https://docs.zephyrproject.org/latest/boards/arm/nrf52_adafruit_feather/doc/nrf52_adafruit_feather.html

 

Flashing

Flashing Zephyr onto the nrf52_adafruit_feather board requires an external J-Link programmer. The programmer is attached to the X1 SWD header.

Other boards such as the MakerDairy nrf52840-mdk do use the onboard debug facilities, and these boards are trivial to bring up with Zephyr, just plug the board into the USB port and type “ninja flash”. If only all of the boards with onboard debug facilities were this easy.

 

Dear Zephyr Developers:

              Please use these boards in exactly the same way a “customer” would use them. Use the onboard debug facilities! It is quick and easy for you to bring the board up with your external debugger, but this should only be used for initial bringup. After that you really should move the debugger dongle off your bench and use the onboard debug facilities.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Rodrigo Peixoto
Sent: Monday, April 22, 2019 11:28 AM
To: Lawrence King <lawrence.king@...>
Cc: Zephyr-users@...
Subject: Re: [Zephyr-users] Sparkfun Pro nRF52840 Mini support?

 

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: Client certificates

Jukka Rissanen
 

Hi Nick,

see for example samples/net/sockets/echo_client how it is handling the
certificates. Also if you want to create certs yourself, there is some
guidance in net-tools project README.md file for that.


Cheers,
Jukka

On Wed, 2019-04-17 at 16:46 +0400, Nick Glencross wrote:
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: 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@linaro.org> 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
 

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.

1361 - 1380 of 2796