Problem with update esp-idf.

User avatar
ESP_Roland
Posts: 241
Joined: Tue Oct 09, 2018 10:28 am

Re: Problem with update esp-idf.

Postby ESP_Roland » Tue Sep 08, 2020 3:26 pm

Hi Palonso,

yes, your PATH seems to be fine.

What is the output of `esp32ulp-elf-as --version`? Am I assuming correctly that your system is Linux?

Palonso
Posts: 95
Joined: Tue Sep 24, 2019 8:43 pm

Re: Problem with update esp-idf.

Postby Palonso » Tue Sep 08, 2020 4:22 pm

Hi Roland,

Yes, I'm running Linux (Ubuntu 18.04)

here is the output to the ulp-elf version:

Code: Select all

$ esp32ulp-elf-as --version
Ensamblador (GNU Binutils) 2.28.51-esp-20191205 de GNU
Copyright (C) 2017 Free Software Foundation, Inc.
Este programa es software libre; se puede redistribuir bajo los términos de
la Licencia Pública General de GNU versión 3 o posterior.
Este programa no tiene ninguna garantía.
Este ensamblador se configuró para un objetivo «esp32ulp-elf».
Here I translated the message, since I have it in spanish my computer:

Code: Select all

$ esp32ulp-elf-as --version
GNU Assembler (GNU Binutils) 2.28.51-eng-20191205
Copyright (C) 2017 Free Software Foundation, Inc.
This program is free software; may be redistributed under the terms of
the GNU General Public License version 3 or later.
This program has no guarantee.
This assembler was configured for an "esp32ulp-elf" target.
Regards,
P

User avatar
ESP_Roland
Posts: 241
Joined: Tue Oct 09, 2018 10:28 am

Re: Problem with update esp-idf.

Postby ESP_Roland » Wed Sep 09, 2020 8:02 am

Hi Palonso,

Thank you for patience and help narrowing down the issue. This is something new I never faced before.

Could you please try to replace line no. 29 in components/ulp/component_ulp_common.mk:

Code: Select all

ULP_AS_VER := $(shell $(ULP_AS) --version | sed -E -n 's|GNU assembler \(GNU Binutils\) ([a-z0-9\.-]+)|\1|gp')
with this one:

Code: Select all

ULP_AS_VER := $(shell $(ULP_AS) --version | sed -E -n 's/.+ \(GNU Binutils\) ([a-z0-9\.-]+)( .*)?/\1/gp')
Does this solve your issue?

Palonso
Posts: 95
Joined: Tue Sep 24, 2019 8:43 pm

Re: Problem with update esp-idf.

Postby Palonso » Wed Sep 09, 2020 2:10 pm

Hi Roland,

This somehow solved the problem. here is the log from compiling with make:

Code: Select all

Python requirements from /home/pablo/esp/esp-idf/requirements.txt are satisfied.
GENCONFIG
Loading defaults file /home/pablo/esp/ulp/sdkconfig.defaults...
Building ULP app ulp_main
ULP assembler version: 2.28.51-esp-20191205
Project is not inside a git repository, or git repository has no commits
will not use 'git describe' to determine PROJECT_VER.
App "ulp-example" version: 1

Code: Select all

AR build/lwip/liblwip.a
Building ULP app ulp_main
ULP assembler version: 2.28.51-esp-20191205
CPP main/ulp/pulse_cnt.S
ULP_AS build/main/pulse_cnt.ulp.o
CPP main/ulp/wake_up.S
ULP_AS build/main/wake_up.ulp.o
CPP build/main/ulp_main.common.ld
ULP_LD build/main/ulp_main.elf
ULP_MAPGEN build/main/ulp_main.sym
ULP_BIN build/main/ulp_main.bin
CC build/main/ulp_example_main.o
EMBED build/main/ulp_main.bin.bin.o
AR build/main/libmain.a
but when I use idf.py here is the result:

Code: Select all

[591/962] Performing configure step for 'ulp_main'
-- The ASM compiler identification is GNU
-- Found assembler: /home/pablo/.espressif/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin/esp32ulp-elf-as
-- The C compiler identification is GNU 8.2.0
-- Check for working C compiler: /home/pablo/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/pablo/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-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
-- Building ULP app ulp_main
-- ULP assembler version: 
CMake Warning at CMakeLists.txt:33 (message):
  WARNING: ULP assembler version is not supported.  Expected to see version:
  2.28.51-esp-20191205.  Please check ESP-IDF ULP setup instructions and
  update the toolchain, or proceed at your own risk.


User avatar
ESP_Roland
Posts: 241
Joined: Tue Oct 09, 2018 10:28 am

Re: Problem with update esp-idf.

Postby ESP_Roland » Wed Sep 09, 2020 2:53 pm

Hi Palonso,

for fixing idf.py, please try to replace line 16 of components/ulp/cmake/CMakeLists.txt

Code: Select all

string(REGEX MATCH "GNU assembler \\(GNU Binutils\\) (${version_pattern})" as_version ${as_output})
with this one:

Code: Select all

string(REGEX MATCH "\\(GNU Binutils\\) (${version_pattern})" as_version ${as_output})

Palonso
Posts: 95
Joined: Tue Sep 24, 2019 8:43 pm

Re: Problem with update esp-idf.

Postby Palonso » Wed Sep 09, 2020 3:35 pm

Hi, Roland

Perfect now it seems to be working fine in both ways. Here is the log for the idf.py build:

Code: Select all

[587/962] Performing configure step for 'ulp_main'
-- Building ULP app ulp_main
-- ULP assembler version: 2.28.51-esp-20191205
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pablo/esp/ulp/build/esp-idf/main/ulp_main
should this be pull-requested to the esp-idf repo? or this was a particular error so I should "fix it" everytime I update the IDF?

regards,
P

User avatar
ESP_Roland
Posts: 241
Joined: Tue Oct 09, 2018 10:28 am

Re: Problem with update esp-idf.

Postby ESP_Roland » Wed Sep 09, 2020 3:40 pm

Hi Palonso,

thank you very much for your help. These fixes will be included in all supported releases of ESP-IDF. I cannot tell you when that will happen. Until then you have to fix it for after every IDF update (if your fixes are discarded).

User avatar
ESP_Roland
Posts: 241
Joined: Tue Oct 09, 2018 10:28 am

Re: Problem with update esp-idf.

Postby ESP_Roland » Thu Sep 10, 2020 7:33 am

For future reference, commit edd7c1a2eef6c9ae61c026765fce66db63c08140 fixes this issue and will be available in latest master the next time ESP-IDF is updated on Github. The fix will be backported to release branches.

Who is online

Users browsing this forum: Bing [Bot] and 136 guests