Download or clone the sdk_support from GitHub
git clone https://github.com/SiliconLabs/sdk_support.git
and export the path with :
export EFR32_SDK_ROOT=<Path to cloned git repo>
Download the Simplicity Commander command line tool, and ensure that commander
is your shell search path. (For Mac OS X, commander
is located inside Commander.app/Contents/MacOS/
.)
export PATH=/Applications/Commander.app/Contents/MacOS:$PATH
Download and install a suitable ARM gcc tool chain: GNU Arm Embedded Toolchain 9-2019-q4-major
Install some additional tools(likely already present for CHIP developers):
Linux
sudo apt-get install git libwebkitgtk-1.0-0 ninja-build
Mac OS X
brew install ninja
Supported hardware:
MG12 boards:
MG21 boards: Currently not supported due to RAM limitation.
MG24 boards :
Build the example application:
cd ~/connectedhomeip/examples/pigweed-app/efr32 git submodule update --init source third_party/connectedhomeip/scripts/activate.sh export EFR32_BOARD=BRD4161A gn gen out/debug ninja -C out/debug
To delete generated executable, libraries and object files use:
cd ~/connectedhomeip/examples/pigweed-app/efr32 rm -rf out/
On the command line:
cd ~/connectedhomeip/examples/pigweed-app/efr32 python3 out/debug/chip-efr32-pigweed-example.flash.py
With the Commander app, just load the .s37 file.
Or with the Ozone debugger, just load the .out file.
Determine the serial port name for the EFR device by checking /dev: ls /dev/tty*
It should look like this : - On Linux /dev/ttyACM0 - On MAC /dev/tty.usbmodem0004401548451
Run the following command to start an interactive Python shell, where the Echo RPC commands can be invoked:
python -m pw_hdlc.rpc_console --device /dev/tty.usbmodem0004401548451 -b 115200 <CHIP_ROOT>/third_party/pigweed/repo/pw_rpc/pw_rpc_protos/echo.proto -o /tmp/pw_rpc.out
To send an Echo RPC message, type the following command, where the actual message is the text in quotation marks after the msg=
phrase:
rpcs.pw.rpc.EchoService.Echo(msg="hi")
Note: Some users might have to install the VCP driver before the device shows up on /dev/tty
.
While most of the RAM usage in CHIP is static, allowing easier debugging and optimization with symbols analysis, we still need some HEAP for the crypto and OpenThread. Size of the HEAP can be modified by changing the value of the SL_STACK_SIZE
define inside of the BUILD.gn file of this example. Please take note that a HEAP size smaller than 5k can and will cause a Mbedtls failure during the BLE rendez-vous.