Building the prplMesh Code
Features > prplMesh
Download and extract the prplMesh source
Obtain the prplMesh source tar file from the Morse Micro DocSend release folder and extract it, using the following command:
tar xvzf prplmesh-rel_1_10_2_2023_Nov_22.tgz
Update CMakeLists.txt
Add the following extra CFLAGS [highlighted in blue] to the CMakeLists.txt file present in the top directory:
# Default Compiler flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -pthread
-Wno-comment -Wno-unused-parameter -Wno-missing-field-initializers
-Wno-error=deprecated-declarations -Wno-error=maybe-uninitialized")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s -O2
-Wformat -Wformat-security -Wl,
-S -fPIC -fPIE")
# Compiler specific flags
Build the code
From the top level directory invoke cmake as follows:
cmake -DCMAKE_C_COMPILER=<compiler for target>
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=build/install
-DTARGET_PLATFORM="MorseMicro" -DBEEROCKS_BRIDGE_IFACE="br-prpl"
-DBWL_TYPE="NL80211" -DBUILD_SHARED_LIBS=OFF -H.
-B./build
Note: Use appropriate bridge name for -DBEEROCKS_BRIDGE_IFACE.
Once cmake is successful, run make to finish the compilation
make -C ./build install
Copy the files into the target
Transfer the contents of '<top_dir>/build/install/*' to the target device, maintaining the identical directory structure.