nrf9160dk fota using external flash

Hi all,


I'm wondering if there is a sample code that implements FOTA (would be great if it's from AWS S3 bucket) for nrf9160dk. 

This was the closest thing I was able to find, but it works for nrf52840dk. I guess I could add an overlay file for nrf9160dk, but I still don't know how to build/run test applications. Also this was done with ncs 1.7.1 and our product currently uses ncs 1.6.1. 


Cheers,
Aleksa

  • smp_svr doesn't build for me in the ncs1.9.1(we will probably update our project to this sdk version). I get the following error when building: 

    /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc" is not able to compile a simple test program.

    Related to this issue, I found this, but the suggested answers do not help. 

    Just to make sure we are on the same page, I am trying to build this sample: /zephyr/samples/subsys/mgmt/mcumgr/smp_svr.

    When you use chosen  nordic,pm-ext-flash = &mx25r64; in the overlay file the partition manager will automatically configure the secondary slot to the start address of the external flash. You can find it in the partitions.yml file in build folder.


    If this is the case, why can't I just add this to my existing overlay file, and the code should work?

    I was able to build the code you've made, but when I open partitions.yml I don't see external_flash being used - mcuboot_secondary goes to the flash_primary.

  • Hi Aleksa, 

    Which board did you build my example for ? I haven't tried with the nRF91 DK board, but if you build the example for the nRF52840DK or the nRF53 DK it should work. 

    For the nRF91 , I'm not sure the same approach can be used, but you can have a look at this case : https://devzone.nordicsemi.com/f/nordic-q-a/72543/mcu-boot-with-external-flash-littles-partition-and-secondary-image-partition

    My coworker Håkon has also provided an example for the nRF91 (at the last reply). It's about a year ago so the approach is slightly different but it should work. 

  • Hi Hung,

    I've built for nRF52840DK, from Segger Embedded Studio, and with west from the terminal. I was able to flash your sample code, but partitions.yml didn't contain external_flash.

    This link seems very useful, I'll take a look at it. Thanks.

    While asking questions, how to run in general Zephyr samples on the NRF boards? Is there a document that describes this?

  • Hi Aleksa, 

    I would suggest to get familiar with the NCS simple examples before testing with something more complex. 
    Please try and test with the blinky example and make sure you can build and can see the LED blink. 

    It's recommended to use Visual Studio Code instead of Segger embeded Studio as the IDE. Please follow the instruction videos here.

    I tried again using west to compile and can see the partitions.yml generated correctly, so I don't know why the configuration in the overlay file was not used. You may want to edit the .dts file directly to add the configuration in the overlay file in. 

  • I am very familiar with the NCS NRF examples. I've tried setting up VSCode for ncs months ago, it had some weird errors so I gave up on it. I might give it another chance. I prefer working from shell though unless I really need to debug something. So SES is good enough in these ocassions. 

    I've tried building your example with the ncs v1.9.1, and it throws me following error:
    devicetree error: /chosen: undefined node label 'mx25r64'. 

    But I wasn't able to get zephyr samples to work on neither nrf9160dk or nrf52840dk, not even the hello world. I flash it, but logs never show up. Many examples in NCS behave this way, I have to edit prj.conf in order to get any log to work.

Related