Skip to content

Compilation for ESP32 on XTENSA architecture #1598

Closed

Description

@nkolban

In the current build environment for libcurl, we find the file called:

curl/include/curl/system.h

contains environmental definitions. In my environment, I wish to build on the ESP32 MCU which uses the XTENSA chip set/architecture. GCC on this environment supplies the pre-defined macro called __XTENSA__. This issue requests a change of the source in system.h from this:

#elif defined(__GNUC__)
#  if !defined(__LP64__) && (defined(__ILP32__) || \
      defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
      defined(__sparc__) || defined(__mips__) || defined(__sh__))

and change to:

#elif defined(__GNUC__)
#  if !defined(__LP64__) && (defined(__ILP32__) || \
      defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
      defined(__sparc__) || defined(__mips__) || defined(__sh__) || defined(__XTENSA__))

Activity

  1. jay commented on Jun 21, 2017

    @jay
    Member

    does it build ok with that change, are the type sizes in that section correct for your platform?

  2. bagder commented on Jun 24, 2017

    @bagder
    Member

    fixed in ceff21a

  3. jay commented on Jun 25, 2017

    @jay
    Member

    I'd still like to know if this was actually tested on that platform. That section assumes sizeof long is 4 which may not be right

  4. nkolban commented on Jun 25, 2017

    @nkolban
    Author

    I had a number of ESP32 users test the suggested change and so far so good. See:

    nkolban/esp32-snippets#18

  5. jay commented on Jun 25, 2017

    @jay
    Member

    ok. on your platform is sizeof(long) 4 or 8

  6. nkolban commented on Jun 25, 2017

    @nkolban
    Author

    On the ESP32 device, sizeof(long) evaluates to 4 bytes.

  7. jay commented on Jun 26, 2017

    @jay
    Member

    ok. thanks for clearing that up

  8. locked as resolved and limited conversation to collaborators on May 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions