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

Create a new project in Segger Embedded Stuido

Hello.

Actually I have two qustions, but they are related with the same challenge.

So, I want to develop application using SDK (libararies and config), but starting from empty project. To create empty buildable project for nRF52DK I need to include a lot of necessery files, such as sdk_config.h, boards.c ... etc. So, can you give list of all files, which I need to include in project, to be able to correctly build it, and also which configuration I need to do? For example what I need to do to create project the same as examples/peripheral/template_project?

I also want to know, how to change folder of existing project? For example if I change directory of template_project from examples, how can I repair links to necessery files?

Parents
  • One of the biggest issue of nRF SDK is the "include searching path". They are really messy. I think Nordic need to re-organize the directory structure and the syntax used while including a header file. I have few suggestions for Nordic:

    (1) Use sub-directory name in the #include syntax. Sometimes it is better to use "#include <dirA/module.h>" instead of "#include <module.h>" and add full path of dirA to the include-searching path.

    (2) For each component in the components directory, there is no need to create so many sub-directories. Take "components/ble" for example, there are totally 12 subdirectories there. So, we probably need to add 12 paths in the searching path. A better way is to simplify the structure such as putting most of the .c and .h files directly under components/ble/ instead of components/ble/xxxx/. For the ble_services folder, sure, we can keep it.

    The above two rules can be applied to the whole nRF5 SDK. If Nordic can do this for the next SDK release then your issue will be gone.

    Btw, do you notice that sdk_config.h is getting bigger and bigger (12,954 lines so far). This is definitely not a good thing for software engineering.

    Robert.

  • Hey Robert,

    I fully agree with point (1), but I have to disagree with point (2), by putting all the modules in a single folder we loose the architectural oversight inherent in the current SDK folder structure and the accompanying SDK API documentation. 

    sdk_config.h is huge and growing, that's why the CMSIS Configuration Wizard is necessary. 

    Cheers,

    Håkon.

  • Hi Haakonsh,

    Thanks for your comment. My intention is to reduce the number of folders by merging some sub-directories, not to put "all" modules in a single folder. That would make every one crazy if all files are in a single folder.

  • This really is an IDE problem and not a SDK folder structure problem. Automated search paths for header files should have been a solved problem by now, IDE development for embedded systems is lagging years behind the rest of the SW world. 

    I am as annoyed as you are whenever is have to manually input paths of a newly added driver or library, let alone starting a project from scratch. 


    It would be nice if the IDEs search path was fully recursive from the SDK root folder. 

    As Robert suggests a "New Project Wizard" is a good idea, but its a lot of work when we have to support Keil, IAR, SES, and every other GCC/CLANG based IDE. 

    I will forward your requests to the SDK team, maybe we can influence the architecture of our next major SDK release, next year. 

  • Hey Haakonsh,

    Any update on if the "New Project Wizard" is in the works? Creating new projects still haunt me.

  • Not that I've heard. Most of the focus of our work with SES is on functionality with the future nRF Connect SDKs. 

    To be quite frank, I will always base my new projects on existing example projects. 

Reply Children
No Data
Related