sencha: add cheriot-testbench+cli a la simulate+cli

Bypass-Presubmit-Reason: no presubmit flow for this

Change-Id: I670b5e7471a5b1a534c03c940cadc575423dda54
diff --git a/platforms/sencha/cheriot-tests.mk b/platforms/sencha/cheriot-tests.mk
index ed87847..416e6b0 100644
--- a/platforms/sencha/cheriot-tests.mk
+++ b/platforms/sencha/cheriot-tests.mk
@@ -24,6 +24,17 @@
 	i @${CHERIOT_RESC_RELEASE}; \
 		pause; sysbus.cpu1 IsHalted false; start"
 
+## Version of the `cheriot-testbench` target that also enables the simulator command
+## line interface on port 4567. To access the simulator use something like
+## telnet localhost 4567. Note renode will block until the cli is connected.
+cheriot-testbench+cli: renode cheriot_sim cheriot-test
+	$(RENODE_CMD) -e "\
+	\$$cheriot_elf =@${CHERIOT_TEST}; \
+	\$$cli_port = 4567; \
+	\$$wait_for_cli = true; \
+	i @${CHERIOT_RESC_RELEASE}; \
+		pause; sysbus.cpu1 IsHalted false; start"
+
 ## Generates the cheriot-rtos test-suite firmware
 cheriot-test:
 	${MAKE} \