cancel
Showing results for 
Search instead for 
Did you mean: 

How is the #include"../Components/cs43l22/cs43l22.h" linked to the required header and it's corresponding files?

SWall.2
Associate II

0693W000006EitbQAC.pngI am having dificulty getting the example software for the audio recorder for STM32L476VG DISCO controller to run. I have come across an error for the #include"cs43l22.h" header file in the STM32CubeIDE.

The only way I can clear the error is reduce the code in the example software from ../Components/cs43l22/cs43l22.h to #include"cs43l22.h".

I understand this is probibly the wrong thing to do and was wondering if anyone could explain to me how the ../Components/cs43l22/cs43l22.h works and the correct work around to get the code to work error free?

Is the hearder file link included above to link the cs43l22.h header file to its corresponding cs43l22.c source code file to allow the headphine system to operate?

2 REPLIES 2
TDK
Guru

Generally, speaking, the compiler needs to be able to find the header file, so the path needs to be valid from one of your include directories.

Project properties -> C/C++ Build -> Settings -> Tool Settings -> MCU GCC Compiler -> Include Paths

If you feel a post has answered your question, please click "Accept as Solution".
SWall.2
Associate II

That's really helpful, thanks.Does the firmware package need to be imported to the IDE for the program to find the header file?

If not how much of the link is required to be typed in to allow the IDE to find the header file on a PC?