Simplke Task, Feeling Stupid

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

cross mob
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The project -

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes