Closed KCYoong closed 2 months ago
Works for me. Sounds like perhaps you were unable to download the esp-sr component.
Remove the build directory. Remove managed_components/espressif__esp-sr/ . Run idf.py set-target esp32s3
. Run idf.py build
.
Works for me. Sounds like perhaps you were unable to download the esp-sr component. Remove the build directory. Remove managed_components/espressif__esp-sr/ . Run
idf.py set-target esp32s3
. Runidf.py build
.
Still not work for me, it occurs same error.
You'll have to post the full log.
Also make sure you have the submodules initialized and in the proper version.
Also make sure you have the submodules initialized and in the proper version.
Sorry for late reply, how do I know submodules initialized in proper version or not ?
@KCYoong - I think that it may be an issue related to long path length and Windows. Please try making the folder names shorter.
Example: Development/ESP-IDF/Hello_World-Arduino/
---> Dev/IDF/HelloWorld/
Also make sure you have the submodules initialized and in the proper version.
Sorry for late reply, how do I know submodules initialized in proper version or not ?
git submodule update --init --recursive
@KCYoong - I think that it may be an issue related to long path length and Windows. Please try making the folder names shorter.
Example:
Development/ESP-IDF/Hello_World-Arduino/
--->Dev/IDF/HelloWorld/
Still unable to build, i try make folder name shorter. Folder Name: Desktop\Firmware\IDF\HelloWorld
Log file attached log.zip
git submodule update --init --recursive
I have run this command and build again but still not working. Another build of log attached : log.zip
I use the offline installer to install IDF, is it will cause submodules initialized in not proper version ?
I use the offline installer to install IDF, is it will cause submodules initialized in not proper version ?
Could you please execute idf.py --version
and report the result back?
I use the offline installer to install IDF, is it will cause submodules initialized in not proper version ?
Could you please execute
idf.py --version
and report the result back?
C:\Espressif\frameworks\esp-idf-v5.1.4>idf.py --version ESP-IDF v5.1.4-dirty
You also need to run ./install.sh
from within the IDF folder to pull all tools
You also need to run
./install.sh
from within the IDF folder to pull all tools
After run install.sh, and git submodule update --init --recursive, i try re-build again but it still unable to build. log.zip
@KCYoong - I get no issues... Those are the all steps (from ground up) necessary in order to make it work:
esp-idf-tools-setup-offline-5.1.4.exe
- Select all option, including PowerShell, all Supported SoC
3) Once IDF is installed, run ESP-IDF 5.1 CMD
, which was installed into Windows.
3) Run idf.py --version
to confirm installation and IDF version.ESP-IDF 5.1 CMD
prompt, execute:
cd %USERPROFILE%\Desktop
mkdir Firmware\IDF
cd mkdir Firmware\IDF
git clone --depth=1 https://github.com/espressif/arduino-esp32.git arduino
cd arduino
git sparse-checkout set idf_component_examples/hello_world
cd idf_component_examples
move hello_world ..\..\HelloWorld
cd ../..
rmdir /q/s arduino
cd HelloWorld
notepad main\idf_component.yml
edit the file by commenting out the last two lines, by adding a #
in the begining of those lines:
2) Save the file and exit notepad
application.## IDF Component Manager Manifest File
dependencies:
espressif/arduino-esp32:
version: "*"
# override_path: "../../../"
# pre_release: true
main
1) From the ESP-IDF 5.1 CMD
prompt, execute:
idf.py set-target esp32s3
idf.py -p COM7 flash monitor
---> replace COM7 with the ESP32-S3 UART Port from your Windows environment
COMxx port shall be marker as Silicon Labs CP210x USB to UART Bridge (COMxx)
when looking into Device Manager
application.
check the output after flashing the firmware. It worked fine here.Please try those steps.
@KCYoong - I get no issues... Those are the all steps (from ground up) necessary in order to make it work:
- IDF 5.1.4 environment installation:
- From Windows 11, install IDF 5.1.4 using OffLine installer found in https://dl.espressif.com/dl/esp-idf/
- Run
esp-idf-tools-setup-offline-5.1.4.exe
- Select all option, including PowerShell, all Supported SoC- Once IDF is installed, run
ESP-IDF 5.1 CMD
, which was installed into Windows.- Run
idf.py --version
to confirm installation and IDF version.
- Create the HelloWorld Arduino as IDF Component basic example:
- From the
ESP-IDF 5.1 CMD
prompt, execute:cd %USERPROFILE%\Desktop
mkdir Firmware\IDF
cd mkdir Firmware\IDF
git clone --depth=1 https://github.com/espressif/arduino-esp32.git arduino
cd arduino
git sparse-checkout set idf_component_examples/hello_world
cd idf_component_examples
move hello_world ..\..\HelloWorld
cd ../..
rmdir /q/s arduino
cd HelloWorld
- Prepare the project components declaration
- execute this in the CMD:
notepad main\idf_component.yml
edit the file by commenting out the last two lines, by adding a#
in the begining of those lines:- Save the file and exit
notepad
application.## IDF Component Manager Manifest File dependencies: espressif/arduino-esp32: version: "*" # override_path: "../../../" # pre_release: true
-Build the HelloWorld example (Arduino as Component - code in the folder
main
- From the
ESP-IDF 5.1 CMD
prompt, execute:idf.py set-target esp32s3
idf.py -p COM7 flash monitor
---> replace COM7 with the ESP32-S3 UART Port from your Windows environment COMxx port shall be marker asSilicon Labs CP210x USB to UART Bridge (COMxx)
when looking intoDevice Manager
application. check the output after flashing the firmware. It worked fine here.Please try those steps.
After I follow those steps, it is able to build and flash. Build Log: build log.txt
But, it is unable to build, if I put the Arduino in components folder for esp32s3 only. (Able build for esp32)
├── CMakeLists.txt
├── components
│ ├── Arduino
├── main
│ ├── CMakeLists.txt
│ └── main.cpp
└── README.md
Are there archive libraries (.a files) in those directories that the linker is complaining about? There should be a bunch of libs there.
Are there archive libraries (.a files) in those directories that the linker is complaining about? There should be a bunch of libs there.
Only arduino-esp32 library for build the HelloWorld
Can't reproduce either. Building Arduino as a component of IDF is imho easier with Platformio. The community version pioarduino
does support this build variant.
See https://github.com/pioarduino/platform-espressif32
Working examples are here https://github.com/pioarduino/platform-espressif32/tree/main/examples
Edit: There are no preparation steps needed. Only install pioarduino
as described in the short readme of the repo
@KCYoong - sdkconfig
will tell what is the SoC Target for building. You can open it and check the value for
CONFIG_IDF_TARGET="esp32s3"
CONFIG_IDF_TARGET_ESP32S3=y
CONFIG_ARDUINO_VARIANT="esp32s3"
... and many other references to esp32s3
After building for ESP32, in order to change to another SoC (such as ESP32-S3), it is necessary to delete sdkconfig
file and delete build
folder before start building a new SoC.
After deleting it, please run idf.py set-target esp32s3
as it will download and resolve all necessary dependencies for the ESP32-S3.
Only after that, you can run idf.py build
@KCYoong - I have changed the same setup that I mentioned in https://github.com/espressif/arduino-esp32/issues/10077#issuecomment-2263207958 in order to use arduino
cloned into components
folder.
1) deleted build
folder and sdkconfig
file
2) deleted main\idf_component.yml
file to force using arduino
cloned version
3) created components
folder and cloned arduino with git clone --recursive https://github.com/espressif/arduino-esp32.git arduino
into components
folder
4) executed idf.py set-target esp32s3
from the project folder
5) executed idf.py -p com4 flash monitor
: com4
if my esp32s3 UART port
It has built, flashed and executed correctly.
The only differente I see is that your project has Kconfig.projbuild
file in the main
folder. What is that for?
Are there archive libraries (.a files) in those directories that the linker is complaining about? There should be a bunch of libs there.
Only arduino-esp32 library for build the HelloWorld
c:/espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: cannot find Development/ESP-IDF/Hello_World-Arduino/managed_components/espressif__esp-sr/lib/esp32s3: No such file or directory
Look in that directory. I have the following:
total 13004
-rw-r--r-- 1 larryb larryb 598288 May 6 21:49 libc_speech_features.a
-rw-r--r-- 1 larryb larryb 3550770 May 6 21:49 libdl_lib.a
-rw-r--r-- 1 larryb larryb 296108 May 6 21:49 libesp_audio_front_end.a
-rw-r--r-- 1 larryb larryb 3482100 May 6 21:49 libesp_audio_processor.a
-rw-r--r-- 1 larryb larryb 1942754 May 6 21:49 libflite_g2p.a
-rw-r--r-- 1 larryb larryb 460286 May 6 21:49 libfst.a
-rw-r--r-- 1 larryb larryb 185556 May 6 21:49 libhufzip.a
-rw-r--r-- 1 larryb larryb 1853570 May 6 21:49 libmultinet.a
-rw-r--r-- 1 larryb larryb 267776 May 6 21:49 libnsnet.a
-rw-r--r-- 1 larryb larryb 653424 May 6 21:49 libwakenet.a
@KCYoong - I have changed the same setup that I mentioned in #10077 (comment) in order to use
arduino
cloned intocomponents
folder.
- deleted
build
folder andsdkconfig
file- deleted
main\idf_component.yml
file to force usingarduino
cloned version- created
components
folder and cloned arduino withgit clone --recursive https://github.com/espressif/arduino-esp32.git arduino
intocomponents
folder- executed
idf.py set-target esp32s3
from the project folder- executed
idf.py -p com4 flash monitor
:com4
if my esp32s3 UART portIt has built, flashed and executed correctly.
After I try your steps, it is still unable to build. sdkconfig.txt build log 5-8-2024.txt
The only differente I see is that your project has
Kconfig.projbuild
file in themain
folder. What is that for?
It is occurs when build the project. Kconfig.txt
Are there archive libraries (.a files) in those directories that the linker is complaining about? There should be a bunch of libs there.
Only arduino-esp32 library for build the HelloWorld
c:/espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: cannot find Development/ESP-IDF/Hello_World-Arduino/managed_components/espressif__esp-sr/lib/esp32s3: No such file or directory
Look in that directory. I have the following:total 13004 -rw-r--r-- 1 larryb larryb 598288 May 6 21:49 libc_speech_features.a -rw-r--r-- 1 larryb larryb 3550770 May 6 21:49 libdl_lib.a -rw-r--r-- 1 larryb larryb 296108 May 6 21:49 libesp_audio_front_end.a -rw-r--r-- 1 larryb larryb 3482100 May 6 21:49 libesp_audio_processor.a -rw-r--r-- 1 larryb larryb 1942754 May 6 21:49 libflite_g2p.a -rw-r--r-- 1 larryb larryb 460286 May 6 21:49 libfst.a -rw-r--r-- 1 larryb larryb 185556 May 6 21:49 libhufzip.a -rw-r--r-- 1 larryb larryb 1853570 May 6 21:49 libmultinet.a -rw-r--r-- 1 larryb larryb 267776 May 6 21:49 libnsnet.a -rw-r--r-- 1 larryb larryb 653424 May 6 21:49 libwakenet.a
I found these in my directory also.
@KCYoong - I was able to reproduce the same issue as reported in your log file build log 5-8-2024.txt
I solved it by changing the folder name of Firmware Development
to just dev
C:\Users\kcyoong96124\Desktop\P-Light\dev\IDF5\HelloWorld_Arduino
will fix it.
This seems to be the problem with Windows long folder path name that I initially described.
@KCYoong - I was able to reproduce the same issue as reported in your log file build log 5-8-2024.txt
I solved it by changing the folder name of
Firmware Development
to justdev
C:\Users\kcyoong96124\Desktop\P-Light\dev\IDF5\HelloWorld_Arduino
will fix it.This seems to be the problem with Windows long folder path name that I initially described.
You are right, I change the folder name to "C:\Users\kcyoong96124\Desktop\P-Light\dev\idf\HelloWorld_Arduino", it is able to build and flash.
Build Log: build log 6-8-2024.txt
@lapshin Can this complicated folder path be changed?
c:/espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe
The real path to ld.exe
is shorter ;-)
@Jason2866 , Won't change. This is a common approach to how GCC looks for internals.
Long paths do not seem to be a problem here but spaces.
BTW, in the release esp-13.2.0_20240530 longpaths and 8dot3 enabled for windows.
@Lapshin Thx for the info. So the issue is solved when Arduino is moving to IDF 5.3
Great, I'll close this issue and change the description to include "windows".
Long paths do not seem to be a problem here but spaces.
In order to confirm the issue here: The problem is using spaces in the folder name. "Firmware Develpment" had a space (ASCII 0x20) in its name. replacing it using the same name, but with no " ", solves the issue. "Firmware_Development" works fine.
Thank you very much to solve my problem.
Board
Adafruit Feather ESP32-S3 TFT
Device Description
ESP32-S3-MINI-1
Hardware Configuration
N/A
Version
v3.0.3
IDE Name
Espressif IDE with ESP-IDF 5.1.4
Operating System
Window 10
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
115200
Description
Unable build with example Hello World code with Arduino-ESP32 library on ESP32-S3, but other target of ESP32 are able to build.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide