Application fails with ""CMakeCCompilerId.c" failed" and ""CMakeCXXCompilerId.cpp" failed"

Hi,  

I am playing with the nRF5340 Audio Application and trying to read several mics and saving these audio files somewhere. There is an issue open for that hereWith the cues you gave I could read and listen to the read audio in the same board (some help from the Cirrus windows SW), so I created a new application based on some files from the audio app, namely hw_codec.c and .h, cs47l63_comm.c and .h and cs47l63_reg_conf.

The issues I am facing to build this new application are probably related only to my poor knowledge on the sdk, so I opened this new issue to understand these error I have. 

My first couple of errors came from functions within the headers I used, such as:

 

The workaround was including every c file in the project directory as targets and have all the referenced header directories included in the CMakeLists.txt file:

It does not look as the right way to do it, so this is my first question - what is the best way to show the compiler the referenced header files?

Nevertheless, I could fix the errors, but then I came to another one, for which I couldn't find any solution. I have an error that seems to be unrelated to my application:

This issue is similar but didn't solve my problem. So my second question is what do I do to solve this problem??

I'll attach my application folder.
Best regards!

SDK version: 2.6.0

Build target: nRF5340 Audio DK

OS: MacOS Sonoma 14.1.2

microphone_read.zip

Parents
  • Hi,

    My first couple of errors came from functions within the headers I used, such as:

    Can you provide build command and full log?

    It does not look as the right way to do it, so this is my first question - what is the best way to show the compiler the referenced header files?

    I do not think there is the best way, but there are some options. There are several discussions which mention this - including header files from directory into cmakeadding include directories into cmake and cmake - including h files from other directories. For additional information, you could look at cmake tutorial and importing and exporting guide.

    This issue is similar but didn't solve my problem. So my second question is what do I do to solve this problem??

    Mentioned issue was due to corrupt Python installation. What have you tried so far and what were the results?

    Best regards,
    Dejan

  • Dejan,

    My build command was a pristine in VSCode Extension. The full log is:

    Besides the links you sent, I also found this video from Circuit Dojo on which he teaches how Zephyr finds the drives files when interfacing a sensor with the API. Telling it where to look as I am trying here is basically the same thing without the kconfig files.

    Most of my trials were around the make files, changing the command that shows the related files. Except when I simply can't show the compiler the files I need, I have this same error in the log I sent.

  • Hi,

     You could have a look at the troubleshooting steps for devicetree error undefined reference to __device_dts_ord_<N> in the Zephyr documentation.

    EDIT: You can find this answer: "The undefined reference to __device... is a generic problem that happens if you try to get a device pointer from a devicetree node if no such device exists." in this reported Zephyr issue.

    Best regards,
    Dejan

  • Hi, Dejans, 

    Thanks for the reply.

    I'll take my time to study this and also walk through my code again, so I'll close it here and try to get you a more structured question, if needed. 

    Best regards,
    João.

Reply
  • Hi, Dejans, 

    Thanks for the reply.

    I'll take my time to study this and also walk through my code again, so I'll close it here and try to get you a more structured question, if needed. 

    Best regards,
    João.

Children
No Data