Compiling ESP32-C2 Arduino lib
-
- Posts: 65
- Joined: Mon Mar 26, 2018 7:57 pm
Compiling ESP32-C2 Arduino lib
I am compiling the ESP32-C2 library for Arduino, once compiled I am unsure where all the files are I need to move into my Arduino folders.
I am compiling in Linux, and moving them to a Windows 10 machine.
I see a folder called out that has tools in it, I see also a folder called components/Arduino that looks like we need them, however where is the RISC-V GCC compiler added?
Anyone have instructions on such a data move?\
I am also using 'python3 app.py' to do the setup and compiling.
Richard.
I am compiling in Linux, and moving them to a Windows 10 machine.
I see a folder called out that has tools in it, I see also a folder called components/Arduino that looks like we need them, however where is the RISC-V GCC compiler added?
Anyone have instructions on such a data move?\
I am also using 'python3 app.py' to do the setup and compiling.
Richard.
-
- Posts: 828
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Compiling ESP32-C2 Arduino lib
You need the entirety of the tools/esp32-arduino-libs folder. You should ensure that you are compiling the exact same version of arduino-esp32 as what is in your Arduino sketch folder, so that when you run get.py (or exe) your gcc binaries will match.
In recent versions of the code, I think C2 is included, but hidden.
In recent versions of the code, I think C2 is included, but hidden.
-
- Posts: 65
- Joined: Mon Mar 26, 2018 7:57 pm
Re: Compiling ESP32-C2 Arduino lib
OK interesting, now I have un-hidden it, and I see the C2 module, now when it compiles I get:
When I look into that folder I find the esp32c2 folder under C:\Users\Richard\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-b6b4727c58 is missing.
Code: Select all
Traceback (most recent call last):
File "esptool.py", line 37, in <module>
File "esptool\__init__.py", line 1064, in _main
File "esptool\__init__.py", line 888, in main
File "esptool\cmds.py", line 977, in elf2image
File "esptool\bin_image.py", line 1083, in __init__
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Richard\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-b6b4727c58\\esp32c2\\bin\\bootloader_qio_60m.elf'
[2320] Failed to execute script 'esesptool.py v4.6
ptool' due to unhandled exception!
exit status 1
Compilation error: exit status 1
-
- Posts: 828
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Compiling ESP32-C2 Arduino lib
If you are not familiar with building frameworks, you should use the lib builder with the -t and -c options.
I would recommend using the manual install instead of board manager so your changes don't get overwritten.
I would recommend using the manual install instead of board manager so your changes don't get overwritten.
-
- Posts: 65
- Joined: Mon Mar 26, 2018 7:57 pm
Re: Compiling ESP32-C2 Arduino lib
I did use lib-builder, I will see what the -t and -c entail... when it ran ./build.py it used what ever args it needed at the time I will revisit this and see....lbernstone wrote: ↑Fri Sep 20, 2024 12:07 amIf you are not familiar with building frameworks, you should use the lib builder with the -t and -c options.
I would recommend using the manual install instead of board manager so your changes don't get overwritten.
R.
-
- Posts: 65
- Joined: Mon Mar 26, 2018 7:57 pm
Re: Compiling ESP32-C2 Arduino lib
It did a -t esp32c2 and a -D default
also it was build.sh not .py
-c where should you point this to? I think when I installed Arduino to the windows machine the Arduino folder in Documents was empty and I think the same for the $HOME/Arduino on Linux....
R.
also it was build.sh not .py
-c where should you point this to? I think when I installed Arduino to the windows machine the Arduino folder in Documents was empty and I think the same for the $HOME/Arduino on Linux....
R.
-
- Posts: 828
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Compiling ESP32-C2 Arduino lib
From manual installation instructions:
-
- Posts: 65
- Joined: Mon Mar 26, 2018 7:57 pm
Re: Compiling ESP32-C2 Arduino lib
I cloned with git as it states in the docs, I make the c2 not hidden, I can see the new hardware directory show up in Arduino IDE.. however still get the error.
No such file or directory: 'C:\\Users\\Richard\\Documents\\Arduino\\hardware\\espressif\\esp32\\tools\\esp32-arduino-libs\\esp32c2\\bin\\bootloader_qio_60m.elf'
All ESPs are there in C:\Users\Richard\Documents\Arduino\hardware\espressif\esp32\tools\esp32-arduino-libs
see attached image
but no C2
R
No such file or directory: 'C:\\Users\\Richard\\Documents\\Arduino\\hardware\\espressif\\esp32\\tools\\esp32-arduino-libs\\esp32c2\\bin\\bootloader_qio_60m.elf'
All ESPs are there in C:\Users\Richard\Documents\Arduino\hardware\espressif\esp32\tools\esp32-arduino-libs
see attached image
but no C2
R
- Attachments
-
- esp.png (4.42 KiB) Viewed 1852 times
-
- Posts: 65
- Joined: Mon Mar 26, 2018 7:57 pm
Re: Compiling ESP32-C2 Arduino lib
Thanks to all that helped I have now figured it all out and its compiling just fine!
R.
R.
-
- Posts: 828
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Compiling ESP32-C2 Arduino lib
I was incorrect. You will indeed need to compile the sdk libraries for esp32c2. You can then move your compiled esp32c2 folder into the location you showed in the previous post. Note that it is important that your idf/arduino versions match up (v3.0.5/ 5.1.4)- it is best to get to the exact versions used by the arduino-esp32 team.
Who is online
Users browsing this forum: No registered users and 82 guests