Skip to content
Manuel Bl edited this page Aug 2, 2020 · 3 revisions

You have several options how to integrate ttn-esp32 as a component into your project:

Option 1: Download zip file and copy contents into components folder

That's the option presented on the Get Started page:

Option 2: Download zip file and add it to EXTRA_COMPONENT_DIRS

Instead of copying the contents of the zip file, you add it to the build system variable EXTRA_COMPONENT_DIRS in CMakeLists.txt.

list(APPEND EXTRA_COMPONENT_DIRS "/Users/me/Documents/ttn-esp32")

Option 3: Clone the repository and add it to EXTRA_COMPONENT_DIRS

Instead of downloading the zip file, you can clone the ttn-esp32 repository. That way, you can easily stay up-to-date with the latest enhancements and bug fixes. The ttn-esp32 is referenced by the build system variable EXTRA_COMPONENT_DIRS in CMakeLists.txt.

  • git clone https://github.com/manuelbl/ttn-esp32.git
  • Edit CMakeLists.txt in the root directory of your project so EXTRA_COMPONENT_DIRS includes the path to the downloaded folder:
list(APPEND EXTRA_COMPONENT_DIRS "/Users/me/Documents/ttn-esp32")

Option 4: Add it as a git submodule

If your app's source code is already managed by git, then you can add ttn-esp32 as a git submodule:

git submodule add https://github.com/manuelbl/ttn-esp32.git components/ttn-esp32
git submodule update --init --recursive