This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Old Examples vs. New Examples -- SDK7 vs. Recent SDKs

Hi,

I own company that builds a PIC 8-bit devices, and can code at a low bit level in the PIC environment.

I picked up the NRF52 Dev board, and am trying to learn the ARM environment and the Nordic SDK. I overall get the SDK functions, but I don't understand the SDK file structure and how this is all built together in KEIL when you open a project.

When I look at old examples from NORDIC:

github.com/.../main.c

That example I get, there is a header (nordic.h) that defines the registers, and then you can inclue other libraries in your project for the functions you need. It basically is like coding a PIC in C.

What changed from SDK 7 to SDK 8, in all of the example files the nrf.h headers and linkage all got removed. I don't understand how the headers come together now in the more recent SDKs and how a defeault KEIL project is put together.

When I open the sample blinky project in KEIL, with the most recent turn of the SDK. It opens a bunch of packs and if you go to the main.c there are like a million dependent files and libraries in the whole project. What happened: SDK 7, has a few includes, and a main.c...? Why did the SDK get more complicated? I'm missing something.

Like the new blinky example, yes it blinks a light, but it is configured in such modularized way you have to look at board.h and all kinds of other library files just to figure out the most basic of commands (ie. setting a pin as an ouput)

If you create a project for the NRF52 dev board, does KEIL just pulling in all the libraries and headers, and then you can call whatever you want, and then when it compiles it only pulls in what you need?

I am just missing something how the NORDIC SDK is structured to build out the software. What has changed from the old examples to the new examples?

Thanks, -Tim

Parents
  • Hi Tim,

    With the introduction of Pack system by Keil, we started integrated that in our SDK from SDK v7.0.

    "KEIL just pulling in all the libraries and headers, and then you can call whatever you want, and then when it compiles it only pulls in what you need?" => This is actually how Packs work :)

    However, that caused quite some issues and troubles and some of them are out of our control. You can read more ab it here.

    From SDKv11 we deprecated the use of pack and avoid the dependency on it as much as possible.

    My suggestion is to use the latest SDK, which is v12. In that SDK the only Pack packages needed are CMSIS and nRF_DeviceFamilyPack (Nordic headers).

    You will find the header files, such as nrf.h, nrf51.h, nrf52.h, etc under the device family pack folder C:\Keil_v5\ARM\Pack\NordicSemiconductor\nRF_DeviceFamilyPack\8.9.0\Device\Include.

    The blinky project should be simplified as only main.c file and the header files are needed.

Reply
  • Hi Tim,

    With the introduction of Pack system by Keil, we started integrated that in our SDK from SDK v7.0.

    "KEIL just pulling in all the libraries and headers, and then you can call whatever you want, and then when it compiles it only pulls in what you need?" => This is actually how Packs work :)

    However, that caused quite some issues and troubles and some of them are out of our control. You can read more ab it here.

    From SDKv11 we deprecated the use of pack and avoid the dependency on it as much as possible.

    My suggestion is to use the latest SDK, which is v12. In that SDK the only Pack packages needed are CMSIS and nRF_DeviceFamilyPack (Nordic headers).

    You will find the header files, such as nrf.h, nrf51.h, nrf52.h, etc under the device family pack folder C:\Keil_v5\ARM\Pack\NordicSemiconductor\nRF_DeviceFamilyPack\8.9.0\Device\Include.

    The blinky project should be simplified as only main.c file and the header files are needed.

Children
No Data
Related