Skip to content

avoid build error when using this lib from another project #17

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

Merged
merged 1 commit into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ set(INCS "mros2/include"
${CMAKE_SOURCE_DIR}/main
)

if(NOT CMAKE_BUILD_EARLY_EXPANSION)
add_compile_options(-w)
endif()

idf_component_register(
SRCS ${SRCS}
INCLUDE_DIRS ${INCS}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ idf.py build
When the build completed successfully, a binary is generated in `build/echoback_string.bin`.

Connect the device to the host via USB cable, and flash the binary to it.
The default port in Ubuntu may be `/tty/ttyUSB0``, but you may need to change it according to your environment.
The port `/tty/ttyUSB0` may be adjusted according to your target board and development environment.

```
idf.py -p /tty/ttyUSB0 flash
Expand Down Expand Up @@ -262,6 +262,7 @@ You need to edit `./CMakeLists.txt` and `./main/CMakeLists.txt` as the below.
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(hello_mros2)
```
- This is due to avoid build error about `-Werror=format` in mros2-esp32 logging functions. See [#Issue16](https://github.com/mROS-base/mros2-esp32/issues/16) for details.
- `./main/CMakeLists.txt`
```
idf_component_register(SRCS "hello_mros2.cpp" # edit
Expand Down