Hi dallim30,
I did not use this "esp_gsl" project to build the GSL lib.
in my case, I used the following repository that contains a copy of the latest stable version of GSL but with a cmake build system:
https://github.com/ampl/gsl
here are some steps that worked for me and my project:
conditions: Linux Environment; cmake, git and the ESP-IDF env already installed in your system.
... -> needs to meet your specific path
0) From a terminal command Clone the above repo:
make sure using the cmake in the context of ESP-IDF tools by:
Code: Select all
git clone https://github.com/ampl/gsl.git --recurse-submodules
1)Check your cmake version installed, must be > 3.4!
Building the lib without AMPL bindings
2)Inside the cloned repo, create a build directory and move there:
3)Initialize the build files with your desired generator: -G"Unix Makefiles" , "Ninja" etc.. defining the variables NO_AMPL_BINDINGS, GSL_DISABLE_TESTS, DOCUMENTATION Forcing the use of ESP32 Toolchain to compiling it to ESP32 architecture.
In my project, I was using the ESP32-s3 so my "DCMAKE_TOOLCHAIN_FILE" parameter was "toolchain-esp32s3.cmake"
Code: Select all
cmake .. -DCMAKE_TOOLCHAIN_FILE=.../esp/esp-idf/tools/cmake/toolchain-esp32s3.cmake -DNO_AMPL_BINDINGS=1 -DGSL_DISABLE_TESTS=1 -DDOCUMENTATION=OFF
NOTE: run the same command above twice , not sure what happens but the first time it fails!!
4)Build the resulting build files accordingly, just run "make"
5)Copy the resulted archives libgslcblas.a ..etc files and include/.h header files to the proper location in order to be used in the your ESP-IDF Project
6) follow the steps in the previous post to add the files library as a Prebuilt Component in your project.
hope it helps!