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

Integrating this library in ESP-IDF #101

Closed
sukesh-ak opened this issue Jan 18, 2022 · 7 comments
Closed

Integrating this library in ESP-IDF #101

sukesh-ak opened this issue Jan 18, 2022 · 7 comments

Comments

@sukesh-ak
Copy link

Subject of the issue

What are the changes required to make this library work with UART without Arduino dependency
Would like to use it with ESP-IDF based projects on ESP32

Your workbench

ESP32

Expected behavior

Use this library with ESP-IDF

Actual behavior

Tell us what happens instead

@PaulZC
Copy link
Collaborator

PaulZC commented Jan 18, 2022

Hi Sukesh (@sukesh-ak ),

Sorry - you will need to figure that out for yourself. I have no experience with ESP-IDF.

The code is all written in standard C++. It should hopefully be as simple as replacing hwAvailable , hwPrint , hwWrite etc. with the ESP-IDF equivalent?

Best wishes,
Paul

@PaulZC PaulZC closed this as completed Jan 18, 2022
@sukesh-ak
Copy link
Author

Thank you.

Right now looking at this method of using official ubxlib port for ESP-IDF instead.

https://github.com/u-blox/ubxlib/tree/master/port/platform/esp-idf/mcu/esp32

@sukesh-ak
Copy link
Author

hi @PaulZC

Thought of sharing here, how this library can be used with ESP-IDF with detailed steps.
Write-up used this library as an example.
https://github.com/sukesh-ak/Arduino-Library-with-IDF

Please feel free to add this link to your readme if its useful.

@PaulZC
Copy link
Collaborator

PaulZC commented Jun 14, 2022

Hi Sukesh (@sukesh-ak ),

This is great stuff - thank you!

I will pin this issue - so others can find it.

Thanks again,
Paul

@PaulZC PaulZC changed the title Using this library with UART without Arduino dependency? Integrating this library in ESP-IDF Jun 14, 2022
@PaulZC PaulZC pinned this issue Jun 14, 2022
@sukesh-ak
Copy link
Author

Thank you for this amazing library @PaulZC 👍

@dizcza
Copy link

dizcza commented Mar 4, 2024

I've successfully built this lib using Arduino as an ESP-IDF component with the following cmake:

file (GLOB SOURCES *.cpp)
idf_component_register(SRCS ${SOURCES}
                       INCLUDE_DIRS "."
                       REQUIRES arduino)
target_compile_options(${COMPONENT_LIB} PRIVATE -std=gnu++11)

I can simply add this simple fine (need to modify the paths) to support ESP-IDF.

@sukesh-ak didn't about such a lib, thanks. Have you tried its I2C API?

@sukesh-ak
Copy link
Author

I've successfully built this lib using Arduino as an ESP-IDF component with the following cmake:

file (GLOB SOURCES *.cpp)
idf_component_register(SRCS ${SOURCES}
                       INCLUDE_DIRS "."
                       REQUIRES arduino)
target_compile_options(${COMPONENT_LIB} PRIVATE -std=gnu++11)

I can simply add this simple fine (need to modify the paths) to support ESP-IDF.

@sukesh-ak didn't about such a lib, thanks. Have you tried its I2C API?

This was done few years ago.
I am working to avoid dependency with esp32-arduino core completely now. Will share once I get time to test it.

I don't have the hardware with I2C, so not tried yet. Maybe will try in near future with one of my custom hardware.

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

3 participants