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
  • I agree the SDK examples are bloated.  There are often layers of abstraction that are completely unnecessary.  My team has based several aspects on example code only to spend exorbitant amounts of time after we truly understand how it works to write the code more simply.  As a question to it seems as if you have figure out how to setup a project from scratch.  Could you point me in the direction of th 25 documents and 3 classes?

Reply
  • I agree the SDK examples are bloated.  There are often layers of abstraction that are completely unnecessary.  My team has based several aspects on example code only to spend exorbitant amounts of time after we truly understand how it works to write the code more simply.  As a question to it seems as if you have figure out how to setup a project from scratch.  Could you point me in the direction of th 25 documents and 3 classes?

Children
  • I have only been able to do 1 simple one.  I tried a complex one and gave up.

    The only hints I can give are that the examples use an abbreviated sdk_config.h file.  Using that wil not allow you to select peripherals that are not used in the example.  However, there a full generic sdk_config.h for each chip under config/nrf52832/config. (pick the appropriate processor).  That is suppose to have all the peripherals in it.  You go in and enable periphs. (There is a java tool in external_tools/cmsisconfig/CMSIS_Configurations_Wizard.jar that helps a little.  But you still need to know the names of the various thing you are enabling.  (Not always easy)  Also, the full generic config seems to lack certain things in the example configs.  So when I tried to use the full config for an example project, I still could not get it going sometimes. 

    I edited the include path list in IAR->Options->preprocessor.  But it takes a long time, and that assumes you understand all the includes needed for what you are doing.

    Hope that helps, but I am still wandering in the wilderness too.

Related