Problem in the hour to add files in my project

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.
RoFr_4201436
Level 3
Level 3
50 sign-ins 25 sign-ins 10 replies posted

Hello everyone, i am with a problem in the hour to add some files in my project. For examplo: I wanna add the file "bcc425UART.c" and "bcc425UART.h" in my project, but when i build my problem, appear this error:

pastedImage_0.png

Someone help me!

I ll leave the attachment of my project here!

Kind Regards

Rodrigo Franco

0 Likes
1 Solution
NoriTan
Employee
Employee
25 sign-ins 5 questions asked 10 sign-ins

It seems that you put the source/header file at the Workspace folder like following.

GS004109.png

Because the project does not include this folder as the search path, PSoC Creator cannot find these files.

Solution 1: Move the files to the project folder

Move these files to the project folder as follows.GS004110.png

After moving these files, PSoC Creator will miss these files.

GS004111.png

  Please delete these files at the "Workspace Explorer" and Add these files with a new location.

Solution 2: Add a folder to the include path.

Additional search paths can be set.  Please select the Menu bar Project>Build Settings... to open following Build Settings dialogue.

GS004112.png

There is a field named "Additional Include Directories" to specify additional paths.  Just type two periods in the text field and click OK button.  PSoC Creator can find these files.

Regards,

Noriaki

View solution in original post

0 Likes
2 Replies
NoriTan
Employee
Employee
25 sign-ins 5 questions asked 10 sign-ins

It seems that you put the source/header file at the Workspace folder like following.

GS004109.png

Because the project does not include this folder as the search path, PSoC Creator cannot find these files.

Solution 1: Move the files to the project folder

Move these files to the project folder as follows.GS004110.png

After moving these files, PSoC Creator will miss these files.

GS004111.png

  Please delete these files at the "Workspace Explorer" and Add these files with a new location.

Solution 2: Add a folder to the include path.

Additional search paths can be set.  Please select the Menu bar Project>Build Settings... to open following Build Settings dialogue.

GS004112.png

There is a field named "Additional Include Directories" to specify additional paths.  Just type two periods in the text field and click OK button.  PSoC Creator can find these files.

Regards,

Noriaki

0 Likes
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I took a slightly different approach,

I removed bcc425UART.c and bcc425UART.h from the project,

then moved these to files to the folder where main.c resides.

And added them as "Add > Existing Item... "

files.JPG

Then when I tried to build the project, I got following errors

additional_errors.BMP

So I modified CY_ISR(UARTRxInt)  as below

======================

CY_ISR(UARTRxInt) // rotira de interrupcao

{

    // copia os dados do buffer interno da UART para o buffer RxBuffer

//    while(UART_ReadRxStatus() & UART_RX_STS_FIFO_NOTEMPTY)

    while(UART_SpiUartGetRxBufferSize())

    {

          RxBuffer[RxWriteIndex] = UART_UartGetByte(); // retorna o proximo byte do buffer interno da porta serial

          RxWriteIndex++;

      

            // faz o buffer ser circular

        if(RxWriteIndex>=RxBufferSize)

            RxWriteIndex = 0;

    }

}

======================

And the project is now compile-able.

Note: As I don't have the board, I have not tested if it works or not, though.

moto

0 Likes