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

idf.py menuconfig error related to xtensa-esp-elf tool #235

Open
gsoto-tellez opened this issue Mar 19, 2024 · 11 comments
Open

idf.py menuconfig error related to xtensa-esp-elf tool #235

gsoto-tellez opened this issue Mar 19, 2024 · 11 comments

Comments

@gsoto-tellez
Copy link

I am using a Jetson Xavier running ROS2 and an ESP32 WROOME
I installed the ESP-IDF and created my own freertos project and pasted the micro-ros component folder.

image

When attempting to select the middleware as instructed using idf.py menuconfig generated an error:

Screenshot from 2024-03-18 19-06-03

It is concerning a libmicroros.a file which is not in the microros component folder.

Am I supposed to add this file manually?

@pablogs9
Copy link
Member

Could you first build the library and then try to open the menuconfig? Let me know if this works

@gsoto-tellez
Copy link
Author

Yes I built it and got these errors:
image

@pablogs9
Copy link
Member

Why are you using micro_ros_setup? This is an standalone module for ESPIDF.

@gsoto-tellez
Copy link
Author

My apologies I sent the wrong screenshot. That was when I was following the micro-ROS documentation. This is the error I get when I build.
Screenshot from 2024-03-19 20-25-08

@pablogs9
Copy link
Member

I need the complete log and the steps you followed to reach this error.

@gsoto-tellez
Copy link
Author

I created my own freertos project and pasted the microros component folder in it. Then I added the dependencies following this:
image
I ran idf.py then attempted to select the micro-ROS middleware following this:
image

The complete error from running idf.py menuconfig is:
objpkjnfp@teambot-desktop:~/freertos_project$ idf.py menuconfig
Executing action: menuconfig
Running cmake in directory /home/objpkjnfp/freertos_project/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/objpkjnfp/.espressif/python_env/idf5.3_py3.8_env/bin/python -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /home/objpkjnfp/freertos_project"...
-- IDF_TARGET is not set, guessed 'esp32' from sdkconfig '/home/objpkjnfp/freertos_project/sdkconfig'
-- Found Git: /usr/bin/git (found version "2.25.1")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++
-- Check for working CXX compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /home/objpkjnfp/freertos_project/sdkconfig
-- Compiler supported targets: xtensa-esp-elf
-- Found Python3: /home/objpkjnfp/.espressif/python_env/idf5.3_py3.8_env/bin/python (found version "3.8.10") found components: Interpreter
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "my-freertos-project" version: 1
-- Adding linker script /home/objpkjnfp/freertos_project/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /home/objpkjnfp/freertos_project/build/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Using Micro XRCE-DDS middleware
mkdir -p /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/libmicroros; cd /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/libmicroros;
for file in $(find /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/install/lib/ -name '*.a'); do
folder=$(echo $file | sed -E "s/(.+)/(.+).a/\2/");
mkdir -p $folder; cd $folder; /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ar x $file;
for f in *; do
mv $f ../$folder-$f;
done;
cd ..; rm -rf $folder;
done ;
/home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ar rc -s libmicroros.a *.obj; cp libmicroros.a /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component;
cd ..; rm -rf libmicroros;
cp -R /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/install/include /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/include;
/home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp-elf-ar: *.obj: No such file or directory
cp: cannot stat 'libmicroros.a': No such file or directory
cp: cannot stat '/home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/install/include': No such file or directory
make: *** [libmicroros.mk:139: /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/libmicroros.a] Error 1
CMake Error at components/micro_ros_espidf_component/CMakeLists.txt:77 (message):
FAILED: 2

-- Configuring incomplete, errors occurred!
See also "/home/objpkjnfp/freertos_project/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1

@mackaygrange
Copy link

I am having this exact same issue. Is there any update on this?

@Ericc99
Copy link

Ericc99 commented Feb 12, 2025

I have encontered the same issue as well, any updates?

@k-jayanth
Copy link

k-jayanth commented Feb 15, 2025

Facing the same problem here also on humble branch

`-- Adding linker script /home/jayanth/Developments/espidf/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld
-- Using Micro XRCE-DDS middleware
mkdir -p /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/libmicroros; cd /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/libmicroros;
for file in $(find /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/install/lib/ -name '*.a'); do
folder=$(echo $file | sed -E "s/(.+)/(.+).a/\2/");
mkdir -p $folder; cd $folder; /home/jayanth/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32s3-elf-ar x $file;
for f in *; do
mv $f ../$folder-$f;
done;
cd ..; rm -rf $folder;
done ;
/home/jayanth/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32s3-elf-ar rc -s libmicroros.a *.obj; cp libmicroros.a /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component;
cd ..; rm -rf libmicroros;
cp -R /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/install/include /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/include;
/home/jayanth/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp-elf-ar: *.obj: No such file or directory
cp: cannot stat 'libmicroros.a': No such file or directory
cp: cannot stat '/home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/install/include': No such file or directory
make: *** [libmicroros.mk:151: /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/libmicroros.a] Error 1
CMake Error at /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/CMakeLists.txt:90 (message):
FAILED: 2

-- Configuring incomplete, errors occurred!
See also "/home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/examples/int32_publisher/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1`

@rehmaan-dev
Copy link

Image

I'd like to point out that if you;re using any additional pckg, you should check that the addiotnal or extra pckg is being rebuilt when building the firmware, if you look in the extra-pckg folder, you may get the idea and besides ensure your build completes sucessfully, if not try building for esp32 dev kit board and see if it builds.

@k-jayanth
Copy link

yes it got resolved after cloning and rebuilding from scratch. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants