Announcements
IMPORTANT: Cypress Developer Community currently doesn’t allow sign-in to prepare for the upcoming transition. To learn more, check out our announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ Creator & Designer

ETRO_SSN583
Esteemed Contributor

I am trying to add Avagadro's tinyprintf  librarey to a PSOC 4 design.

   

So I take following steps -

   

 

   

1) Project directory, add a folder, "User Code"

   

2) Linker and compiler search directorys, add the above directory

   

3) In the folder place the 2 key files, printf.c and printf.h

   

4) Clean and build , and I get error

   

 

   

C:\Users\Nerdsrus\Documents\PSOC Creator Projects\Jim Dad Pioneer LCD Display\Jim Dad Pioneer LCD Display.cydsn/.\main.c:41: undefined reference to `tfp_sprintf'

   


collect2.exe: error: ld returned 1 exit status

   


The command 'arm-none-eabi-gcc.exe' failed with exit code '1'

   

 

   

tfp_sprintf' is a function in the .h and..c files, tool essentially says it can't find it.

   

 

   

Am I doing this right, eg. to generally add not a componernt but just .c and .h files ?

   

 

   

Regards, Dana.

0 Likes
7 Replies
ETRO_SSN583
Esteemed Contributor

The project -

0 Likes
Bob_Marlowe
Expert II

The .\Usercode directory was not included into the workspace bundle, so I think that the files have not been recognized as belonging to the project. Is the result the same when you skip creating the directory and put the filesy into the "Header Files" and "Source Files" folders (which aren't true directories).

   

 

   

Bob

0 Likes
ETRO_SSN583
Esteemed Contributor

Pretty strange. I tired your idea, placing code once in codetemp, another time in

   

Generated Source, neither worked. These folders always regnerated.

   

 

   

So then I righyt clicked top level of project, added componet item, picked empty .h file,

   

then .c file, pasted code into them, then renamed them so the auto generated file name was

   

overidden. That did not work.

   

 

   

How difficult can it be to add anotehr c and h file ? Like crayons and paper, should be

   

impossible to screw up......gaaaaah

   

 

   

Regards, Dana.

   

 

   

0 Likes
ETRO_SSN583
Esteemed Contributor

Here is explorer view of p[orject space, attached.

0 Likes
ETRO_SSN583
Esteemed Contributor

I found the problem, one uses the Source tab and does an "add"

   

from there to create either a new empty file or add an existing file.

   

 

   

With an IQ < 5 my survival is in question.

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Expert II

That is not a matter of IQ, it is a matter of beeing used to "Intuitive Designed Software" which leads to the question whether the software was designed inuitively or the software's design assumed to be an intuively one...

   

 

   

Feeling with you...

   

Bob

0 Likes
Bob_Marlowe
Expert II

...probably it is "intuitively" , I always have troubles with words having more than 4 vocals, heavy attack of dyslexica

0 Likes