RabbitGRBL icon indicating copy to clipboard operation
RabbitGRBL copied to clipboard

Compilation error when compiling to MKS DLC32 V2.1

Open Christo-Fourie opened this issue 1 year ago • 6 comments

Good day

I'm not sure if I'm barking up the wrong tree, but I am trying to flash RabbitGRBL onto my MKS DLC 32 V2.1.

When compiling the firmware on the Arduino IDE (2.3.2), I receive the following error:

Compilation error: 'vTaskEnterCritical' was not declared in this scope

My settings on the Arduino IDE are as follows:

image

I want to use RabbitGRBL for the backlash compensation, so it would be a pity if the MKS DLC 32 board or rather the ESP32 WROOM 32U CPU is not supported.

Looking forward to your feedback.

Regards Christo

Christo-Fourie avatar Aug 17 '24 10:08 Christo-Fourie

Hello,

I cannot clearly see the error you get from the screenshot, I suspect it has to do with the Serial.c

Have you followed the Step 1? https://github.com/SourceRabbit/RabbitGRBL/wiki/How-to-Compile-with-Arduino-IDE

"Copy the contents of the Arduino/Packages/esp32 directory inside the AppData folder of your Arduino IDE for the current windows user. The path is simular to C:\Users\Username\AppData\Local\Arduino15\packages\esp32"

If you did then please do not update the boards if Arduino IDE asks.

nsiatras avatar Aug 17 '24 10:08 nsiatras

I cannot clearly see the error you get from the screenshot, I suspect it has to do with the Serial.c

Apologies for that. Below is the entire error copied from the IDE console:

C:\Users\chris\Documents\GitHub\RabbitGRBL\RabbitGRBL\src\Serial.cpp: In function 'void clientCheckTask(void*)': C:\Users\chris\Documents\GitHub\RabbitGRBL\RabbitGRBL\src\Serial.cpp:98:17: error: 'vTaskEnterCritical' was not declared in this scope vTaskEnterCritical(&myMutex); ^~~~~~~~~~~~~~~~~~ C:\Users\chris\Documents\GitHub\RabbitGRBL\RabbitGRBL\src\Serial.cpp:98:17: note: suggested alternative: 'vPortEnterCritical' vTaskEnterCritical(&myMutex); ^~~~~~~~~~~~~~~~~~ vPortEnterCritical C:\Users\chris\Documents\GitHub\RabbitGRBL\RabbitGRBL\src\Serial.cpp:100:17: error: 'vTaskExitCritical' was not declared in this scope vTaskExitCritical(&myMutex); ^~~~~~~~~~~~~~~~~ C:\Users\chris\Documents\GitHub\RabbitGRBL\RabbitGRBL\src\Serial.cpp:100:17: note: suggested alternative: 'vPortExitCritical' vTaskExitCritical(&myMutex); ^~~~~~~~~~~~~~~~~ vPortExitCritical C:\Users\chris\Documents\GitHub\RabbitGRBL\RabbitGRBL\src\Serial.cpp: In function 'int client_read()': C:\Users\chris\Documents\GitHub\RabbitGRBL\RabbitGRBL\src\Serial.cpp:115:5: error: 'vTaskEnterCritical' was not declared in this scope vTaskEnterCritical(&myMutex); ^~~~~~~~~~~~~~~~~~ C:\Users\chris\Documents\GitHub\RabbitGRBL\RabbitGRBL\src\Serial.cpp:115:5: note: suggested alternative: 'vPortEnterCritical' vTaskEnterCritical(&myMutex); ^~~~~~~~~~~~~~~~~~ vPortEnterCritical C:\Users\chris\Documents\GitHub\RabbitGRBL\RabbitGRBL\src\Serial.cpp:117:5: error: 'vTaskExitCritical' was not declared in this scope vTaskExitCritical(&myMutex); ^~~~~~~~~~~~~~~~~ C:\Users\chris\Documents\GitHub\RabbitGRBL\RabbitGRBL\src\Serial.cpp:117:5: note: suggested alternative: 'vPortExitCritical' vTaskExitCritical(&myMutex); ^~~~~~~~~~~~~~~~~ vPortExitCritical

exit status 1

Compilation error: 'vTaskEnterCritical' was not declared in this scope

I did copy the Arduino/Packages/esp32 directory into the AppData folder.

Arduino IDE did ask to update the boards but I did not run the update.

Christo-Fourie avatar Aug 17 '24 11:08 Christo-Fourie

Ok. The error has to do with the Serial.cpp and has to do with the Step 1 of the How-to-Compile-with-Arduino-IDE

Have restart the Arduino IDE or the computer?

nsiatras avatar Aug 17 '24 11:08 nsiatras

No change when restarting my PC or the Arduino IDE.

I made a local copy of the entire RabbitGRBL repository on my local disc and copied the esp32 directory into the Arduino AppData folder exactly as explained in Step 1.

I also downloaded the serial.cpp file again and replaced it with the file already on my local drive (just in case...).

Christo-Fourie avatar Aug 17 '24 15:08 Christo-Fourie

@Christo-Fourie I can arrange a remote desktop session in order to setup the environment on your computer and debug the code.

If you are in, perhaps you can find me on our discord channel to arrange it https://discord.com/invite/nRKETyjJ7E

PS. Are you sure you copied the esp32 directory to C:\Users\chris\AppData\Local\Arduino15\packages?

Untitled

nsiatras avatar Aug 17 '24 17:08 nsiatras

@Christo-Fourie Solution No.2

Use the v1.0.6 esp32 package with the Arduino Boards Manager

image

nsiatras avatar Aug 17 '24 17:08 nsiatras