@@ -24,6 +24,25 @@ standard `LORAMAC_` prefix is applied to all options to aid interoperability wit
2424- LORAMAC_RADIO: STRING Name of the radio driver, defaults to sx1272
2525- LORAMAC_USE_RADIO_DEBUG: BOOL Enable Radio Debug GPIO's (default OFF)
2626
27+ ## Region support
28+
29+ Note that unlike the ` src ` build, the supported regions are not configured as CMake cache options. This is to
30+ support easier override when building multiple regions (where cache FORCE would be needed to override which).
31+
32+ At least one region must be enabled, and there are no regions enabled by default. A fatal CMake configure error
33+ will be generated if no regions are supported.
34+
35+ - LORAMAC_REGION_EU868: BOOL Enable support for EU868
36+ - LORAMAC_REGION_US915: BOOL Enable support for US915
37+ - LORAMAC_REGION_CN779: BOOL Enable support for CN779
38+ - LORAMAC_REGION_EU433: BOOL Enable support for EU433
39+ - LORAMAC_REGION_AU915: BOOL Enable support for AU915
40+ - LORAMAC_REGION_AS923: BOOL Enable support for AS923
41+ - LORAMAC_REGION_CN470: BOOL Enable support for CN470
42+ - LORAMAC_REGION_KR920: BOOL Enable support for KR920
43+ - LORAMAC_REGION_IN865: BOOL Enable support for IN865
44+ - LORAMAC_REGION_RU864: BOOL Enable support for RU864
45+
2746## Preparation for loading and building
2847
2948You must establish your toolchain prior to your first CMake ` project() ` call (which triggers toolchain detection). It
@@ -69,6 +88,8 @@ FetchContent should be used to load the project at CMake configure time (rather
6988
7089` ExternalProject_Add ` is not supported at this time.
7190
91+ NB: If building multiple static libraries for regional variants, ensure that you set the previous passes region to OFF
92+
7293```
7394FetchContent_Declare(
7495 loramac
@@ -87,7 +108,7 @@ set(LORAMAC_SUFFIX -Europe)
87108set(REGION_EU868 ON)
88109add_subdirectory(loramac_SOURCE_DIR loramac${LORAMAC_SUFFIX})
89110
90- set(REGION_EU868 OFF)
111+ set(REGION_EU868 OFF) # NB: Override last pass
91112set(REGION_US915 ON)
92113set(LORAMAC_SUFFIX -US)
93114add_subdirectory(loramac_SOURCE_DIR loramac${LORAMAC_SUFFIX})
0 commit comments