12 Replies Latest reply on Feb 11, 2020 6:55 AM by NeAl_2298636

    How to speed up build time?

    NeAl_2298636

      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. Re: How to speed up build time?
          RakshithM_16

          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

          • 2. Re: How to speed up build time?
            NeAl_2298636

            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.

            • 3. Re: How to speed up build time?
              EvPa_264126

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

              • 4. Re: How to speed up build time?
                LePo_1062026

                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

                • 5. Re: How to speed up build time?
                  NeAl_2298636

                  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.

                  • 6. Re: How to speed up build time?
                    LePo_1062026

                    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

                    • 7. Re: How to speed up build time?
                      NeAl_2298636

                      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,

                      • 8. Re: How to speed up build time?
                        LePo_1062026

                        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

                        1 of 1 people found this helpful
                        • 9. Re: How to speed up build time?
                          RakshithM_16

                          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 -

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

                          By default the Build icon is like this -

                           

                          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

                           

                          • 10. Re: How to speed up build time?
                            NeAl_2298636

                            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

                            • 11. Re: How to speed up build time?
                              RakshithM_16

                              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

                              • 12. Re: How to speed up build time?
                                NeAl_2298636

                                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.