How to speed up build time?

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

cross mob
NeAl_2298636
Level 3
Level 3
First like received First like given

Hi,

My project is building for more than 5 minutes. I think its because PSoC Creator is compiling everyfile even if I make a small change. Is it possible to speed this up?

Best,

Nico

1 Solution

NeAl,

It is my understanding that the PSoC Creator performs Incremental Builds by default.  There doesn't appear to be a Build Setting to choose "Full" or "Incremental" builds for a project.

You can force a full rebuild of your project, by selecting "Clean <projectname>" then "Build <projectname>" or "Clean and Build <projectname>".  A "Build <projectname>" will only compile changed modules.  Note:  Changing a shared header file will force a recompile of .c files that use it.

Len

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

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

Hi NeAl_2298636​,

Can you please let me know if you are doing a Clean and Build or just Build?

Is it possible for you to share your project so that we can test it out?

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes

Hi Rakshith,

I click Build. It's not generating source files from schematic. Even if I make a small change in one file, it compiles all project files from scratch again and I have a lot of files. I use Qt for unit testing and it builds the same project under 10 seconds.

I can't share project unfortunately, it is company project.

I had such a problem when the project was on a USB flash drive

lock attach
Attachments are accessible only for community members.
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Nico,

As you said, you can't share the project.  However,  you should be able to share the build sequence output.

To do so, execute the "Build".  The build results (including start and stop times)  are in the "Output" window.  Copy the text results from this window into NotePad and save it to a file.

There might be some clues as to why this is taking so long.

I've attached a build output for one of my projects as an example.  I told it to rebuild the entire project and it only took about 1 minute.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Thanks for the reply.

I am sorry but I also cannot share the build output.

My project builds in Qt in 4 seconds. In PSoC creator it takes 4 minutes. First build in Qt also takes 4 minutes. I am playing with the build settings to find out if there is a way to disable the operation of compiling files that are already compiled and unchanged.

I see that even if I make a small change in one file, all files are compiled regardless of their dependencies.

NeAl,

It is my understanding that the PSoC Creator performs Incremental Builds by default.  There doesn't appear to be a Build Setting to choose "Full" or "Incremental" builds for a project.

You can force a full rebuild of your project, by selecting "Clean <projectname>" then "Build <projectname>" or "Clean and Build <projectname>".  A "Build <projectname>" will only compile changed modules.  Note:  Changing a shared header file will force a recompile of .c files that use it.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Hi,

Thanks everyone for the help. Just to give more detail, even if I don't change anything and I press build, the project is built again. I'm using bootloader component. Can it be because of that?

This long build time is costing us a lot of time and causing frustration.

Best,

NeAl,

I've designed bootloadable applications before.  A build should still only perform a "delta" build of changed components.  It should not always force a complete build.

Len

Len
"Engineering is an Art. The Art of Compromise."

Hi NeAl_2298636,

Can you try creating a new project with dummy files and building it? Can you let us know if you find PSoC Creator building all the files everytime even in the new project?

Can you please confirm that when you click on Build icon you have selected Build itself and not Clean and Build?

You can find the drop down button next to the Build icon at the top left corner in PSoC Creator as shown -

pastedImage_2.png

Clicking on Clean and Build here will change the icon as shown -

pastedImage_3.png

By default the Build icon is like this -

pastedImage_4.png

I am unable to reproduce your issue in any other way.

Can you please confirm that you have chosen the Build option?

Also, is there any pre-build automation script that might be changing the files?

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes

Hi Rakshith,

Thanks for the help. When I create a new project, it is not building all resources from scratch when I press build.

I'm using the Build option, not the Clean and Build. Icon is correct as you shared.

There is no automation script that I'm using. Code generation is not running from scratch, but it is compiling all files. This is a sample compilation with options.

arm-none-eabi-gcc.exe -mcpu=cortex-m3 -mthumb -Ilegacy -I.\ftdi\Hdr\cypress -I.\ui\ftdi\pages -I.\ui\ftdi\widgets -I.\ui\ftdi\utils -I.\ftdi\Hdr -I. -IGenerated_Source\PSoC5 -Wa,-alh=.\CortexM3\ARM_GCC_541\Debug/FT8_commands.lst -g -D DEBUG -D NEW_TFT -w -ffunction-sections -ffat-lto-objects -Og -Wall -Wstrict-prototypes -Wunreachable-code -Wwrite-strings -Wpointer-arith -Wbad-function-cast -Wcast-align -Wcast-qual -c legacy\FT8_lib\FT8_commands.c -o .\CortexM3\ARM_GCC_541\Debug\FT8_commands.o

0 Likes

Hi NeAl_2298636,

I was unable to find any difference between the compiler flags that you have shared and another PSoC 5 project, other than few warning flags.

I added those flags too into my project and checked, but, everything was working fine. I was unable to reproduce your issue.

Is there any other changes that you have made to your Build Settings or your project?

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes
NeAl_2298636
Level 3
Level 3
First like received First like given

Hi Rakshith,

I didn't make any changes to the build settings. I will open a new project and import all files there and retry. I will write the results.