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

Getting started is not sufficient to get me started with nRF52840-DK

I received my nRF52840-DK (PCA10056) last week and today I was given the task to get started.

I started setup my environment with my preferred choice: Arduino IDE.
Unfortunately I could not get it to work, and some forums on the internet suggest not to use Arduino IDE because it's not officially supported.

The next choice I took is Segger Embedded Studio.
It was easy to follow and install the Nordic package.
Eventually I found out it's really easy to upload an example, as written here:
https://infocenter.nordicsemi.com/pdf/getting_started_ses.pdf

Now I want to start to develop my own programs, but I'm completely lost where to begin.
I could not find any tutorial that gets me started with the basics.

I thought the following website was a good start:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf52840_dk%2FUG%2Fcommon%2Fnordic_tools.html&anchor=nordic_tools

Or:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_gsg_ses%2FUG%2Fgsg%2Fintro.html

But there is never actual content how to actually start programming.

I also tried to "reverse engineer" the examples to figure out the relation between the source files:
~/Downloads/software/nRF5_SDK/nRF5_SDK_15.3.0_59ac345/examples/peripheral/blinky

If I copy main.c from blinky to a blank project in SES, I get the following error:
no such file or directory nrf_delay.h

Is some path variable not updated? Do I need to manually add the .h files to my project?
How can I import my project from Arduino IDE to SES?
How can I communicate via serial interface?

I also noticed that blinky had a lot of external include files. Are these all necessary?

Parents Reply
  • No, I don't want to use BLE Mesh.

    I want to use Serial.println, digitalwrite, analogread, softwareserial, wire and flash.read

    I already looked at devzone, infocenter and the official website. They do not provide the answers I seek.

    I already watched all the educational videos. The only comment I have: the file sdk_config.h does not exist.

    I don't understand what you mean with github repositories? I need to understand how to start my own project, not opening examples that just work and are missing extra libraries.

Children
  • I understand. 

    I'm afraid that we don't have any beginner guides on C programming, if that is what you are looking for.
    Most of the guides we have is about getting started with our nRF5 SDK and the development tools that we provide. 

    I really wouldn't suggest starting a fresh, blank project. It would require quite some work to include all the necessary files, libraries, pre-processor definitions and headers, especially if you don't have much prior experience with our SDK.

    I suggest that you find the project that is closest to what you are trying to achieve for your project, and then add or remove functionality from that. 
    Otherwise we have the ble_app_template project which is a good template project to start out with. 

    If I copy main.c from blinky to a blank project in SES, I get the following error

     This is to be expected. If you copy the main file to a blank project, the blank project won't have all the .c files, .h files, defines or settings that the project makes use of. 
    How to add files and libraries to your project is explained the Youtube-videos about SES that I linked to in my previous answer. 

    ephimee said:
    I want to use Serial.println, digitalwrite, analogread, softwareserial, wire and flash.read

     I haven't worked much with Arduino, so I can't really say if this is examples or functions that you are referring to. I don't know any specifics about them so I can't say for sure what that could relate to in our SDK. 

    I suggest you take a look at the examples we have in our SDK to find what would match your requirements the best. 

    ephimee said:
    I already watched all the educational videos. The only comment I have: the file sdk_config.h does not exist.

     The sdk_config.h file is included in most of the examples in the nRF5 SDK. 
    I.e. For the template example, you can find the sdk_config.h file in the following folder: 
    nRF5_SDK\examples\ble_peripheral\ble_app_template\pca10040\s132\config

    Opening the SES project, the sdk_config.h file should be available in the application folder in the project explorer (ref. attached image below): 

    If you have further questions, please let me know. 
    Best regards, 
    Joakim

  • No, I'm not looking for a C programming course.

    In the meantime I managed to figure out how libraries work in SES and I was able to include some additional libraries. I found the information here:

    https://devzone.nordicsemi.com/f/nordic-q-a/30904/how-to-add-library-to-a-sdk-example-in-segger-embedded-studio

    I looked at the .h files to find the functions that are available.
    In this way I was able to merge several examples and make them work.

    When I get an error that sdk_config.h is missing, I just create an empty file and it works fine. You are right,  the file is included in some examples, but not all.

    In short what I want to state is that it's pretty difficult to get started in SES. Compared with Arduino IDE, Arduino IDE is much easier.
    I would also suggest to make a video about how to include libraries and how to make blinky from scratch.
    What I'm also missing is some instruction videos attaching sensors/actuators to the nRF and make them work.

  • Ok, then it sounds like you've managed to get started. 

    I'll forward the feedback internally so that we can consider the suggestions for new tutorials in the future. 

    You are welcome to post a new ticket if you have further questions. My colleagues and I will do our best to help you. 

    Best regards

Related