ESP32 compiling time is way too long!

bonmotwang
Posts: 42
Joined: Fri Apr 12, 2019 4:25 pm
Location: Canada

ESP32 compiling time is way too long!

Postby bonmotwang » Tue May 14, 2019 8:27 pm

Hello other developers.
ESP32 takes minutes to compile. How do you guys live with the long compiling time?
Every change takes minutes to verify.

I guess at the later stage in the development it is probably fine.
But at beginning it is really slowing things done!

Thanks

Paul

username
Posts: 542
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32 compiling time is way too long!

Postby username » Tue May 14, 2019 9:37 pm

The initial build takes a bit. On my system it takes 15 seconds. Once you make a change it will recompile just that file. So it sounds like you possibly got something messed up in your setup install.

Make sure you add the -jx option to make. I.E. make -jx. where x is how many cores your PC has.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: ESP32 compiling time is way too long!

Postby fly135 » Tue May 14, 2019 9:42 pm

I think -jx is x = 2 x cores because each core supports two threads. Also if you are running win10 you should disable defender from scanning your development directory.

John A

username
Posts: 542
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32 compiling time is way too long!

Postby username » Tue May 14, 2019 10:15 pm

I think -jx is x = 2 x cores because each core supports two threads.
Correct. My current system is a 8 core. so that would be: make -j16. I should have been more clear, just assumed people knew.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP32 compiling time is way too long!

Postby ESP_Angus » Wed May 15, 2019 1:47 am

Yes, after the initial build only changed source files should be compiled.

The only exception is if you edit the menuconfig. In this case all files need re-compilation with the new config settings.

If you're not seeing this, it may be a bug - please provide some more details so we can help you figure it out.

As others have said, running "make -jN" and (on Windows) disabling Defender or adding Defender exceptions for IDF paths & tools will improve performance a lot.

You can also get better Windows performance by moving to the new CMake build system, but Eclipse support for this is still pending. https://docs.espressif.com/projects/esp ... ted-cmake/

bonmotwang
Posts: 42
Joined: Fri Apr 12, 2019 4:25 pm
Location: Canada

Re: ESP32 compiling time is way too long!

Postby bonmotwang » Wed May 15, 2019 3:09 am

I am running it on Windows 7.
This is the build output when I start build:
23:08:25 **** Incremental Build of configuration Default for project blink ****
make -j8 all

bonmotwang
Posts: 42
Joined: Fri Apr 12, 2019 4:25 pm
Location: Canada

Re: ESP32 compiling time is way too long!

Postby bonmotwang » Wed May 15, 2019 3:13 am

Output.txt attached.
I didn't change any code. Just compile, it always takes almost a minute to finish.
Attachments
output.txt
(35.38 KiB) Downloaded 1068 times

bonmotwang
Posts: 42
Joined: Fri Apr 12, 2019 4:25 pm
Location: Canada

Re: ESP32 compiling time is way too long!

Postby bonmotwang » Wed May 15, 2019 3:30 am

I compiled the project in mingw32 command line.
It only compiles the changes. and much faster.
I attached the output.

So there much be some setting in Eclipse messed up the build?

Thanks

Paul
Attachments
output in mingw32.txt
(715 Bytes) Downloaded 999 times

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP32 compiling time is way too long!

Postby ESP_Angus » Wed May 15, 2019 3:48 am

Hi Paul,

There's more console output in the Eclipse log, but you'll probably get the same console output in MINGW with "make V=1" - verbose output.

48 seconds is a long time, as the Eclipse build log shows that nothing was actually compiled (it just looks at each component and says "nothing needs compiling here").

What ESP-IDF version do you have?

bonmotwang
Posts: 42
Joined: Fri Apr 12, 2019 4:25 pm
Location: Canada

Re: ESP32 compiling time is way too long!

Postby bonmotwang » Wed May 15, 2019 6:43 pm

My ESP-IDF version:

Paul@W510 MINGW32 ~/esp/esp-idf
# git describe
v4.0-dev-311-g70eda3d22


Thanks

Paul

Who is online

Users browsing this forum: axellin and 61 guests