hardkernel / ODROID-GO

134 stars 36 forks source link

ESP32 compiling for board ESP32 #23

Closed RedenMoradz13 closed 3 years ago

RedenMoradz13 commented 3 years ago

I've been working on my project using the ESP32 board. I am using millis() for my stop watch, however I can't reset the millis(). I am using this program to reset the millis():

=========================================================================== extern volatile unsigned long timer0_millis; void setup() { // put your setup code here, to run once:

}

void loop() { // put your main code here, to run repeatedly: noInterrupts(); timer0_millis = 0; interrupts(); }

And I always encounter this type of error:

C:\Users\User2\AppData\Local\Temp\arduino_build_487553\sketch\esp32.ino.cpp.o:(.literal._Z4loopv+0x4): undefined reference to `timer0_millis' collect2.exe: error: ld returned 1 exit status

please help me with this problem.