severe library problems when trying to use standard code

I am very new to Bluetooth and nRF. However, as i am trying to learn and work on a prototype i can't even get the basic sample codes to run. One of two big problems I'm having is that I'm missing what seems to be all Zephyr/Bluetooth libraries. For example, I'm missing the following from trying to run the Bluetooth peripheral example. 

#include <zephyr/sys/printk.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/zephyr.h>
#include <zephyr/types.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/uuid.h>
#include <zephyr/bluetooth/gatt.h>
#include <zephyr/bluetooth/services/bas.h>
#include <zephyr/bluetooth/services/hrs.h>
every single one comes back with the error "cannot open source file"
My other problem is that even if I break it down to the point of basic c code allowing a button to turn on and off LED1 when i go to build it I get this error
FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\v2.1.2\opt\bin\cmake.EXE
along with whatever specific path file to my c file.
to be clear I followed the video tutorial exactly, I then installed cmake through there tutorial. It seems to me that in the installation video then i followed exactly (twice after a reinstall) these libraries came up fine but mine are immediately underline with red. and the cmake fatal error i cant find anything related to this from other forums. 
Please help! and than you i have the boardnRF52840-DK
  • Hi Walker,

    Could you try uninstalling and re-installing both the nrf-connect for desktop as well and the command line tools.? Also, please do try if any of the samples build on ay of the previous versions of the SDK as well as on the nrf52840 SoC (nrf52840_nrf52840).

    Regards,

    Swathy

  • OK so i Reinstalled making it the 3rd time I've downloaded and set everything up and immediately as i finish and open up the basic HelloWorld file once again i do not have the libraries. 

    #include errors detected based on information provided by the configurationProvider setting. Squiggles are disabled for this translation unit (C:\ncs\Mycodes\hello_world\src\main.c).

    cannot open source file "syscall_list.h" (dependency of "C:\ncs\Mycodes\hello_world\zephyr\kernel.h")

    zephyr/kernel.h: No such file or directory

    Invalid type definition: Cannot set properties of null (setting 'name')

    all of these errors from fresh install haven't even tried to build it. It prob wont let me anyways.

  • I tried the build same fatal cmake error as above. I am using the  nrf52840

  • Hi Walker,

    Issue with error squiggles can be resolved by just disabling it.  Also, I suppose you are using VS Code now from the last reply.. The output log that you shared previously doesn't have these errors mentioned by you.. Could you share the new output log.? Could you verify if you are opening VS code and the command prompt directly form the Toolchain manager.?

    Regards,

    Swathy

  • I said I was using VSC in the first post considering the fact I'm using the Nordic video tutorial. I would think that would be obvious. The output log is for the hello world it's the same error because I don't have libraries. The Cmake fatal error is when I build it. They are different logs both happen. I have no command prompt open. I always open VS through your toolchain

Related