Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I wanted to add the TMC2130Stepper library to my project, and I followed these tutorials to do so:

http://www.cypress.com/video-library/PSoC/psoc-creator-tutorial-creating-library-project/107976

http://www.cypress.com/video-library/PSoC/psoc-creator-tutorial-adding-library-dependency/107961

When I made my main project, ADC_Tester, dependent upon the library project, I checked both the Component and the Code options...however, I only need it to be dependent on the Code, because I have the SPI_Master component setup such that it handles all the data control to the TMC2130 (all I need are output pins for the SPI lines and Direction, Step, Enable (digital output.))  So, I haven't (yet?) made a custom component for the project library seeing as I don't think I need it.

When I Build the Application, I find that I am unable to #include the library. The following error shows up: " 'TMC2130Stepper.h' file not found. Try building the project to generate the missing file or update the project's code dependencies."  I triple-checked the file path to be sure it's located in the same Project folder as ADC_Tester.

No idea what to do from here, any suggestions would be of great service.

-Anthony

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

I believe that including third-party library code has nothing to do with Cypress library installation, described in the video. To include third-party library code (e.g. myLib) you typically need myLib.h and myLib.c filed added to the project, and #include <myLib.h> header in the main *.c file. Just select myLib.h file and copy it into clipboard (Ctrl-C), then select 'Header files' in the project explorer and paste it there (Ctrl-V). Do same for the myLib.c file in 'Source code' folder. Add header  #include <myLib.h> and that should be it.

/odissey1

View solution in original post

0 Likes
2 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

I believe that including third-party library code has nothing to do with Cypress library installation, described in the video. To include third-party library code (e.g. myLib) you typically need myLib.h and myLib.c filed added to the project, and #include <myLib.h> header in the main *.c file. Just select myLib.h file and copy it into clipboard (Ctrl-C), then select 'Header files' in the project explorer and paste it there (Ctrl-V). Do same for the myLib.c file in 'Source code' folder. Add header  #include <myLib.h> and that should be it.

/odissey1

0 Likes
Anonymous
Not applicable

Awesome, that helped immensely! 'Tis a shame I didn't think of that myself, but..better I know then not know.

0 Likes