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

Provide the linux-i686 build for the esp32ulp-elf "Toolchain for ESP32 ULP coprocessor" (IDFGH-10302) #11561

Closed
3 tasks done
usr97629238 opened this issue May 31, 2023 · 3 comments
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Feature Request Feature request for IDF

Comments

@usr97629238
Copy link

usr97629238 commented May 31, 2023

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v4.4.4

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

esp32ulp-elf https://github.com/espressif/binutils-gdb and https://github.com/espressif/esp-idf/blob/master/tools/tools.json provide the esp32ulp-elf build for linux-i686

What is the actual behavior?

ERROR: tool esp32ulp-elf does not have versions compatible with platform linux-i686

Steps to reproduce.

  1. Install esp-idf on linux-i686
  2. Run ./install.sh esp32

Build or installation Logs.

Detecting the Python interpreter
Checking "python" ...
Checking "python3" ...
Python 3.7.3
"python3" has been detected
Installing ESP-IDF tools
Current system platform: linux-i686
Selected targets are: esp32, esp32c3
Installing tools: xtensa-esp-elf-gdb, xtensa-esp32-elf, esp32ulp-elf
Skipping xtensa-esp-elf-gdb@11.2_20220823 (already installed)
Skipping xtensa-esp32-elf@esp-2021r2-patch5-8.4.0 (already installed)
ERROR: tool esp32ulp-elf does not have versions compatible with platform linux-i686

More Information.

Please provide the linux-i686 build for the esp32ulp-elf https://github.com/espressif/binutils-gdb, and update the https://github.com/espressif/esp-idf/blob/master/tools/tools.json accordingly.
Or at least provide the clear config/make configuration to build it.
Strangely, all the tools in the toolkit have their linux-i686 version except for this.

Trying to build it myself, there are numerous issues:

Adding ESP-IDF tools to PATH...
WARNING: tool esp32ulp-elf version 2.35_20220830 is installed, but has reported version Copyright
ERROR: tool esp32ulp-elf has no installed versions. Please run '/home/user/esp/esp-idf/install.sh' to install it. 

As the built file's output lacks the version printout:
./esp32ulp-elf-as --version

GNU assembler (GNU Binutils)
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `esp32ulp-elf'.

While the version check in the script $HOME/esp/esp-idf/tools/idf_tools.py awaits something along the lines of:

GNU assembler (crosstool-NG esp-2021r2-patch5) 2.35.1.20201223
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `riscv32-esp-elf'.

And that requires either hacking the $HOME/esp/esp-idf/tools/idf_tools.py to override this check or finding out how to enable the version printout in that "trillion lines of code" binutils' source.

@usr97629238 usr97629238 added the Type: Bug bugs in IDF label May 31, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label May 31, 2023
@github-actions github-actions bot changed the title Provide the linux-i686 build for the esp32ulp-elf "Toolchain for ESP32 ULP coprocessor" Provide the linux-i686 build for the esp32ulp-elf "Toolchain for ESP32 ULP coprocessor" (IDFGH-10302) May 31, 2023
@espressif-bot espressif-bot added Type: Feature Request Feature request for IDF and removed Type: Bug bugs in IDF labels Jun 2, 2023
@usr97629238
Copy link
Author

The lack of a linux-i686 build for one tool in the toolkit is a bug, not a feature request.

@Lapshin
Copy link
Collaborator

Lapshin commented Jun 6, 2023

@usr97629238 , thank you for bug report. This will be done with the next release.

To build the toolchain by yourself you can use the command (replace gcc with yours if need):

./configure \
  --host=`gcc -dumpmachine`\
  --target=esp32ulp-elf \
  --prefix="${INSTALL_DIR}" \
  --disable-doc --disable-gdb --disable-libdecnumber --disable-readline --disable-sim
make
make install

Also, see the build routine here https://github.com/espressif/binutils-gdb/blob/esp32ulp-elf-v2.35_20220830/.gitlab-ci.yml#L131

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new labels Jun 13, 2023
@antmak
Copy link
Collaborator

antmak commented Jun 14, 2023

Hi @usr97629238. Thank you, fixed. A fix will be in master, v4.4 and other branches soon.

The i686 distribution has been added to the release https://github.com/espressif/binutils-gdb/releases/tag/esp32ulp-elf-v2.35_20220830
An IDF fix

diff --git a/tools/tools.json b/tools/tools.json
index 612b9353d8..43079c09fa 100644
--- a/tools/tools.json
+++ b/tools/tools.json
@@ -542,6 +542,11 @@
             "size": 9591791,
             "url": "https://github.com/espressif/binutils-gdb/releases/download/esp32ulp-elf-v2.35_20220830/esp32ulp-elf-2.35_20220830-linux-armhf.tar.gz"
           },
+          "linux-i686": {
+            "sha256": "beb9b6737c975369b6959007739c88f44eb5afbb220f40737071540b2c1a9064",
+            "size": 10596533,
+            "url": "https://github.com/espressif/binutils-gdb/releases/download/esp32ulp-elf-v2.35_20220830/esp32ulp-elf-2.35_20220830-linux-i686.tar.gz"
+          },
           "macos": {
             "sha256": "5a952087b621ced16af1e375feac1371a61cb51ab7e7b44cbefb5afda2d573de",
             "size": 16028909,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

4 participants