-
Notifications
You must be signed in to change notification settings - Fork 0
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
__linux__ vs ESP_PLATFORM #2
Comments
What version of esp-idf are you using? Does this happen when building the application in the example/esp-idf directory in this repository? |
Hello
I'm using 5.2 version. I copy/paste the app_main func and define from your
example and put it on my dev apps. Basically I guess the issue could be
solved if you put, in the if-else defines, the ESP_PLATFORM first, to avoid
the __linux__
Thanks for your answer and ... time
H+
Le mer. 3 juil. 2024 à 05:44, zorxx ***@***.***> a écrit :
… What version of esp-idf are you using? Does this happen when building the
application in the example/esp-idf directory in this repository?
—
Reply to this email directly, view it on GitHub
<#2 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGTOE3AZGY4R5TDOXMTJYATZKNXTLAVCNFSM6AAAAABKIK7TJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBVGAZDINZQG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I built the example/esp-idf application successfully under Debain 12 with esp-idf v5.2 using esp32 and esp32-s3 target devices, so I believe there is an issue with the way you are using the bmp180 component. To add bmp180 support to your application, add the component to your project with the idf.py add-component function. There are no additional #defines necessary. The esp-idf toolchain does not define linux, so it's getting defined somewhere else in your application. |
Thanks a lot. The __linux__ is defined by gcc on debian, I guess this is a
standard definition. The issue is related to the struct
i2c_lowlevel_config. "__linux__" and "esp_platform" files are different.
The pin_sda, pin_scl and port aren't defined on i2c_linux.h. In fact the
component can be used as is, as long as the compiler sent back only a
warning
Le jeu. 4 juil. 2024 à 21:57, zorxx ***@***.***> a écrit :
… I built the example/esp-idf application successfully under Debain 12 with
esp-idf v5.2 using esp32 and esp32-s3 target devices, so I believe there is
an issue with the way you are using the bmp180 component. To add bmp180
support to your application, add the component to your project with the
idf.py add-component function. There are no additional #defines necessary.
The esp-idf toolchain does not define *linux*, so it's getting defined
somewhere else in your application.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGTOE3DG34U2LZ6JNFTZVXDZKWSJ7AVCNFSM6AAAAABKIK7TJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBZGUYDSMBTGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The xtensa esp32 gcc does not define linux. This can be verified by running the command: echo | ~/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -dM -E - The output of this command is a list of all preprocessor definitions for the xtensa esp32 compiler. linux is not in the list. As long as you're building under an esp-idf environment, the host toolchain (in your case, debian) is not involved in compiling the bmp180 library and linux is not defined. |
Working with bmp180 lib on Debian 12, the include file is always bmp180/i2c_linux.h, even though the ESP_PLATFORM is defined.
The text was updated successfully, but these errors were encountered: