Skip to content

PulseIn doesn't compile for ESP32 C3 Mini #5488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
weoiss1998 opened this issue Aug 1, 2021 · 0 comments
Closed

PulseIn doesn't compile for ESP32 C3 Mini #5488

weoiss1998 opened this issue Aug 1, 2021 · 0 comments

Comments

@weoiss1998
Copy link

weoiss1998 commented Aug 1, 2021

Hardware:

Board: ESP32 C3 Dev Module
Core Installation version: 2.0.0-rc1
IDE name: Arduino IDE
Flash Frequency: 40Mhz
Upload Speed: 115200
Computer OS: Windows 10

Description:

I cannot compile my code because of the pulseIn function.

Sketch: (leave the backquotes for code formatting)

//Change the code below by your sketch

int highTime;    //integer for storing high time
int lowTime;     //integer for storing low time
float period;    // integer for storing period
float freq;      //storing frequency

void setup()
{
  Serial.begin(115200);
    pinMode(19,INPUT);  //Setting pin as input
}

void loop()
{
    highTime=pulseIn(19,HIGH);  //read high time
    lowTime=pulseIn(19,LOW); 
    period = highTime+lowTime; // Period = Ton + Toff
    freq=1000000/period;       //getting frequency with totalTime is in Micro seconds
    if(freq>3000&&freq<25000){
    Serial.println(freq);
    }
    delay(100);
}

### Debug Messages:
Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "ESP32C3 Dev Module, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 160MHz (WiFi), QIO, 40MHz, 4MB (32Mb), 115200, Error"

c:/users/simon/documents/arduinodata/packages/esp32/tools/riscv32-esp-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\simon\AppData\Local\Temp\arduino_cache_757352\core\core_2d9922f28ca7005c97674f5917340663.a(wiring_pulse.c.o): in function `pulseIn':

C:\Users\simon\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.0-rc1\cores\esp32/wiring_pulse.c:38: undefined reference to `xthal_get_ccount'

c:/users/simon/documents/arduinodata/packages/esp32/tools/riscv32-esp-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\simon\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.0-rc1\cores\esp32/wiring_pulse.c:40: undefined reference to `xthal_get_ccount'

c:/users/simon/documents/arduinodata/packages/esp32/tools/riscv32-esp-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\simon\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.0-rc1\cores\esp32/wiring_pulse.c:45: undefined reference to `xthal_get_ccount'

c:/users/simon/documents/arduinodata/packages/esp32/tools/riscv32-esp-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\simon\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.0-rc1\cores\esp32/wiring_pulse.c:41: undefined reference to `xthal_get_ccount'

c:/users/simon/documents/arduinodata/packages/esp32/tools/riscv32-esp-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\simon\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.0-rc1\cores\esp32/wiring_pulse.c:42: undefined reference to `xthal_get_ccount'

c:/users/simon/documents/arduinodata/packages/esp32/tools/riscv32-esp-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\simon\AppData\Local\Temp\arduino_cache_757352\core\core_2d9922f28ca7005c97674f5917340663.a(wiring_pulse.c.o):C:\Users\simon\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.0-rc1\cores\esp32/wiring_pulse.c:43: more undefined references to `xthal_get_ccount' follow

collect2.exe: error: ld returned 1 exit status

exit status 1

Fehler beim Kompilieren für das Board ESP32C3 Dev Module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant