Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Difficult to use nRF5x SDK from scratch!

Whose idea was it to make creating a new project from scratch so difficult (if not impossible)????

I have created numerous projects using the nRF5x, but have always used an example project as the starting point.  However, when I want to do something that is in 2 different example projects, I have had a lot of trouble combining them.  And starting from scratch is impossible.  I am using it with IAR.

Why:

1. Mainly because of the sdk_config.h.  Trying to figure out what to enable or disable is very difficult.  Just for the UART/UARTE there are numerous enables.  All the color stuff makes no sense.  I never was able to make use of colors.

2. In order to move a project to a different directory either requires the entire sdk be brought with it, or redefining 1000's of includes paths in IAR's preprocessor options.  This is ridiculous.

3. There are a bunch of Define Symbols in IAR that don't make sense.  Having to recreate this for a scratch project is ridiculous.

4. TI does the above also, and I stopped using their sdk.

5. I have worked with numerous large software development companies that have written nRF5x projects.  They have all used example projects to get started because they say they can't figure it out either.

The API docs are OK, allowing me to do an include and start using the sdk calls, they are OK.  But having to read 25 documents and take 3 classes to create a scratch built project enviroment is not acceptable.

Parents
  • As a experienced C++ developer, I can't stand myself using example project as starting point. Most SDK examples are not minimal, they use their higher level abstraction with app library. Many components uses app library. Final binary are bloated.

    Yes, you don't have to change your makefile even it is compiling unused component. The evil sdk_config look fine at first, but it limits you from every customization.  sdk_config is like a second build system inside GNU make.  It will change the compiled logic in the SDK and your program. A single line of change in sdk_config.h will cause complete rebuild of whole project.

     - "I think configurations can be quite useful when developing an application. It enables the developer to pick and choose specific features and libraries, and to configure the pins and parameters of a particluar peripheral (e.g. baudrate and CTS pin of the UART peripheral). I might be wrong, and it may exist other ways of doing it. Do you have any suggestions?"

    Pin configuration is okay, but we seldom use old project as starting point because they are too different. Sdk_config really has too many fatal drawback. And there indeed exists other solution, cmake. What should I turn on when enabling a UART? Which lines should I change when I want to use hfclk? The fastest way currently is googling instead of reading document...

    There are too many multi line macro of macro that I should rely on good InteliSense system. I found some macro even insert a new section in silence(NRF_SDH_BLE_OBSERVER). It's not suppose to be used twice (even the function is not called.)

    void BLE::services_init()
    {
        // ...
        NRF_SDH_BLE_OBSERVER(m_qwr_obs, NRF_BLE_QWR_BLE_OBSERVER_PRIO, nullptr, &m_qwr);
        
    }
    
    void BLE::services_init2_notcalled()
    {
        // ....
        NRF_SDH_BLE_OBSERVER(m_qwr_obs, NRF_BLE_QWR_BLE_OBSERVER_PRIO, nullptr, &m_qwr);
        
    }

    Writing a custom linker script is hard too. There are too many pre-defined symbol secretly used by SDK. I have two chips on my board. The bootloader example is pretty much useless too.

    At first glance, I think SoftDevice occupying my 0x0 address is rude. But the experience of using sdk is even worse. I'd rather it behave like SoftDevice, a standalone library.

  • Thank you for the feedback. I have forwarded this ticket internally and hopefully we can use the feedback from you and the others to improve the nRF5 SDK.

    Best regards,

    Simon

Reply Children
No Data
Related