AN56377 example question

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

cross mob
lock attach
Attachments are accessible only for community members.
rasec_2385561
Level 4
Level 4
First like received

I have been reading the application note AN56377. On page 46 it starts out an USB communications example. I built the design in Creator and updated the code in main.c . Basically the code does not build because its looking for an include file that it can't file (device.h). My assumption is that there is a problem with the build environment. SO it can't find the file. The messeges that I get are:

   

1. prj.M0121: can't open file 'device.h'                 main.c                  line 1        Project 1 USB...

   

2. prj.M0121: can't open file 'device.h'                 main.c                  line 2        Project 1 USB...

   

3. prj.M0120:Build error: missing ';' before 'USBFS_deviceAnddress'                 main.c                  line 17        Project 1 USB...

   

The file main.c is attached.

   

Any ideas about what is going on ?

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

Welcome in the forum.

   

Can you please post your complete project so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.

I have attached the archive zip file for the project. My latest errors relate to 'USBFS_Start': missing function-prototype

   

and the error: Build error: 'USBFS_DWR_VDDD_OPERATION': undefined identifier   .

   

Both seem to relate to missing header information.

   

Randy

0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

here is an example program with a pdf info file.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Your example program is from an old versions of PSoc Creator #include <device.h> and
#include <device.h> at the top of your main.c   have been moved to #include<project.h> it contains all the .h files. 

0 Likes
lock attach
Attachments are accessible only for community members.
rasec_2385561
Level 4
Level 4
First like received

I have attached the archive zip file for the project. My latest errors relate to 'USBFS_Start': missing function-prototype

   

and the error: Build error: 'USBFS_DWR_VDDD_OPERATION': undefined identifier   .

   

Both seem to relate to missing header information.

   

Randy

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

The name of your component is USBFS_1 (you left out the "_1").

   

 

   

Bob

0 Likes