Skip to content
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

ESP32 sha_parallel_engine.h troubleshooting #841

Closed
revoxhere opened this issue Aug 19, 2021 · 9 comments
Closed

ESP32 sha_parallel_engine.h troubleshooting #841

revoxhere opened this issue Aug 19, 2021 · 9 comments
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@revoxhere
Copy link
Owner

revoxhere commented Aug 19, 2021

If you have an outdated ESP32 core, you will probably see the message like this while compiling the code:

ResolveLibrary(sha/sha_parallel_engine.h)
  -> candidates: []ESP32_Code:59:85: fatal error: sha/sha_parallel_engine.h: No such file or directory
 #include "sha/sha_parallel_engine.h" // Include hardware accelerated hashing library
                  ^
compilation terminated.

To solve that, you can either:

Update your ESP32 core (recommended for the future)

Open Arduino IDE > File > Preferences > In the Additional boards URL field put:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json

After doing that, update your ESP32 core: Arduino IDE > Tools > Board > Boards Manager > Type esp32 > Install version 2.0.1

You should now be able to compile the code without any problems.

Or use the older library version

Go to line 59 of the ESP32_Code.ino that says

#include "sha/sha_parallel_engine.h" // Include hardware accelerated hashing library

Comment it:

//#include "sha/sha_parallel_engine.h" // Include hardware accelerated hashing library

And enable the old library (uncomment line 58):

#include "hwcrypto/sha.h"

You should now be able to compile the code. Keep in mind using the old library will yield to worse performance.

@revoxhere revoxhere added documentation Improvements or additions to documentation good first issue Good for newcomers labels Aug 19, 2021
@revoxhere revoxhere self-assigned this Aug 19, 2021
@revoxhere revoxhere pinned this issue Aug 19, 2021
@Raabitco
Copy link

Thank you very much, fix the issue I have, God bless you, keep it up.

@rolandbreedveld
Copy link

It looks like replacing the "parallel" for "hwcrypto" library, will make the ESP32 run at 1 core.
with an ESP8266 it generates 10.2 kH/s, the ESP32 generates 22.5 kH/s
ESP8266 is single core runs at 80 MHz, ESP32 dual-core at 160MHz.
So I expect an ESP32 to generate more than 40 kH/s

@rolandbreedveld
Copy link

To solve this I installed a newer ESP32 core, version 2.0.1, it is using both core's now. HashRate grows from 22 to 35kH/s
and it compiles fine with: sha/sha_parallel_engine.h
in preferences I now use:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json,
http://arduino.esp8266.com/stable/package_esp8266com_index.json
after this install or update to the latest ESP32 in board manager.

@FernandoMeiraRocha
Copy link

How can I make ESP32 core run Duino only on one core, for the others to perform its normal functions in an IoT network?

@tigran-gasparyan
Copy link

i do that but it says that it is error

@ACLGSM
Copy link

ACLGSM commented Mar 10, 2022

Hi, can't find these libraries, where are located ?

@kd8bxp
Copy link

kd8bxp commented May 10, 2022

Update M5Stack Core to latest version, but with "sha/sha_parallel_engine.h" I keep getting pool connection refused errors.
Wentt back to a previous core, and "hwcrypto/sha.h" was able to connect without any problems.
Any ideas?

@srxdevnet
Copy link

For compiling with ESP32, just add in platform.ini platform_packages = platformio/framework-arduinoespressif32@3.20001.0 and in main #include <Arduino.h> #include <freertos/FreeRTOS.h> #include <freertos/task.h> at top of main.cpp

@revoxhere
Copy link
Owner Author

@Tech1k finally closing since 4.0 doesn't use this library anymore :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

8 participants