Here are some steps you can follow to build an EZSP-UART host application with an EFR32MG1 or EFR32MG12 device (on our dev kit) running a pre-built NCP-UART image of the latest EmberZNet stack, which is v18.104.22.168 at the time of this article.
1. Create a new Silicon Labs AppBuilder Project in Simplicity Studio v4 of type "ZCL Application Framework V2", and choose the host (as opposed to SoC) flavor of the latest EmberZNet stack.
2. Choose a sample application, such as Z3Gateway.choose "None(compatible)" in Part tab. and click "Finish"
3. Generage the project without any modification.
4. Build the host application.
Building the Host application can be done on a Linux system(this sample built on Cygwin) and requires a number of development tools. We assume you have access to these tools. They are as follows:
• The standard C Library and its development headers
• The Readline Library and its development headers
• The Ncurses Library and its development headers
. Run "make" on the generated Makefile from the directory<\SiliconLabs\SimplicityStudio\v4_4\developer\sdks\gecko_sdk_suite\v2.0\app\builder\Z3GatewayHost> and the compilation should complete successfully.
5. Running the Host application
The USB port is either COM1, COM2, COM3, and so on. The following example uses COM19.
a. Launch a Cygwin Shell.
b. Navigate to the directory where the project is located, for example:cd /cygdrive/c/SiliconLabs/SimplicityStudio/v4_4/developer/sdks/gecko_sdk_suite/v2.0/app/builder/Z3GatewayHost/build/exe
c. Type the command: ./Z3GatewayHost.exe -n 0 -p COM19
Someone may encounter the ezspForceReset error during launching the host application, here is a KBA can help to debug this issue. How to debug the ezspForceReset error during launching the host application
I'm using the EFR32MG1P132F256GM48 part on a BRD4153A. As explained on the post instructions I have generated the XncpLedHost project which is generated by performing the steps File > New > Project > Silicon Labs AppBuilder Project > ZCL Application Framework V2 > EmberZNet 22.214.171.124 GA Host 126.96.36.199 > XncpLed and I have successfully compiled it on my Linux Machine.
Nevertheless, this post does not mention what code I should flash to the MCU so I just generated the project that seems to go with the XncpLed and it's automatically generated from the launcher on SS4
I successfully compiled the project without any modifications and flashed the xncp-led.bin with Simplicity Commander on the board.
BUT, I'm having problems running the solution. When I execute the following on my Linux host:
./XncpLedHost -n 0 -p /dev/ttyACM0
Reset info: 11 (SOFTWARE) ERROR: ezspForceReset 0x21 XncpLedHost: ../../../protocol/zigbee/app/framework/util/af-main-host.c:339: emAfResetAndInitNCP: Assertion `false' failed. XncpLedHost> 27387 abort ./XncpLedHost -n 0 -p /dev/ttyACM0
So my question is, is this how I suppose to generate the MCU-side code? Because the post mentions;
running a pre-built NCP-UART image of the latest EmberZNet stack
But I don't know where that pre-built image is and no instructions are given about where to find it.
Also, you have a typo in point number 2.
I encountered the issue like you, do you figure out how to solve it now?
It is a known issue for NCP EmberZNet 188.8.131.52 GCC build. Using IAR to build NCP without an issue. You can verify this by using prebuilt NCP image
The bug will be fixed in next release version SDK.
My IC is EFR32MG12P332F1024GL125
I chose the following figure，But in the Ubuntu use sudo ./Z3GatewayHost -n 1 -p /dev/ttyUSB0
command ，the return status code is ERROR: ezspForceReset 0x21
Which NCP image and bootloader should I use？
xNcp-Led and XNcpHost works for me with these changes. Basically I tried to copy .hwconf file of NCP UART SW to .hwconf of xNcp-Led. I believe without h/w UART we cannot run NCP UART HW with Cygwin.
Use NCP UART SW instead of NCP UART HW with Z3GatewayHost.exe
Hi M K, I have generated the Z3GatewayHost.exe,and it works normally when I use the EFR32MG1P132F256GM48 part with NCP UART SW.But when I change the part to EFR32MG21A020F1024IM32 ,I generated the NCP UART SW firware and downloaded ,then I start the capture ,and the NCP works well as follow
But when I stop capture and start the Z3GatewayHost.exe , the return status code is ERROR: ezspForceReset 0x22
I don't know what happened !