Teensy4.1 - NativeEthernet - Extremely long compile times

Dimitri

Well-known member
Hello All,

Has anyone else experienced horrendously long compile times when using NativeEthernet.h?

I first started with a Hello-World type project, just blink an LED. The initial compile time was a bit long, but subsequent compile times were the normal 45 seconds.

Then, the only change I made was I inlcuded the line #include "NativeEthernet.h". The first compile took 9 minutes, 52 seconds.

Is there maybe a setting I accidentally set somewhere?

Code:
#include "NativeEthernet.h"


const byte pinOut_LED = 13;
boolean LED_st = 1;

unsigned long t1,t2,t3,t4;
unsigned long CycleTime_ms = 500;

///////////////////////////////////////////////////////////////////////////////////////////////
void setup()
{
  pinMode(pinOut_LED,OUTPUT);
  digitalWrite(pinOut_LED,HIGH);
  Serial.begin(115200);

  delay(100);

  t1 = millis();
  t2 = t1;
  t3 = t1;
  t4 = t1;
}

///////////////////////////////////////////////////////////////////////////////////////////////
void loop()
{
  t1 = millis();
  if(((t1-t2) >= CycleTime_ms) || (t2 > t1)) 
  {
    LED_st = !LED_st;
    digitalWrite(pinOut_LED,LED_st);
    t2 = t1;
  }
}
 
Tried it here. My Linux desktop compiles it in 14 seconds. My 2015 Macbook Air compiles it in 44 seconds. Both have SSD storage.

Any chance you're running Windows with overly aggressive anti-virus software slowing down filesystem access? That's usually the cause of really slow compile times.
 
Hi Paul & Joe,

It only occurs on the first build of the program, for example, when I first open the project and build for the first time. After that, all the .o files are generated and it takes about 40-45 seconds to compile.

I am behind a corporate firewall/antivirus so it is possible that my Windows machine is exhibiting what you speak of - I saw that in another thread, others have complained of this.

Just as a reference, when I first tried using NativeEthernet.h, I accidentally included EthernetUDP.h instead of NativeEthernetUDP.h. This build took like 40 minutes and just threw a bunch of errors and exceptions in the end!

If you have any ideas, maybe compiler settings/directives, please send my way!


Thank you both!!!

Also thank you Paul for everything Teensy, this T41 is a monster! You make it too easy and affordable - not worth designing my own board like I wanted to do a few years back. Instead now I can focus on all the peripherals and other downstream items!
 
Back
Top