Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: [1] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) Compiling taking extremely long time? (Read 7408 times)
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Compiling taking extremely long time?
Feb 19th, 2020 at 2:53pm
Print Post  
Hi,

I've been trying to compile using the STM32duino boards but the compile times are very long. It seems to re-compile bits that don't need re-compiling every time i try to build the program, here is the full build log attached:

« Last Edit: Feb 19th, 2020 at 4:35pm by Bambo »  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #1 - Feb 19th, 2020 at 2:58pm
Print Post  
Attached is a second build log from a restart of visual studio and then build (i think it is breaking on this build because of the High Speed Parallel option?)
« Last Edit: Feb 19th, 2020 at 4:35pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiling taking extremely long time?
Reply #2 - Feb 19th, 2020 at 3:39pm
Print Post  
Please follow the guide above and switch on both options, switch off high speed build then submit the output so that we have a clean simple picture.

I doubt the high speed build is causing the issue but when off we get a simpler build output. The issue will either be library or code related.

I think that yesterday I mentioned your builds are slow due to virus checker and recommended some tests but you haven't given feedback about that.
  
Back to top
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #3 - Feb 19th, 2020 at 4:13pm
Print Post  
Hi, these build logs are from building with my antivirus turned off (Windows defender) and it still takes a long time.

I'm building it now on a different PC using high speed disabled.
« Last Edit: Feb 19th, 2020 at 4:29pm by Bambo »  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #4 - Feb 19th, 2020 at 4:40pm
Print Post  
I have emailed 3 build logs, 1 build is the first initial build and the next 2 after afterwards with the antivirius enabled and disabled
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiling taking extremely long time?
Reply #5 - Feb 19th, 2020 at 4:49pm
Print Post  
The build outputs don't seem to be complete, they should end stating if the build completed ok or with error.

Can you confirm that you also switched off high speed build and please resubmit with debug off.

The stm32 does compile a lot of files compared to other boards but it doesn't take as long as yours did.

  
Back to top
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #6 - Feb 19th, 2020 at 4:53pm
Print Post  
Yep those builds were with high speed build switched off, and i will email through a release build.
« Last Edit: Feb 19th, 2020 at 4:59pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiling taking extremely long time?
Reply #7 - Feb 19th, 2020 at 4:58pm
Print Post  
Ahh thanks, it was my email syste cutting them off, when I download them I see the end.

Okay so the builds are working okay. Please open the arduino ide and build the same project but first enable the arduino "file>preferences>compile verbose". Let's see what that does with your code?

Thanks
  
Back to top
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #8 - Feb 19th, 2020 at 5:01pm
Print Post  
Ok i have just emailed you a release build log, i'm compiling it with arduino ide now. it looks like it takes around 2-3 minutes to compile
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #9 - Feb 19th, 2020 at 5:04pm
Print Post  
Ok i might see what the problem is, there is a warning that isn't shown in the vsmicro output but it shows itself on the arduino ide, let me try to resolve it.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiling taking extremely long time?
Reply #10 - Feb 19th, 2020 at 5:07pm
Print Post  
I see same warnings in both your Arduino and VMicro outputs. Which warning are you referring too?

  
Back to top
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #11 - Feb 19th, 2020 at 5:08pm
Print Post  
Tim@Visual Micro wrote on Feb 19th, 2020 at 5:07pm:
I see same warnings in both your Arduino and VMicro outputs. Which warning are you referring too?



This one:

Quote:
hal_conf_extra.h:1: warning: "HAL_SAI_MODULE_ENABLED" redefined
    1 | #define HAL_SAI_MODULE_ENABLED
      | 
<command-line>: note: this is the location of the previous definition


Quote:
\arduino/stm32/stm32yyxx_hal_conf.h:23: warning: "HAL_ADC_MODULE_ENABLED" redefined
« Last Edit: Feb 19th, 2020 at 5:09pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiling taking extremely long time?
Reply #12 - Feb 19th, 2020 at 5:11pm
Print Post  
Yep that is in the vMicro output.
  
Back to top
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #13 - Feb 19th, 2020 at 5:16pm
Print Post  
It spams this output:

https://pastebin.com/HDgzgx8W

This is where it takes a long time ^
« Last Edit: Feb 19th, 2020 at 5:16pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiling taking extremely long time?
Reply #14 - Feb 19th, 2020 at 5:21pm
Print Post  
Because the compile works and it is also slow in the arduino ide I think that proves we are doing the right things. Therefore I suggest your questions be directed either at the stm tool chain provider or the library provider if a library is causing the issue.

I can say that the stm does produce dynamic files at the start of the build which requires many files to be compiled. However it's probably 10 or 15 seconds on our pc's and on my laptop. Therefore I think you also have a slow disk or something else interering. If not virus checker what about anti-malware software. I suggest looking at task manager to see if you can see the cause.

  
Back to top
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #15 - Feb 19th, 2020 at 5:23pm
Print Post  
yeah you're right, thanks for your time, i did ask this question to the stm32 guys a while ago and this was their reponse - https://github.com/stm32duino/Arduino_Core_STM32/issues/868#issuecomment-5740894... not sure if that helps but yeah.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiling taking extremely long time?
Reply #16 - Feb 19th, 2020 at 5:42pm
Print Post  
I suggest you post output from the arduino ide when posting build outputs on those sites. It will keep the conversation simpler. If you must post vm output then switch off debugging so the build properties are simpler/cleaner for other people to comment on.

Visual Micro has cached your code, the issue seems to be related to your pc. 

Here are some simple stats. Empty new project.

1st compile

Program Testme3 size: 5,132 bytes (used 31% of a 16,384 byte maximum) (76.86 secs)
Minimum Memory Usage: 428 bytes (10% of a 4096 byte maximum)
 
2nd compile (or after clicking build>clean solution)

Program Testme3 size: 5,132 bytes (used 31% of a 16,384 byte maximum) (4.68 secs)
Minimum Memory Usage: 428 bytes (10% of a 4096 byte maximum)

  
Back to top
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #17 - Feb 19th, 2020 at 5:54pm
Print Post  
Tim@Visual Micro wrote on Feb 19th, 2020 at 5:42pm:
I suggest you post output from the arduino ide when posting build outputs on those sites. It will keep the conversation simpler. If you must post vm output then switch off debugging so the build properties are simpler/cleaner for other people to comment on.

Visual Micro has cached your code, the issue seems to be related to your pc. 

Here are some simple stats. Empty new project.

1st compile

Program Testme3 size: 5,132 bytes (used 31% of a 16,384 byte maximum) (76.86 secs)
Minimum Memory Usage: 428 bytes (10% of a 4096 byte maximum)
 
2nd compile (or after clicking build>clean solution)

Program Testme3 size: 5,132 bytes (used 31% of a 16,384 byte maximum) (4.68 secs)
Minimum Memory Usage: 428 bytes (10% of a 4096 byte maximum)



Try compiling using the Nucleo-64 board and the L452RE chip. You've compiled with a different system, its something funny with the VMBuild/Temp/ directory being deleted every time i try to build (ithink)?
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #18 - Feb 19th, 2020 at 5:59pm
Print Post  
Weirdly it's not placing the object files anywhere when compiling the core?

g++ stuff -I"" -I"" aries\SrcWrapper\src\HAL\stm32yyxx_hal_dma.c" -o "nul"

It just has "nul"
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Compiling taking extremely long time?
Reply #19 - Feb 19th, 2020 at 6:02pm
Print Post  
If check the output directory, the /core/ directory is empty too, this explains why it keeps on re-compiling stm32 every time! it's not caching it Smiley

See attached Smiley
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint