[Ameba] Support Matter Shell on 8710C platform (#21776)
* [Shell] Support 8710C platform for shell streamer
* [Shell] Give the right function address when creating MatterShellTask
* [README] update all-clusters-app readme
* [README] update light-switch-app readme
* Fixing style
* Fixing style
* [Wordlist] Update the wordlist
Co-authored-by: Justin Wood <woody@apple.com>
diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt
index 4f845b8..3f43025 100644
--- a/.github/.wordlist.txt
+++ b/.github/.wordlist.txt
@@ -46,8 +46,11 @@
alloc
AlarmCode
Ameba
+AmebaD
amebad
amebaiot
+AmebaZ2
+amebaz2
announcementReason
AnnounceOTAProvider
AnnounceOtaProviderRequest
diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md
index ee57479..ddbdf66 100644
--- a/examples/all-clusters-app/ameba/README.md
+++ b/examples/all-clusters-app/ameba/README.md
@@ -92,27 +92,35 @@
## Running RPC Console
- Connect a USB-TTL adapter as shown below
+- For AmebaD
Ameba USB-TTL
A19 TX
A18 RX
GND GND
-* Build the
+* For AmebaZ2
+
+ Ameba USB-TTL
+ A13 TX
+ A14 RX
+ GND GND
+
+- Build the
[chip-rpc console](https://github.com/project-chip/connectedhomeip/tree/master/examples/common/pigweed/rpc_console)
-* As part of building the example with RPCs enabled the chip_rpc python
+- As part of building the example with RPCs enabled the chip_rpc python
interactive console is installed into your venv. The python wheel files are
also created in the output folder: out/debug/chip_rpc_console_wheels. To
install the wheel files without rebuilding:
$ pip3 install out/debug/chip_rpc_console_wheels/*.whl
-- Launch the chip-rpc console after resetting Ameba board
+* Launch the chip-rpc console after resetting Ameba board
$ chip-console --device /dev/tty<port connected to USB-TTL adapter> -b 115200
-* Get and Set lighting directly using the RPC console
+- Get and Set lighting directly using the RPC console
python
rpcs.chip.rpc.Lighting.Get()
diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md
index 9d33811..9959ff0 100644
--- a/examples/light-switch-app/ameba/README.md
+++ b/examples/light-switch-app/ameba/README.md
@@ -91,27 +91,35 @@
## Running RPC Console
- Connect a USB-TTL adapter as shown below
+- For AmebaD
Ameba USB-TTL
A19 TX
A18 RX
GND GND
-* Build the
+* For AmebaZ2
+
+ Ameba USB-TTL
+ A13 TX
+ A14 RX
+ GND GND
+
+- Build the
[chip-rpc console](https://github.com/project-chip/connectedhomeip/tree/master/examples/common/pigweed/rpc_console)
-* As part of building the example with RPCs enabled the chip_rpc python
+- As part of building the example with RPCs enabled the chip_rpc python
interactive console is installed into your venv. The python wheel files are
also created in the output folder: out/debug/chip_rpc_console_wheels. To
install the wheel files without rebuilding:
$ pip3 install out/debug/chip_rpc_console_wheels/*.whl
-- Launch the chip-rpc console after resetting Ameba board
+* Launch the chip-rpc console after resetting Ameba board
$ chip-console --device /dev/tty<port connected to USB-TTL adapter> -b 115200
-* Get and Set lighting directly using the RPC console
+- Get and Set lighting directly using the RPC console
python
rpcs.chip.rpc.Lighting.Get()
diff --git a/examples/platform/ameba/shell/launch_shell.cpp b/examples/platform/ameba/shell/launch_shell.cpp
index dba80a2..d6feddb 100644
--- a/examples/platform/ameba/shell/launch_shell.cpp
+++ b/examples/platform/ameba/shell/launch_shell.cpp
@@ -36,7 +36,7 @@
void LaunchShell()
{
chip::Shell::Engine::Root().Init();
- xTaskCreate(&MatterShellTask, "matter_shell", 2048, NULL, tskIDLE_PRIORITY + 1, NULL);
+ xTaskCreate(MatterShellTask, "matter_shell", 2048, NULL, tskIDLE_PRIORITY + 1, NULL);
}
} // namespace chip
diff --git a/src/lib/shell/streamer_ameba.cpp b/src/lib/shell/streamer_ameba.cpp
index 7f497d6..d585aa9 100644
--- a/src/lib/shell/streamer_ameba.cpp
+++ b/src/lib/shell/streamer_ameba.cpp
@@ -28,13 +28,13 @@
#include "serial_api.h"
-// UART pin location:
-// KM4 UART0:
-// PA_18 (TX)
-// PA_19 (RX)
-
+#if defined(CONFIG_PLATFORM_8721D)
#define UART_TX PA_18 // UART0 TX
#define UART_RX PA_19 // UART0 RX
+#elif defined(CONFIG_PLATFORM_8710C)
+#define UART_TX PA_14 // UART0 TX
+#define UART_RX PA_13 // UART0 RX
+#endif
namespace chip {
namespace Shell {