PSoC Creator 4.3 project build avoidance problem

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

cross mob
MaPf_1293106
Level 2
Level 2
5 sign-ins 10 replies posted 5 replies posted

When building a large project localy in PSoC Creator, build avoidance seems not to be working. There are no code change but still many files get recompiled. Even when I only want to program several uCs it recompiles.

It even states that code generation step is up to date.

--------------- Build Started: 01/28/2021 17:03:16 Project: XYZ, Configuration: ARM GCC 5.4-2016-q2-update
The code generation step is up to date.
arm-none-eabi-gcc.exe -mcpu=cortex-m0 -mthumb -I. -IGenerated_Source\PSoC4 -Wa,-alh=.\CortexM0\ARM_GCC_541\Debug/scheduler.lst -g -D DEBUG -Wall -ffunction-sections -ffat-lto-objects -finline-functions -Og -DuC_PSOC4=1 -DuC_PSOC5=2 -DUSE_uC=uC_PSOC4 -c scheduler.c -o .\CortexM0\ARM_GCC_541\Debug\scheduler.o
...

All time stamps of all files are up to date (or not changed). Is it possible to get the reason why Creator wants to recompile?

0 Likes
1 Solution
MaPf_1293106
Level 2
Level 2
5 sign-ins 10 replies posted 5 replies posted

Solved the problem.

First, in each projects compiler output folder there is a ".dep" folder where the file "SOURCE_C__ARM_GCC_GENERIC.P" is generated. This was referencing files outside of the project but in the same workspace.

The workspace consists of 2 identical projects for 2 different MCUs. To select MCU specific content a compile switch is used, given as a compiler parameter (define). This way all include files are also shared without change.

Unfortunately, when calculating the dependencies this compile switch is not considered. This leads to "dependency problems" seen in "SOURCE_C__ARM_GCC_GENERIC.P" as files of both MCUs are taken.

Had to moved the compile switch from parameter to an include file per project which sets the right value in the project and then includes the original include file.

 

 

View solution in original post

0 Likes
5 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @MaPf_1293106

Can you please let me know if this issue is project-specific? If so, would it be possible for you to share the project here? 

Can you please confirm that you do not have a pre/post-build script running with the build process and also if Generated Source directory is modified by any means?

Please check this thread which is based on a similar issue and let me know if this helps - PSoC Creator 4.2 project build avoidance issue 

Thanks and Regards,
Rakshith M B
0 Likes
MaPf_1293106
Level 2
Level 2
5 sign-ins 10 replies posted 5 replies posted

Sorry, can't share the project. That's why I asked how to get the reason it wants to recompile.
Still, I will try to strip it down to be able to share.

I have some changes in generated files, fixing a bug in CAN driver which would be really nice if you could fix it:

void CAN_LS_ReceiveMsg(uint8 rxMailbox)
{
#if (CY_PSOC3 || CY_PSOC5)
if ((CAN_LS_RX[rxMailbox].rxcmd.byte[0u] & CAN_LS_RX_ACK_MSG) != 0u)
#else /* CY_PSOC4 */
if ((CAN_LS_RX_CMD_REG(rxMailbox) & CAN_LS_RX_ACK_MSG) != 0u)
#endif /* CY_PSOC3 || CY_PSOC5 */
{
/* `#START MESSAGE_BASIC_RECEIVED` */
CAN_LS_ReceiveMsg_Callback_fix( rxMailbox );
/* `#END` */

#ifdef CAN_LS_RECEIVE_MSG_CALLBACK
CAN_LS_ReceiveMsg_Callback(); /* <--- BUG: rxMailbox is missing */
#endif /* CAN_LS_RECEIVE_MSG_CALLBACK */

#if (CY_PSOC3 || CY_PSOC5)
CAN_LS_RX[rxMailbox].rxcmd.byte[0u] |= CAN_LS_RX_ACK_MSG;
#else /* CY_PSOC4 */
CAN_LS_RX_CMD_REG(rxMailbox) |= CAN_LS_RX_ACK_MSG;
#endif /* CY_PSOC3 || CY_PSOC5 */
}
}

But even deleting all generated files (without fixes) it again recompiles every time again.

The thread PSoC Creator 4.2 project build avoidance issue has no solution given for the problem, only how to avoid the problem in one specific case. 

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @MaPf_1293106

 Still, I will try to strip it down to be able to share.

Sure, that will be helpful. Meanwhile, I am trying to recreate the issue at my end.
Can you please let me know if the issue exists even if you use PSoC Creator 4.4? 

Also, do you use a bootloader in your project or is the project dependent on a library?

Thanks and Regards,
Rakshith M B
0 Likes
MaPf_1293106
Level 2
Level 2
5 sign-ins 10 replies posted 5 replies posted

Solved the problem.

First, in each projects compiler output folder there is a ".dep" folder where the file "SOURCE_C__ARM_GCC_GENERIC.P" is generated. This was referencing files outside of the project but in the same workspace.

The workspace consists of 2 identical projects for 2 different MCUs. To select MCU specific content a compile switch is used, given as a compiler parameter (define). This way all include files are also shared without change.

Unfortunately, when calculating the dependencies this compile switch is not considered. This leads to "dependency problems" seen in "SOURCE_C__ARM_GCC_GENERIC.P" as files of both MCUs are taken.

Had to moved the compile switch from parameter to an include file per project which sets the right value in the project and then includes the original include file.

 

 

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Glad your issue is resolved! Thank you very much for sharing this with the community 🙂 

Thanks and Regards,
Rakshith M B
0 Likes