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

esp32: is broken for the latest esp-idf version #1538

Closed
SebastianBoe opened this issue Sep 18, 2017 · 10 comments
Closed

esp32: is broken for the latest esp-idf version #1538

SebastianBoe opened this issue Sep 18, 2017 · 10 comments
Assignees

Comments

@SebastianBoe
Copy link
Collaborator

SebastianBoe commented Sep 18, 2017

Following the ESP32's instructions for installing and using the espressif SDK resulted in a broken build.

Specifically, I get the below error message when building hello_world.

Git blame shows that the offending line was added in mid-august, so I am guessing that the latest ESP-IDF SDK is not compatible with Zephyr. Haven't confirmed this by going back in time yet though ...

Solution suggestions

  1. Put a specific git revision in the SDK installation instructions.
  2. Fix the latest ESP-IDF version to be compatible with Zephyr and then set up CI to ensure the latest ESP-IDF is always compatible with Zephyr.

Make output

  /home/sebo/workspace_zephyr/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -Wp,-MD,drivers/gpio/.gpio_esp32.o.d  -nostdinc -isystem /home/sebo/workspace_zephyr/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/include -isystem /home/sebo/workspace_zephyr/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/include-fixed -I/home/sebo/zephyr/kernel/include -I/home/sebo/zephyr/arch/xtensa/include -I/home/sebo/zephyr/arch/xtensa/soc/esp32 -I/home/sebo/zephyr/boards/xtensa/esp32  -I/home/sebo/zephyr/include -I/home/sebo/zephyr/include -I/home/sebo/workspace_zephyr/zephyr/samples/hello_world/outdir/esp32/include/generated -include /home/sebo/workspace_zephyr/zephyr/samples/hello_world/outdir/esp32/include/generated/autoconf.h  -I/home/sebo/workspace_zephyr/esp/esp-idf/components/esp32/include -I/home/sebo/workspace_zephyr/esp/esp-idf/components/soc/esp32/include -I/home/sebo/zephyr/lib/libc/minimal/include  -I/home/sebo/zephyr/drivers/gpio -Idrivers/gpio -DKERNEL -D__ZEPHYR__=1 -c -g -std=c99 -Wall -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -Wno-format-zero-length -Wno-main -ffreestanding -Os -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-stack-protector -ffunction-sections -fdata-sections -fms-extensions -Wno-unused-but-set-variable -fno-reorder-functions -fno-defer-pop -Wno-pointer-sign -fno-strict-overflow -Werror=implicit-int   -I/home/sebo/zephyr/include/drivers   -I/home/sebo/zephyr/drivers    -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(gpio_esp32)"  -D"KBUILD_MODNAME=KBUILD_STR(gpio_esp32)" -c -o drivers/gpio/gpio_esp32.o /home/sebo/zephyr/drivers/gpio/gpio_esp32.c
In file included from /home/sebo/workspace_zephyr/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:20:0,
                 from /home/sebo/workspace_zephyr/esp/esp-idf/components/soc/esp32/include/soc/dport_reg.h:20,
                 from /home/sebo/zephyr/drivers/gpio/gpio_esp32.c:9:
/home/sebo/workspace_zephyr/esp/esp-idf/components/esp32/include/esp_dport_access.h:15:23: fatal error: sdkconfig.h: No such file or directory
@SebastianBoe
Copy link
Collaborator Author

Can confirm that it is a regression from commit cb31222e in the esp-idf repo.

git checkout cb31222e~1

resolves the issue.

@SebastianBoe SebastianBoe changed the title esp32: ZEPHYR_GCC_VARIANT=espressif is broken for the latest esp-idf version esp32: is broken for the latest esp-idf version Sep 18, 2017
@pfalcon
Copy link
Contributor

pfalcon commented Sep 18, 2017

Don't we pin esp-idf to a specific revision? Everybody does, it's still largely WIP and incompatible changes happen regularly (from what I heard).

@SebastianBoe
Copy link
Collaborator Author

No.

The board's documentation says this:

Two components are required in order to build this port: the toolchain_
and the SDK_. Both are provided by the SoC manufacturer.

The SDK contains headers and a hardware abstraction layer library
(provided only as object files) that are required for the port to
function.

The toolchain is available for Linux, Windows, and Mac hosts and
instructions to obtain and set them up are available in the ESP-IDF
repository, using the toolchain and SDK links above.

Following the SDK link eventually gives you:

git clone --recursive https://github.com/espressif/esp-idf.git

So latest master of esp-idf.

I would suggest pinning the version.

@SebastianBoe
Copy link
Collaborator Author

Could you elaborate on it being WIP? Is there anything I should expect to be broken with esp32?

Specifically, is it expected that

sanitycheck -p esp32

will have 0 failures?

@lpereira
Copy link
Collaborator

I believe that @pfalcon was saying that esp-idf is WIP, so likely to break every now and then. I agree with the suggestion to pin to a particular revision, as we don't really care about esp-idf itself: we only need it for some headers and libhal.a, which are unlikely to significantly change.

@pfalcon
Copy link
Contributor

pfalcon commented Sep 18, 2017

I believe that @pfalcon was saying that esp-idf is WIP

Yes, that's what I meant.

@andrewboie
Copy link
Contributor

I would be not at all opposed to checking in a 'known good' version of ESP-IDF directly into the Zephyr tree, along with our other HALs in ext/ if there are no license issues.

@SebastianBoe
Copy link
Collaborator Author

For source code this is OK IMHO, but not for the 452K binary libhal.a.

I worry it would bloat git over time.

@lpereira
Copy link
Collaborator

Yeah. The whole repository for esp-idf is licensed under an Apache License 2.0 (IIRC), so in theory we could do that. But I'm not keen on distributing a binary blob with Zephyr.

@pfalcon
Copy link
Contributor

pfalcon commented Sep 19, 2017

@nashif already raised (or mentioned) an issue that 90% (if not 95%) of Zephyr's "weight" are existing vendor libs in ext/ . So, if esp32 doesn't have that, it can be a fresh breath and start of something new (I for example would really ponder of using git submodules).

lpereira added a commit to lpereira/zephyr that referenced this issue Oct 9, 2017
ESP-IDF is in constant development and it's likely that files Zephyr
depends on will be moved, removed, or renamed.  Make a note that an
older version of ESP-IDF should be used instead.

Closes zephyrproject-rtos#1538.

Signed-off-by: Leandro Pereira <[email protected]>
nashif pushed a commit that referenced this issue Oct 9, 2017
ESP-IDF is in constant development and it's likely that files Zephyr
depends on will be moved, removed, or renamed.  Make a note that an
older version of ESP-IDF should be used instead.

Closes #1538.

Signed-off-by: Leandro Pereira <[email protected]>
nagineni pushed a commit to nagineni/zephyr that referenced this issue Nov 20, 2017
…t-rtos#1538)

Allowed origins header (GET_ALLOWED_ORIGINS) request has been
removed from the WebUSB specification, so removing the support
for the request.

Signed-off-by: Sudarsana Nagineni <[email protected]>
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

4 participants