Help for this compilation error

Hello,
Help needed to decode where is the compilation problem with this code. My board is ESP32 development board, 38 pins. I tried to select many esp32 board, but all failed. IoAbstraction.h and TaskManagerIO Libraries are installed using the Auduino library tools.

Martin

/*
Timed blink, this example shows how to build the simple Blink application using both IoAbstraction
and TaskManager. This gives an example of how quickly a simple application can be made to leverage
this library.

Because this example uses IoAbstraction, the LED could be on the end of an i2c expander or even
on a shift register. Further, if you then needed a second timed action, it would be trivial to
add.

 Documentation and reference:

  https://www.thecoderscorner.com/products/arduino-downloads/io-abstraction/
  https://www.thecoderscorner.com/ref-docs/ioabstraction/html/index.html

*/

#include <Wire.h>
#include<IoAbstraction.h>
#include<TaskManagerIO.h>

// constant for the pin we will use
const int ledPin = 13;

// the state of the pin, we will toggle it.
int ledOn = LOW;

// create an IO abstraction, so later we could put the led on a shift register or i2c.

void setup() {
    Serial.begin(115200);
    Serial.println("1");
	// set the pin we are to use as output using the io abstraction
	internalDigitalDevice().pinMode(ledPin, OUTPUT);

	// and create the task that toggles the led every second.
	taskManager.scheduleFixedRate(1000, toggle);
    Serial.println("3");

}

// this is the call back method that gets called once a second
// from the schedule above.
void toggle() {
    Serial.println("4");

    // now we write to the device, the 'S' version of the method automatically syncs.
	internalDigitalDevice().digitalWriteS(ledPin, ledOn);

	ledOn = !ledOn; // toggle the LED state.
}


void loop() {
	// this is all we should do in loop when using task manager.
	taskManager.runLoop();
}

compilation error script.
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\SwitchInput.cpp: In member function 'virtual void EncoderUpDownButtons::onPressed(pinid_t, bool)':
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\SwitchInput.cpp:524:23: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  524 |     } else if(backPin != -1 && passThroughListener && pin == getBackPin()) {
      |               ~~~~~~~~^~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\SwitchInput.cpp:526:23: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  526 |     } else if(nextPin != -1 && passThroughListener && pin == getNextPin()) {
      |               ~~~~~~~~^~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\SwitchInput.cpp: In member function 'virtual void EncoderUpDownButtons::onReleased(pinid_t, bool)':
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\SwitchInput.cpp:532:16: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  532 |     if(backPin != -1 && passThroughListener && pin == getBackPin()) {
      |        ~~~~~~~~^~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\SwitchInput.cpp:534:23: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  534 |     } else if(nextPin != -1 && passThroughListener && pin == getNextPin()) {
      |               ~~~~~~~~^~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp: In member function 'uint16_t EspAnalogInputMode::getCurrentReading()':
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:69:15: error: 'DAC1' was not declared in this scope
   69 |     if(pin == DAC1 || pin == DAC2) {
      |               ^~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:69:30: error: 'DAC2' was not declared in this scope
   69 |     if(pin == DAC1 || pin == DAC2) {
      |                              ^~~~
In file included from c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src/esp32/ESP32AnalogDevice.h:9,
                 from c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src/AnalogDeviceAbstraction.h:89,
                 from c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:6:
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SimpleCollections.h: In instantiation of 'static void tccollection::BtreeList<K, V>::copyInternal(void*, const void*) [with K = unsigned char; V = EspAnalogOutputMode]':
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SimpleCollections.h:144:84:   required from 'tccollection::BtreeList<K, V>::BtreeList(bsize_t, tccollection::GrowByMode) [with K = unsigned char; V = EspAnalogOutputMode; bsize_t = unsigned int]'
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:119:38:   required from here
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SimpleCollections.h:174:23: warning: implicitly-declared 'EspAnalogOutputMode& EspAnalogOutputMode::operator=(const EspAnalogOutputMode&)' is deprecated [-Wdeprecated-copy]
  174 |             *itemDest = *itemSrc;
      |             ~~~~~~~~~~^~~~~~~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:90:1: note: because 'EspAnalogOutputMode' has user-provided 'EspAnalogOutputMode::EspAnalogOutputMode(const EspAnalogOutputMode&)'
   90 | EspAnalogOutputMode::EspAnalogOutputMode(const EspAnalogOutputMode& other)  {
      | ^~~~~~~~~~~~~~~~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SimpleCollections.h: In instantiation of 'static void tccollection::BtreeList<K, V>::copyInternal(void*, const void*) [with K = unsigned char; V = EspAnalogInputMode]':
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SimpleCollections.h:144:84:   required from 'tccollection::BtreeList<K, V>::BtreeList(bsize_t, tccollection::GrowByMode) [with K = unsigned char; V = EspAnalogInputMode; bsize_t = unsigned int]'
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:119:38:   required from here
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SimpleCollections.h:174:23: warning: implicitly-declared 'EspAnalogInputMode& EspAnalogInputMode::operator=(const EspAnalogInputMode&)' is deprecated [-Wdeprecated-copy]
  174 |             *itemDest = *itemSrc;
      |             ~~~~~~~~~~^~~~~~~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:24:1: note: because 'EspAnalogInputMode' has user-provided 'EspAnalogInputMode::EspAnalogInputMode(const EspAnalogInputMode&)'
   24 | EspAnalogInputMode::EspAnalogInputMode(const EspAnalogInputMode& other) = default;
      | ^~~~~~~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1

Please to help us better understand, start separating here the compilation output messages int two separate "code" tags.

In file included from c:\Users\Utilisateur\Documents\Arduino\libraries\TaskManagerIO\src/TaskManagerIO.h:9,
                 from c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src/BasicIoAbstraction.h:14,
                 from c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src/IoAbstraction.h:17,
                 from C:\Users\Utilisateur\AppData\Local\Temp\.arduinoIDE-unsaved2024511-11992-16qt024.7pd8\sketch_jun11a\sketch_jun11a.ino:18:
c:\Users\Utilisateur\Documents\Arduino\libraries\TaskManagerIO\src/TaskPlatformDeps.h: In function 'bool tm_internal::atomicSwapBool(TmAtomicBool*, bool, bool)':
c:\Users\Utilisateur\Documents\Arduino\libraries\TaskManagerIO\src/TaskPlatformDeps.h:203:9: error: 'uxPortCompareSet' was not declared in this scope
  203 |         uxPortCompareSet(ptr, exp32, &new32);
      |         ^~~~~~~~~~~~~~~~
In file included from c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SimpleCollections.h:16,
                 from c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src/SwitchInput.h:19,
                 from c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src/IoAbstraction.h:306:
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SCThreadingSupport.h: At global scope:
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SCThreadingSupport.h:83:54: warning: 'volatile'-qualified parameter is deprecated [-Wvolatile]
   83 | inline bool casAtomic(position_ptr_t ptr, position_t expected, position_t newVal) {
      |                                           ~~~~~~~~~~~^~~~~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SCThreadingSupport.h:83:75: warning: 'volatile'-qualified parameter is deprecated [-Wvolatile]
   83 | inline bool casAtomic(position_ptr_t ptr, position_t expected, position_t newVal) {
      |                                                                ~~~~~~~~~~~^~~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SCThreadingSupport.h: In function 'bool casAtomic(position_ptr_t, position_t, position_t)':
c:\Users\Utilisateur\Documents\Arduino\libraries\SimpleCollections\src/SCThreadingSupport.h:86:5: error: 'uxPortCompareSet' was not declared in this scope
   86 |     uxPortCompareSet(ptr, exp32, &new32);
      |     ^~~~~~~~~~~~~~~~
In file included from C:\Users\Utilisateur\AppData\Local\Temp\arduino\sketches\90C317117B502A55A77B0780AAC0B686\sketch\sketch_jun11a.ino.cpp:1:
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src/SwitchInput.h: In member function 'void SwitchInput::setInterruptDebouncing(bool)':
C:\Users\Utilisateur\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\cores\esp32/Arduino.h:97:49: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
   97 | #define bitSet(value, bit)             ((value) |= (1UL << (bit)))
      |                                         ~~~~~~~~^~~~~~~~~~~~~~~~~
C:\Users\Utilisateur\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\cores\esp32/Arduino.h:100:54: note: in expansion of macro 'bitSet'
  100 | #define bitWrite(value, bit, bitvalue) ((bitvalue) ? bitSet(value, bit) : bitClear(value, bit))
      |                                                      ^~~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src/SwitchInput.h:669:54: note: in expansion of macro 'bitWrite'
  669 |         void setInterruptDebouncing(bool debounce) { bitWrite(swFlags, SW_FLAG_INTERRUPT_DEBOUNCE, debounce);}
      |                                                      ^~~~~~~~
C:\Users\Utilisateur\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\cores\esp32/Arduino.h:98:49: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
   98 | #define bitClear(value, bit)           ((value) &= ~(1UL << (bit)))
      |                                         ~~~~~~~~^~~~~~~~~~~~~~~~~~
C:\Users\Utilisateur\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\cores\esp32/Arduino.h:100:75: note: in expansion of macro 'bitClear'
  100 | #define bitWrite(value, bit, bitvalue) ((bitvalue) ? bitSet(value, bit) : bitClear(value, bit))
      |                                                                           ^~~~~~~~
c:\Users\Utilisateur\Documents\Arduino\libraries\IoAbstraction\src/SwitchInput.h:669:54: note: in expansion of macro 'bitWrite'
  669 |         void setInterruptDebouncing(bool debounce) { bitWrite(swFlags, SW_FLAG_INTERRUPT_DEBOUNCE, debounce);}
      |                                                      ^~~~~~~~

exit status 1

Compilation error: exit status 1

Looks like you have something wrong in your libraries installation or usage.
My first idea is to uninstall and install back the indicated libraries and see it helps.

If not, it could be something else but I have never installed nor used such libraries (IoAbstraction and TaskManagerIO), I can't help you more, sorry.

This function...

Is found in this file... TaskManagerIO/src/TaskPlatformDeps.h at main · TcMenu/TaskManagerIO · GitHub

In this library... GitHub - TcMenu/TaskManagerIO: A task, event, scheduling, and interrupt marshalling library for Arduino and mbed boards.

Maybe you installed the wrong library (libraries).

Not sure to understand. I did installed library using Arduino Library Manager.

I realise that I got many problem when compiling some libraries. I don't know if it's me or the Arduino IDE.

Problems with library like: TaskManagerIO, MPR121,adafruit_mpr121 and others.

Something is not in the right place.

Restart.

As @docdocsays, uninstall the libraries and reinstall them. If that does not work, uninstall the IDE and reinstall it.

uxPortCompareSet is defined in a couple of places in ESP-IDF v4, upon which arduino-esp32 v2 is based upon. But a few weeks ago, v3 was released, which is based on IDF v5, and that function is gone.

Go to the Boards manager and revert to the latest v2 for you board, probably 2.1.7, and try again.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.