cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

New Contributor II

Hi, currently trying to get a PSOC working for a class project, but am getting some vague errors when trying to build my project. I suspect it has something to do with my trying to import the queue header? I'm running PSOC creator 4.3. Project files attached below.

pastedImage_0.png

pastedImage_2.png

pastedImage_1.png

I appreciate the help!

0 Likes
Reply
1 Solution
Esteemed Contributor

Hi,

Before the last error message there was a line, saying queue.o: file not recognized...

000-message-log.JPG

But there was only "queue.h" and inside was not a "header" but a "C source".

So I separated them into queue.h and queue.c

And now the program is compile-able.

002-build-successful.JPG

moto

View solution in original post

5 Replies
Esteemed Contributor

Hi,

Before the last error message there was a line, saying queue.o: file not recognized...

000-message-log.JPG

But there was only "queue.h" and inside was not a "header" but a "C source".

So I separated them into queue.h and queue.c

And now the program is compile-able.

002-build-successful.JPG

moto

View solution in original post

New Contributor II

Ah, thank you! I didn't realize I had to have both .h and .c files present.

0 Likes
Reply
New Contributor II

One more question -- when I copied over just the modified files from your zip (main.c, queue.h, and queue.c) and pasted them in my project directory, the build still failed with the same error (even when I cleaned beforehand). I was only able to get a successful build after completely overwriting the entire project folder with the contents of your zip file. Is there a specific build option I should have been using or additional settings steps that I did not take which led to the failure?

0 Likes
Reply
Esteemed Contributor

Hi,

To be honest, even I was not expecting that the wrong style header file affects the project this much.

When I first saw your project, the queue.o generated from the queue.h wad over 5MB!

001-queu_o.JPG

I think that the wrong queue.h caused the data structure of the project something very bad.

So to fix your original Symphonius project, follow the steps below.

(1) In your project, from the Workspace Explorer, select queue.h and right-click > Remove From Symphonius

010-remove_q_h.JPG

(2) From Project > Clean Symphonius

011-clean.JPG

(3) In your Symphonius.cydsn folder, locate queue.h and physically move it to the Trash (remove the file)

012-queue_h.JPG

(4) From my project folder, select both queue.h and queue.c and copy them

013-copy_q_c_h.JPG

(5) To your project folder, paste them

014-copied.JPG

(6) From PSoC Creator, select Source Files and right-click "Add > Existing Item..."

      Then select "queue.c" first (This is very important)

015-add_c.JPG

(7) Select Header Files and right-click "Add > Existing Item..."

     Then select "queue.h"

016-add_h.JPG

(8) Now both queue.h and queue.c are imported to your project

018-both-added.JPG

(9) From Menu Clean and Build Symphonius

019-clean_rebuild.JPG

(10) Project was built OK.

020-built.JPG

moto

New Contributor II

Hi moto,

Thank you for the help. I was able to successfully build and program my PSOC!