Presently I am working on nRF52840, now I would like to use nRF5340 for that will the same Zephyr RTOS code works, if the build configurations of nRF52 code alone is changed or else should I have to create it from the scratch.
Presently I am working on nRF52840, now I would like to use nRF5340 for that will the same Zephyr RTOS code works, if the build configurations of nRF52 code alone is changed or else should I have to create it from the scratch.
Hi,
As a general rule, with nRF Connect SDK, an application made for one nRF device is easily ported to a different nRF device, as long as the new device supports what is used by the application. Typically it should be a question of configuration and board files, and the main part of your project would remain the same. You will for instance find that most SDK samples are supported by both nRF52 and nRF53 boards, such as for instance the Bluetooth: Central and Peripheral HRS sample.
There might be situations where drivers or libraries are not (yet) available for a new device, such as was the case for the nRF53 with regards to radio protocols such as Bluetooth, Thread and Zigbee in the early stages. Those are now fully supported also on the nRF53 series.
Regards,
Terje
Another question for me, if I created it using nRF5 SDK in SES and trying to change that code to Zephyr RTOS where I have included so many library files, will I have to modify those library files as well to work with Zephyr RTOS are else can I use the same(If modifications needed, will it be simpler modifications are else I have to build it again from scratch)
Hi,
I'm afraid there is no simple migration path from nRF5 SDK to nRF Connect SDK, since the former is closer to bare metal and the latter builds on an RTOS. Depending on your actual code, libraries, modules, etc., the required changes may be large or small, but you must definitely do some work to adapt it to the new platform. I would start a new project in nRF Connect SDK, and reimplement what you had in nRF5 SDK, but with heavy use of the nRF5 SDK project for reference.
For libraries it all depends on the libraries, some of it maybe you can use direclty or almost direclty, while other things may require rewrites or wrappers. For instance, in nRF Connect SDK most of the hardware drivers are the old peripheral libraries from nRF5 SDK with a wrapper layer for working with the Zephyr driver system.
Regards,
Terje