Help migrating from NRF5 SDK to NRF Connect SDK

Hi, I have a fully functional software running on a NRF module. The application is built on a nrf5 sdk. I would like to migrate the entire application to NRF Connect SDK. Is there a document or anything from where i can get help to understand how this is done ? Can someone help me ?

Parents
  • We have a statement that we made comparing nRF5SDK and nRF Connect SDK. This gives a bird eye view of the difference you can see in these two SDKs. It is not possible to give you a 1-1 mapping of API of all functionalities as these SDK work on different fundamental concepts of one being baremetal and the other being RTOS based. You still have the nrfxlib in nRF Connect SDK which is comparable to what we had in the nRF5SDK apart from that most of the API is completely different and the amount of time you need to invest in it varies a lot on application to application and the experience of the team you have.

  • Okay. I understand. But is there any chance that any  of the old APIs or examples that was available in nrf5 was removed completely in NCS ?
    I used a the buttonless dfu in nrf5 (ble_app_buttonless_dfu )but I cannot find a similar example in NCS. Can you tell me is it stll available in a different name or if it is completely removed ? If it is available in NCS, could you tell me where I can get the code ?

  • I am using nrfjprog. But that one didnt work. So, i tried overriding the default with jlink and it seems to work fine.I wonder what i am doing wrong with nrfjprog. Am i missing some arguments ?

    Did you enable logs or see any logs to check if your application starts

    can you please tell me how to do this ? If i enable logging. where will i be able to see the logs? How can i see the logs ? Sorry if my questions are too dumb. I am new to this. Thanks for your patience.

  • There are number of ways you can have your serial logs streamed out of your device. Please check the Logging module in the system that you can use to configure using UART or RTT and listen through a serial terminal on the computer. 

    When you have enabled the logs correctly then just after reset, Zephyr will log some system information pretty early in the boot phase and you can know that atleast the firmware started running. If you expected more logs than what you see, then most likely there is some other unexpected behavior in your new firmware that you need to debug using a debugger.

  • Hi  ,

    I'm in a similar boat. If it is not too much trouble, can you share the steps involved for you to get your application working?

  • Hi  

    No problem. I will share my journey here. It is not easy but it is doable. I completed my project. I had to rewrite a major portion of code but here are a few tips.

    The first thing that I did was to find a sample application from the new SDK that best resembled the working of my intended application.

    My original application (built on the old SDK that I wanted to migrate) was a BLE application. So I found a BLE application included in the new SDK that worked almost the way I wanted my new application to work. In my case it was the BLE peripheral UART example. Once I got that working on my DK, I went through the sample code and the older SDK code, trying to compare and find similarities. I did find SOME similarities. Some kernel functions were obvious with their similar names.

    For other functions and system calls, visual studio helped me. With intellisense enabled, I could get some suggestions. Sometimes the suggestions were crap but sometimes i used to get a lead and googling it helped me find more about that or similar.

    The devzone also helped me considerably with my queries. They were super helpful. So use this forum to clear your doubts.

    These are the steps that worked for me. If you have any other questions, let me know and I will help you if I can.

    Good luck with your application.

  •  , thanks for your reply, and suggestions. Appreciate it.

    Earlier you mentioned:  "I used a the buttonless dfu in nrf5 (ble_app_buttonless_dfu ) but I cannot find a similar example in NCS"

    Is there a close cousin to 'ble_app_buttonless_dfu' in nrfConnect SDK? Or am I asking a question that is not applicable to the new SDK?

Reply Children
  • Hi , I ended up using MCUboot as my bootlloader and used OTA to update my firmware. That is essentially the same thing as DFU, or at least that is what I understood from reading the documentations.I cant remember if I saw a sample of that. But I think I just read the documentation and implemented the steps as told.

     Going through this page and it's child pages helped me gain a better understanding of the SMP service and the choices that I had. Those pages also talks about implementing that service. It is just a matter of few lines in prj.conf if I remember it right. What they dont mention in the pages,I believe, is that we have to download another android application (NRF Device manager) to use the SMP service (the BLE service that enables the OTA updates)

      please correct me if I am wrong here. I am just sharing what I understood and worked for me.

  •  Hi  , thanks again for kindly sharing the information.

    I plan to work with NRF52 series, and I find  NRF52 page useful

    This page also talks about FOTA updates, and plan to explore the info there..

    Hopefully   can share his thoughts as well

Related