Problems with Exercise 1 , Lesson 5 of the DevAcademy "nRF Connect SDK fundamentals" course

Good day,

I did follow the usual steps of this an exercise, namely:

1. I did download the base exercise project contained in the zip file: fund_less5_exer1.zip (I attach a copy of this file)

2. I did extract this zip file in my exercise folder that I use with this course.

3. I followed all the steps 1 to 9.3 of this exercise but I was unable to build  the application.

The following 5 errors related to the #include statements in lines 4,5,6,7 and 10 in the src/main.c file were listed, as shown in the attached file: "Errors_10-July-2022"

line 4: #include <zephyr.h>

line5: #include <device.h>

line6: #include <devicetree.h>

line7: #include # <drivers/gpio.h>

line 10: #include <drivers/uart.h>

Upon investigation I noticed that line 3 in the CMakeLists.txt file for this exercise differs from a similar line in the CMakeLists.txt file in the previous exercises of this course, as far as the "cmake_minimum_required" is concerned.

For Lesson5_Exercise1 the line 3 of CMakeLists.txt file reads: cmake_minimum_required(VERSION 3.20.0) while for the previous exercises line 3 of the CMakeLists.txt file reads: cmake_minimum_required(VERSION 3.13.1).

Could this be the root of the problem?  If so, how to rectify it?

Regards,

JM

fund_less5_exer1.zip file

fund_less5_exer1.zip

Errors_10-July-2022

Errors_10-July-2022.docx

I am using:

nRF9160DK v1.0.1

Windows 10 Pro, version 21H2, OS build 19044.1766

nRF Connect for Desktop v.3.11.1

Toolchain Manager v.1.1.3

nRF Connect SDK v.1.8.0 with the VS Code

  • Hello,

    It's not because of the Cmake file. It seems error is from  the  main source file (main.c). The screenshot you shared doesn't look like an updated main file as the exercise says. I am attaching the files for your reference.

    fund5_less5_UART.zip

  • Hello,

    As advised, I extracted the zip file: fund5_less5_UART.zip in the directory myapps\fund5_less5_UART and then, from the VS Code, I used the option "Add an existing application", to add this application folder to my current workspace.

    I then clicked on the main.c file, located in the Explorer under: fund5_less5_UART>src>main.c and I immediately saw the first 28 lines of code of the main.c file, with 7 problems (related to #Include statements in lines 4 to 11 of the main.c file) listed at the bottom of the page.   I attach a screenshot that shows these problems/errors listed at the bottom of the page,

    These are similar problems that I observed while trying to build the application using the files that I extracted from the fund_less5_exer1.zip file that I attached to my last message to you.

    What else could be a problem?

    JM

    Screenshot with problems/errors

    Errors_11-July-2022.docx

  • Hello,

    The screenshot you shared in the last reply says that it's a "squiggle error" which you can rectify by:

     Clicking on that error and press the enable squiggles option, OR if this doesn't work,

    1. Press Ctrl+ (comma) which will take you to the settings page.

    2. type in "error squiggles" in the search bar.

    3. There are 2 sections in this - User, Workspace.

    In the User section, under 'Error Squiggles' , select " EnabledIfIncludesResolve "

    In the Workspace section, under 'Error Squiggles' , select " Disabled".

    I would like to know whether you are able to see this error after compilation because mostly it disappears. The files I shared in the last reply was tested, so hopefully it will work.

    Kind Regards,

    Abhijith

  • Hello,

    I did rightclick on that error line and I pressed the enable squiggles button, enabling it. In response I saw additional errors added to the list of existing errors, as shown on the attached screenshot entitled: Screenshot_12-July-2022.

    I then tried to build the application but after a while, the build process stopped with 33 problems listed as shown on the attached screenshot entitled: "Build stopped due to Fatal Error", followed by the message: "ninja: build stopped: subcommand failed. Fatal Error".

    Regards,

    JM

    Screenshot_12-July-2022

    Screenshot_12-July-2022.docx

    Build stopped due to Fatal Error

    Build stopped due to Fatal Error 12-July 2022.docx

  • Hello, 

    Further to the activities described in my previous message that I sent about 25 min ago, I have also followed these steps, as suggested by you:

    1. Press Ctrl+ (comma) which will take you to the settings page.

    2. type in "error squiggles" in the search bar.

    3. There are 2 sections in this - User, Workspace.

    In the User section, under 'Error Squiggles' , select " EnabledIfIncludesResolve "

    In the Workspace section, under 'Error Squiggles' , select " Disabled".

    However, when I tied to build an application , the same error message "ninja: build stopped: subcommand failed. Fatal Error."  appeared again , as shown in the attached screenshot entitled: "Build stopped again due to Fatal Error 12-July-2022-PM".

    Regards,

    JM

    Build stopped again due to Fatal Error

    Buid stopped again due to Fatal Error 12-July-2022-PM.docx

Related