Skip to content

Commit

Permalink
[Ameba] Support Matter Shell on 8710C platform (#21776)
Browse files Browse the repository at this point in the history
* [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>
  • Loading branch information
2 people authored and pull[bot] committed Nov 8, 2023
1 parent d85117d commit b265f63
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ algs
alloc
AlarmCode
Ameba
AmebaD
amebad
amebaiot
AmebaZ2
amebaz2
announcementReason
AnnounceOTAProvider
AnnounceOtaProviderRequest
Expand Down
16 changes: 12 additions & 4 deletions examples/all-clusters-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,35 @@ to be On or Off.
## 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()
Expand Down
16 changes: 12 additions & 4 deletions examples/light-switch-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,27 +91,35 @@ to be On or Off.
## 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()
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/ameba/shell/launch_shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace chip {
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
10 changes: 5 additions & 5 deletions src/lib/shell/streamer_ameba.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b265f63

Please sign in to comment.